[ python-Bugs-1010777 ] test_queue fails occasionally
SourceForge.net
noreply at sourceforge.net
Wed Aug 18 04:43:37 CEST 2004
Bugs item #1010777, was opened at 2004-08-17 10:54
Message generated for change (Comment added) made by tim_one
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1010777&group_id=5470
Category: Threads
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Michael Hudson (mwh)
Assigned to: Tim Peters (tim_one)
Summary: test_queue fails occasionally
Initial Comment:
I guess this is some kind of race condition. I see
test_queue fail about 5% of the time (judged by running
./python ../Lib/test/regrtest.py test_queue test_queue
test_queue test_queue ... with a couple of hundred
test_queue's, but I've seen it fail as part of a more
normal test run too).
It's always this failure:
test test_queue failed -- blocking function '<bound
method FailingQueue.put of
<test.test_queue.FailingQueue instance at 0x4041b184>>'
appeared not to block
and then, at least sometimes, you get this traceback:
Exception in thread Thread-3408:
Traceback (most recent call last):
File
"/home/mwh/src/python/dist/src/Lib/threading.py", line
442, in __bootstrap
self.run()
File
"/home/mwh/src/python/dist/src/Lib/test/test_queue.py",
line 23, in run
self.fn(*self.args)
File "/home/mwh/src/python/dist/src/Lib/Queue.py",
line 129, in get
item = self._get()
File
"/home/mwh/src/python/dist/src/Lib/test/test_queue.py",
line 58, in _get
return Queue.Queue._get(self)
AttributeError: 'NoneType' object has no attribute 'Queue'
somewhat later, usually while a subsequent test is running.
This is a debug build from CVS as of an hour or so back
on Redhat Linux 9 (so, in particular, with the NPTL
threading libray, not LinuxThreads).
----------------------------------------------------------------------
>Comment By: Tim Peters (tim_one)
Date: 2004-08-17 22:43
Message:
Logged In: YES
user_id=31435
FYI, Guido and I first noticed that test_queue sometimes fails
a few years ago. It's apparently much more likely to fail on a
non-Windows box, perhaps because Windows is happy to
switch threads frequently. I ran it for half an hour today on
a WinXP box, and it didn't fail at all. IIRC, it's not easy to fix -
- there are threads, and some of the coordination is done via
time.sleep() calls.
I'll leave this assigned to me for a few more days, but it's
unlikely I'll find time to "do something" about it.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1010777&group_id=5470
More information about the Python-bugs-list
mailing list