[issue1731] Random errors on interpreter shutdown

Thomas Dybdahl Ahle report at bugs.python.org
Fri Jan 4 00:28:41 CET 2008


New submission from Thomas Dybdahl Ahle:

I have a pygtk program, that uses a fairly lot of threads in a pool. All
of these threads are setDaemon to ensure the application shuts down when
I call gtk.main_quit()

About every second time I close the app, I get one or more errors from
places in the program where a thread seams to have woken up, and now
find all attributes None.

This time I even got a message relating til the GIL:

...
for errortype in (IOError, LogOnError, socket.error, EOFError):
exceptions.AttributeError 'NoneType' object has no attribute 'error'
python: Python/pystate.c:497: PyGILState_Ensure: Assertion (assertion)
'autoInterpreterState' failed.
Afbrudt (SIGABRT)

the socket reference simply comes from "import socket" in the beginning
of the module.

As the errors only occur during application shutdown, it has no
practical effect, but it confuses users to post tons of bug reports.

----------
components: Interpreter Core
messages: 59174
nosy: lobais
severity: normal
status: open
title: Random errors on interpreter shutdown
type: behavior
versions: Python 2.4

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1731>
__________________________________


More information about the Python-bugs-list mailing list