Bugs item #1080660, was opened at 2004-12-07 09:48 Message generated for change (Comment added) made by rhettinger You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1080660&group_id=5470
Category: Threads Group: Python 2.3 Status: Open Resolution: None Priority: 5 Submitted By: John Speno (corvus) >Assigned to: Tim Peters (tim_one) Summary: thread.error: release unlocked lock on Queue put Initial Comment: System is Python 2.3.3 on Solaris 9. I'm using the classic Python thread model. Main thread puts stuff into a Queue.Queue() and worker threads get stuff out of it and do their thing. On occaision, I get an exception in the main thread when it tries to put something into the Queue. File "/usr/local/bin/poller.py", line 47, in fragnap_it work_queue.put((foo, bar, baz)) File "/usr/local/lib/python2.3/Queue.py", line 106, in put self.fsema.release() thread.error: release unlocked lock This error still happens intermittently, and I haven't been able to reduce it to a simple case. I can alter my applications to do something useful for debugging this problem when it happens, if you can figure out what "something useful" would be. Just let me know. The queue is unbounded, and I'm using blocking get/put. The main thread creates 20 worker threads, and 1 recorder thread. Then it puts upto 1500 items in the Queue.Queue named work_queue. The 20 worker threads take stuff out work_queue, process some using pure python code, or others by using subprocess.py. Results from the workers are put into another Queue.Queue named results_queue. The Recorder thread gets from the results_queue and writes stuff to a MySQL db. I've never seen the error happen when putting into the results_queue, only from the main thread putting into the work_queue. Thread defines in my python config.h are: #define HAVE_PTHREAD_H 1 #define HAVE_PTHREAD_SIGMASK 1 #define HAVE_THREAD_H 1 #define PTHREAD_SYSTEM_SCHED_SUPPORTED 1 #define SIZEOF_PTHREAD_T 4 #define WITH_THREAD 1 And all the thread related python tests (test_thread, test_threading, and test_queue) pass. ---------------------------------------------------------------------- >Comment By: Raymond Hettinger (rhettinger) Date: 2004-12-10 12:35 Message: Logged In: YES user_id=80475 Tim, was this something you already fixed in Py2.4? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1080660&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com