[issue2564] Python hangs on FreeBSD7 in test_capi

Amaury Forgeot d'Arc report at bugs.python.org
Tue Apr 8 16:35:33 CEST 2008


Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:

I think that this problem is not FreeBSD specific:
- "import test.autotest" runs the whole test suite as a side-effect of
an import statement.
- in the test suite test_capi spawns threads, which also import.
- a lock ensues...

See for example test_threaded_import.py::

    if imp.lock_held():
        # This triggers on, e.g., from test import autotest.
        raise TestSkipped("can't run when import lock is held")

I the test_capi case, I think that the two imports in TestThreadState
should be moved outside the function.

Also, the backtrace file shows two other threads locked in a "import
socket" statement. I suspect problems in test_urllib2.py or
test_urllib2net.py...

----------
nosy: +amaury.forgeotdarc

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


More information about the Python-bugs-list mailing list