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.

Title: missing lock release in BZ2File_iternext()
Type: behavior Stage:
Components: Library (Lib) Versions: Python 2.5
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: gregory.p.smith Nosy List: gregory.p.smith, vstinner
Priority: normal Keywords: easy, patch

Created on 2008-07-07 00:45 by vstinner, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
bz2_lock.patch vstinner, 2008-07-07 00:45 Patch to fix described bug
Messages (3)
msg69362 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2008-07-07 00:45
Call BZ2File_iternext() on closed file doesn't release the lock.

import bz2
obj = bz2.BZ2File('/etc/issue')
    # acquire the lock
except ValueError, err:
    # but don't release the lock
    print err
# DEAD LOCK here

Attached patch fixes this bug.
msg69371 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2008-07-07 04:33
Fixed in trunk r64767.

Needs backporting to release25-maint.
msg71299 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2008-08-17 23:06
backported to release25-maint in r65790
Date User Action Args
2022-04-11 14:56:36adminsetgithub: 47559
2008-08-17 23:06:42gregory.p.smithsetstatus: open -> closed
messages: + msg71299
2008-07-07 04:33:16gregory.p.smithsettype: behavior
resolution: accepted
messages: + msg69371
versions: + Python 2.5, - Python 2.6
2008-07-07 04:24:27gregory.p.smithsetpriority: normal
assignee: gregory.p.smith
keywords: + easy
nosy: + gregory.p.smith
2008-07-07 00:46:00vstinnercreate