← Back to team overview

touch-packages team mailing list archive

[Bug 1081022] Re: logging.SysLogHandler doesn't close UNIX socket when connection failed

 

** Description changed:

  [Impact]
  Restarting rsyslog causing logging from python based daemons to lockup.
  
  [Test Case]
- == script
+ sudo apt-get install python-eventlet
+ == run this script script
  #!/usr/bin/env python
  
  import eventlet
  from logging.handlers import SysLogHandler
  import time
  import logging
  
  eventlet.patcher.monkey_patch(all=False, socket=True)
  
  logger = logging.getLogger('log')
  logger.addHandler(SysLogHandler('/dev/log'))
  
  while True:
-     print "send a message to logger"
-     logger.error("syslog test")
-     time.sleep(1)
+     print "send a message to logger"
+     logger.error("syslog test")
+     time.sleep(1)
  ==
- sudo service rsyslog stop ("send a message to logger" log messages will just stop)
+ sudo service rsyslog stop
+ sudo service rsyslog start
+ ("send a message to logger" log messages will just stop)
  
  [Regression Potential]
  The proposed fix is in all py2.7 versions > 12.04 right now and is not causing problems.
  
  [Original Bug Report]
  Python logging SysLogHandler to log into SysLog doesn't close UNIX-socket
  when connection failed. This bug is solved on the Python Issue Tracker at
  http://bugs.python.org/issue15179 and affects python package with version
  2.7.3-0ubuntu2 at Ubuntu 12.04 LTS.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to python2.7 in Ubuntu.
https://bugs.launchpad.net/bugs/1081022

Title:
  logging.SysLogHandler doesn't close UNIX socket when connection failed

Status in python2.7 package in Ubuntu:
  Fix Released
Status in python2.7 source package in Precise:
  New

Bug description:
  [Impact]
  Restarting rsyslog causing logging from python based daemons to lockup.

  [Test Case]
  sudo apt-get install python-eventlet
  == run this script script
  #!/usr/bin/env python

  import eventlet
  from logging.handlers import SysLogHandler
  import time
  import logging

  eventlet.patcher.monkey_patch(all=False, socket=True)

  logger = logging.getLogger('log')
  logger.addHandler(SysLogHandler('/dev/log'))

  while True:
      print "send a message to logger"
      logger.error("syslog test")
      time.sleep(1)
  ==
  sudo service rsyslog stop
  sudo service rsyslog start
  ("send a message to logger" log messages will just stop)

  [Regression Potential]
  The proposed fix is in all py2.7 versions > 12.04 right now and is not causing problems.

  [Original Bug Report]
  Python logging SysLogHandler to log into SysLog doesn't close UNIX-socket
  when connection failed. This bug is solved on the Python Issue Tracker at
  http://bugs.python.org/issue15179 and affects python package with version
  2.7.3-0ubuntu2 at Ubuntu 12.04 LTS.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/1081022/+subscriptions