[New-bugs-announce] [issue3200] Python's crash in heavy multithreading IO operations

Eric Sadit report at bugs.python.org
Wed Jun 25 19:27:53 CEST 2008

New submission from Eric Sadit <donsadit at gmail.com>:


I found a rare bug in heavy multithreading IO operations. The bug arises
under a stupid sequence of I/O operations. The sequence is not a normal
one, but the real problem is that the Python's interpreter crashes. The
correct behavior should be raise an IOError exception (I think).

The bug occurs when some thread closes a file or socket whilst other
thread tries to read or write from the same socket. The failure it's
inside the fileobject.c because tries to read or write the specified
data size inside a loop without check in every iteration if the object
is closed (it checks only outside the loop). The file object is set to
NULL and a SIGSEGV happens.

I'm a python developer (in the language, but not developer of the
language), so i really don't know anything about the best way to solve
this issue, and how the project it's managed. I can develop an script to
raise this bug if anyone it's interested in this problem. I'm already
owns one, but I don't find it, and the real program that arises the
error was rewritten so i don't have it.


Eric Sadit

components: Interpreter Core, Library (Lib)
messages: 68736
nosy: sadit
severity: normal
status: open
title: Python's crash in heavy multithreading IO operations
type: crash
versions: Python 2.3, Python 2.4, Python 2.5

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list