[New-bugs-announce] [issue25459] EAGAIN errors in Python logging module

Henrique Andrade report at bugs.python.org
Thu Oct 22 15:59:55 CEST 2015


New submission from Henrique Andrade:

There is a particular bug we hit when using the Python logging module very consistently under the particular settings in which we run one of our applications.

We are using Python 2.7.10 on RHEL7/RHEL6/Ubuntu14.04.

Anyways, here is the symptom:

Traceback (most recent call last):
  File "/opt/continuum/anaconda/lib/python2.7/logging/__init__.py", line 880, in emit
    stream.write(fs % msg)
IOError: [Errno 11] Resource temporarily unavailable

Here is the suggested fix:

26c26
< import sys, os, time, cStringIO, traceback, warnings, weakref, collections, errno
---
> import sys, os, time, cStringIO, traceback, warnings, weakref, collections
880,886c880
<                         while True:
< 			    try:
<                                 stream.write(fs % msg)
< 				break
<                             except IOError as e:
<                                 if e.errno != errno.EAGAIN:
< 				   raise
---
>                         stream.write(fs % msg)

----------
components: Extension Modules
messages: 253329
nosy: henrique_andrade
priority: normal
severity: normal
status: open
title: EAGAIN errors in Python logging module
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25459>
_______________________________________


More information about the New-bugs-announce mailing list