← Back to team overview

touch-packages team mailing list archive

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

 

This bug was fixed in the package python2.7 - 2.7.3-0ubuntu3.6

---------------
python2.7 (2.7.3-0ubuntu3.6) precise-proposed; urgency=medium

  * Ensure failed connections to /dev/log are full closed, preventing
    infinite loop on logging applications due to socket state (LP: #1081022):
    - d/p/syslog.diff: Cherry picked fix from upstream bugtracker.
 -- James Page <james.page@xxxxxxxxxx>   Thu, 18 Dec 2014 12:05:28 +0000

** Changed in: python2.7 (Ubuntu Precise)
       Status: Fix Committed => Fix Released

-- 
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:
  Fix Released

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