pmarks-net / dtella

A decentralized Direct Connect "hub"
GNU General Public License v2.0
7 stars 2 forks source link

Handle a closed TTY #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This was reported by Ximin Luo.  Will investigate:

When dtella is logging to a stdout and this is closed (eg. virtual tty),
dtella will produce these errors in subsequent logging attempts. These
errors should be ignored, and dtella should stop logging to stdout.

X

[17:02:18] <*Dtella> Something bad happened.  You might want to email this
to bugs@dtella.org so we'll know about it:
Version: Dtella@Cambridge 1.2.3/L
Traceback (most recent call last):
 File "/home/xl269/.dtella/twisted/internet/base.py", line 1048, in run
   self.mainLoop()
 File "/home/xl269/.dtella/twisted/internet/base.py", line 1057, in mainLoop
   self.runUntilCurrent()
 File "/home/xl269/.dtella/twisted/internet/base.py", line 707, in
runUntilCurrent
   log.deferr()
 File "/home/xl269/.dtella/twisted/python/log.py", line 169, in err
   msg(failure=_stuff, why=_why, isError=1, **kw)
--- <exception caught here> ---
 File "/home/xl269/.dtella/twisted/python/log.py", line 239, in msg
   self.observers[i](actualEventDict)
 File ".dtella/dtella.py", line 58, in logObserver
   handler(text)
 File "/usr/lib/python2.5/logging/__init__.py", line 1035, in critical
   apply(self._log, (CRITICAL, msg, args), kwargs)
 File "/usr/lib/python2.5/logging/__init__.py", line 1101, in _log
   self.handle(record)
 File "/usr/lib/python2.5/logging/__init__.py", line 1111, in handle
   self.callHandlers(record)
 File "/usr/lib/python2.5/logging/__init__.py", line 1148, in callHandlers
   hdlr.handle(record)
 File "/usr/lib/python2.5/logging/__init__.py", line 655, in handle
   self.emit(record)
 File "/usr/lib/python2.5/logging/__init__.py", line 757, in emit
   self.handleError(record)
 File "/usr/lib/python2.5/logging/__init__.py", line 706, in handleError
   traceback.print_exception(ei[0], ei[1], ei[2], None, sys.stderr)
 File "/usr/lib/python2.5/traceback.py", line 124, in print_exception
   _print(file, 'Traceback (most recent call last):')
 File "/usr/lib/python2.5/traceback.py", line 13, in _print
   file.write(str+terminator)
exceptions.IOError: [Errno 5] Input/output error

[17:02:18] <*Dtella> Something bad happened.  You might want to email this
to bugs@dtella.org so we'll know about it:
Version: Dtella@Cambridge 1.2.3/L
Traceback (most recent call last):
 File ".dtella/dtella.py", line 228, in main
   runClient(dc_port)
 File ".dtella/dtella.py", line 148, in runClient
   reactor.run()
 File "/home/xl269/.dtella/twisted/internet/base.py", line 1048, in run
   self.mainLoop()
 File "/home/xl269/.dtella/twisted/internet/base.py", line 1057, in mainLoop
   self.runUntilCurrent()
--- <exception caught here> ---
 File "/home/xl269/.dtella/twisted/internet/base.py", line 705, in
runUntilCurrent
   call.func(*call.args, **call.kw)
 File "/home/xl269/.dtella/dtella/common/core.py", line 1644, in cb
   self.checkStatus()
 File "/home/xl269/.dtella/dtella/common/core.py", line 1775, in checkStatus
   self.initCompleted(good=False)
 File "/home/xl269/.dtella/dtella/common/core.py", line 1800, in initCompleted
   self.done_callback('no_nodes', None)
 File "/home/xl269/.dtella/dtella/common/core.py", line 4418, in cb
   "No online nodes found.")
 File "/home/xl269/.dtella/dtella/client/main.py", line 278, in showLoginStatus
   LOG.debug(text)
 File "/usr/lib/python2.5/logging/__init__.py", line 971, in debug
   apply(self._log, (DEBUG, msg, args), kwargs)
 File "/usr/lib/python2.5/logging/__init__.py", line 1101, in _log
   self.handle(record)
 File "/usr/lib/python2.5/logging/__init__.py", line 1111, in handle
   self.callHandlers(record)
 File "/usr/lib/python2.5/logging/__init__.py", line 1148, in callHandlers
   hdlr.handle(record)
 File "/usr/lib/python2.5/logging/__init__.py", line 655, in handle
   self.emit(record)
 File "/usr/lib/python2.5/logging/__init__.py", line 757, in emit
   self.handleError(record)
 File "/usr/lib/python2.5/logging/__init__.py", line 706, in handleError
   traceback.print_exception(ei[0], ei[1], ei[2], None, sys.stderr)
 File "/usr/lib/python2.5/traceback.py", line 124, in print_exception
   _print(file, 'Traceback (most recent call last):')
 File "/usr/lib/python2.5/traceback.py", line 13, in _print
   file.write(str+terminator)
exceptions.IOError: [Errno 5] Input/output error

Original issue reported on code.google.com by sparkm...@gmail.com on 4 Jan 2009 at 1:39

GoogleCodeExporter commented 9 years ago
This should be fixed by r556, though I've never been able to exactly reproduce 
it.

Original comment by sparkm...@gmail.com on 5 Jan 2009 at 4:35