This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: AttributeError: 'long' object has no attribute 'release' in Queue.put()
Type: crash Stage:
Components: Versions: Python 2.7
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, pitrou
Priority: normal Keywords:

Created on 2013-05-09 06:13 by georg.brandl, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg188753 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2013-05-09 06:13
I'm a bit puzzled by this exception in a long-running process
(running on Python 2.7.3):

...
  File "/usr/lib/python2.7/Queue.py", line 138, in put
    self.not_empty.notify()
        item                 = ('message', '\x80\x02]q\x01(U\x05nicosq\x02GA\xd4b\xccu\xb0\xc0\xcaK\x15U\x01\nNU\x00e.')
        self                 = <Queue.Queue instance at 0x7f1d9c1c9e18>
        block                = False
        timeout              = None

  File "/usr/lib/python2.7/threading.py", line 288, in notify
    waiter.release()
        waiter               = 7128680L
        self                 = <Condition(<thread.lock object at 0x24a5590>, 1)>
        _Condition__waiters  = [7128680L]
        waiters              = [7128680L]
        n                    = 1

AttributeError: 'long' object has no attribute 'release'


As far as I can see, there should only ever be lock objects in the self.__waiters list.  Does anyone see a possible reason for the long object to end up there?  (Sadly I can't debug the process anymore.)
msg188770 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-05-09 12:27
Waiters are created through _allocate_lock(), so you should look there.

But, unless you have further info, I don't think keeping this open as a bug is useful.
msg189394 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2013-05-16 18:00
We've now found a wrongful section in C code releasing the GIL in spite of calling Python malloc functions, and I'm going to blame this failure on that.
History
Date User Action Args
2022-04-11 14:57:45adminsetgithub: 62143
2013-05-16 18:00:09georg.brandlsetstatus: open -> closed
resolution: rejected
messages: + msg189394
2013-05-09 12:27:28pitrousetmessages: + msg188770
2013-05-09 06:13:39georg.brandlcreate