Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue21802

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:Reader of BufferedRWPair is not closed if writer's close() fails
Type:behaviorStage:resolved
Components:IOVersions:Python 3.4, Python 3.5, Python 2.7
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To: serhiy.storchakaNosy List: benjamin.peterson, martin.panter, pitrou, python-dev, serhiy.storchaka, stutzbach
Priority:normalKeywords:patch

Created on2014-06-18 17:52 byserhiy.storchaka, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
bufferedrwpair_close.patchserhiy.storchaka,2014-06-18 17:52review
bufferedrwpair_close_2.patchserhiy.storchaka,2014-11-25 07:41review
Messages (6)
msg220945 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2014-06-18 17:52
Current implementation of BufferedRWPair.close() is:    def close(self):        self.writer.close()        self.reader.close()When self.writer.close() raises an exception, self.reader left non-closed. This can cause file description leak unless GC sweep it.Proposed patch fixes this issue. With applied patch forissue21715 it would be a little simpler.
msg224000 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2014-07-25 20:47
Antoine, what do you think about this?
msg231595 -(view)Author: Antoine Pitrou (pitrou)*(Python committer)Date: 2014-11-24 10:00
Why don't you reuse the API fromissue21715?
msg231641 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2014-11-25 07:41
Because this API was not still committed. Here is a patch which uses it.
msg234268 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2015-01-18 20:05
Ping.If this patch will be accepted I'll provide larger patch for similar issues in close methods of other classes.
msg239182 -(view)Author: Roundup Robot (python-dev)(Python triager)Date: 2015-03-24 21:24
New changesetd4694c672c36 by Serhiy Storchaka in branch '3.4':Issue#21802: The reader in BufferedRWPair now is closed even when closinghttps://hg.python.org/cpython/rev/d4694c672c36New changesetf515c7ccff57 by Serhiy Storchaka in branch 'default':Issue#21802: The reader in BufferedRWPair now is closed even when closinghttps://hg.python.org/cpython/rev/f515c7ccff57New changesetdcf25060cae8 by Serhiy Storchaka in branch '2.7':Issue#21802: The reader in BufferedRWPair now is closed even when closinghttps://hg.python.org/cpython/rev/dcf25060cae8
History
DateUserActionArgs
2022-04-11 14:58:05adminsetgithub: 66001
2015-03-24 21:24:54serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2015-03-24 21:24:33python-devsetnosy: +python-dev
messages: +msg239182
2015-03-24 21:01:59serhiy.storchakasetassignee:serhiy.storchaka
2015-03-20 02:47:50martin.pantersetnosy: +martin.panter
2015-01-18 20:05:49serhiy.storchakasetmessages: +msg234268
2014-11-25 07:41:18serhiy.storchakasetfiles: +bufferedrwpair_close_2.patch

messages: +msg231641
2014-11-24 10:00:20pitrousetmessages: +msg231595
2014-07-25 20:47:34serhiy.storchakasetmessages: +msg224000
2014-06-18 17:52:22serhiy.storchakacreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp