Opened 7 years ago

Closed 5 years ago

#2195 closed defect (wontfix)

sysinfo leaks 'Broken pipe' exception

Reported by: jinmei Owned by:
Priority: medium Milestone: Remaining BIND10 tickets
Component: sysinfo Version: bind10-old
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: Core Feature Depending on Ticket:
Estimated Difficulty: 3 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

If I pass the output of isc-sysinfo to another process via a pipe
and that process doesn't consume all input from sysinfo, sysinfo
itself dies with an uncaught exception of IOError (Broken pipe):

% isc-sysinfo|head -1
ISC Sysinfo tool
Traceback (most recent call last):
  File "/home/jinmei/opt/bin/isc-sysinfo", line 136, in <module>
    main()
  File "/home/jinmei/opt/bin/isc-sysinfo", line 121, in main
    write_value(f, '%s', s.get_net_connections)
  File "/home/jinmei/opt/bin/isc-sysinfo", line 42, in write_value
    out.write(fmt % value)
IOError: [Errno 32] Broken pipe

This is not really grace.

Subtickets

Change History (5)

comment:1 Changed 7 years ago by vorner

What is the goal here? Have a better error message, or suppress the error completely? I'm against suppressing it completely (and I think the better error message is pretty minor thing).

comment:2 Changed 7 years ago by jreed

It should work. I just noticed same thing. Why even have any error?

I saw it when I piped through less (which I assume is very normal):

Traceback (most recent call last):
  File "/usr/local/bin/isc-sysinfo", line 136, in <module>
    main()
  File "/usr/local/bin/isc-sysinfo", line 121, in main
    write_value(f, '%s', s.get_net_connections)
  File "/usr/local/bin/isc-sysinfo", line 42, in write_value
    out.write(fmt % value)
IOError: [Errno 32] Broken pipe

comment:3 Changed 7 years ago by shane

  • Milestone New Tasks deleted

Hm... I didn't see this on less, but it is easy to reproduce. We should exit silently if there is a write error, IMHO.

comment:4 Changed 6 years ago by tomek

  • Milestone set to Remaining BIND10 tickets

comment:5 Changed 5 years ago by tomek

  • Resolution set to wontfix
  • Status changed from new to closed
  • Version set to old-bind10

This issue is related to bind10 code that is no longer part of Kea.

If you are interested in BIND10/Bundy framework or its DNS components,
please check http://bundy-dns.de.

Closing ticket.

Note: See TracTickets for help on using tickets.