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

Created on 2008-07-07 00:45 by haypo, last changed 2008-08-17 23:06 by gregory.p.smith. This issue is now closed.

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

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

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
History
Date User Action Args
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:00haypocreate