logger.py:195:log:IOError: [Errno 5] Input/output error

Bug #1237462 reported by Jiri Popelka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
New
Undecided
Unassigned
Fedora
Won't Fix
Undecided

Bug Description

Hello,

on Fedora we've seen several reports that
base/logger.py:log() failed to print to stdout with IOError.

For example:
Traceback (most recent call last):
  File "/usr/bin/hp-setup", line 889, in <module>
    log.info("")
  File "/usr/share/hplip/base/logger.py", line 288, in info
    self.log(message, Logger.LOG_LEVEL_INFO)
  File "/usr/share/hplip/base/logger.py", line 195, in log
    out.write('\n')
IOError: [Errno 5] Input/output error

or:
Traceback (most recent call last):
  File "/bin/hp-toolbox", line 80, in <module>
    mod.parseStdOpts('x', ['disable-dbus'])
  File "/usr/share/hplip/base/module.py", line 390, in parseStdOpts
    self.usage(show_usage, error_msg)
  File "/usr/share/hplip/base/module.py", line 411, in usage
    self.showTitle()
  File "/usr/share/hplip/base/module.py", line 438, in showTitle
    log.info("")
  File "/usr/share/hplip/base/logger.py", line 284, in info
    self.log(message, Logger.LOG_LEVEL_INFO)
  File "/usr/share/hplip/base/logger.py", line 191, in log
    out.write('\n')
IOError: [Errno 5] Input/output error

I can't see how that could be possible,
but there must be some pattern because of so many reports, see for example:
https://bugzilla.redhat.com/show_bug.cgi?id=592790
https://bugzilla.redhat.com/show_bug.cgi?id=658156
https://bugzilla.redhat.com/show_bug.cgi?id=712537
https://bugzilla.redhat.com/show_bug.cgi?id=908157
https://bugzilla.redhat.com/show_bug.cgi?id=1004344

You could of course just catch the exception if the logging fails (see attached patch)
but that'd only hide the problem somewhere else.

--
Jiri

Revision history for this message
Jiri Popelka (jpopelka) wrote :
Changed in fedora:
importance: Unknown → Undecided
status: Unknown → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.