[ python-Bugs-1176467 ] Python garbage collector isn't detecting deadlocks
Bugs item #1176467, was opened at 2005-04-04 09:29 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1176467&group_id=5470 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nathan Marushak (nmarushak) Assigned to: Nobody/Anonymous (nobody) Summary: Python garbage collector isn't detecting deadlocks Initial Comment: BACKGROUND INFORMATION: Python version: Python 2.3.3 (#1, May 7 2004, 10:31:40) Operating System: Linux 2.6.7-1.494.2.2smp #1 SMP Tue Aug 3 09:59:49 EDT 2004 i686 i686 i386 GNU/Linux PROBLEM: The 2.3.3 garbage collector does not appear to detect deadlocks that occur when 2 objects reference one another. I checked the existing bug list, albeit briefly, to see if a similar bug had already been entered. I did not find an existing entry, but I apologize if this is a duplicate. I've attached a short example output file that demonstrates the issue. It would be beneficial if the "gc" module could detect when 2 objects have no other outstanding references except to one another. If modifying gc is not possible for some reason, then updating the Python gc documentation to illustrate this issue would be helpful. WORKAROUND: The problem can be worked around by ensuring each object removes the circular reference when it no longer needs to refer to the other object. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1176467&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1176467 ] Python garbage collector isn't detecting deadlocks
Bugs item #1176467, was opened at 2005-04-04 16:29 Message generated for change (Comment added) made by nascheme You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1176467&group_id=5470 Category: None Group: None >Status: Closed >Resolution: Invalid Priority: 5 Submitted By: Nathan Marushak (nmarushak) >Assigned to: Neil Schemenauer (nascheme) Summary: Python garbage collector isn't detecting deadlocks Initial Comment: BACKGROUND INFORMATION: Python version: Python 2.3.3 (#1, May 7 2004, 10:31:40) Operating System: Linux 2.6.7-1.494.2.2smp #1 SMP Tue Aug 3 09:59:49 EDT 2004 i686 i686 i386 GNU/Linux PROBLEM: The 2.3.3 garbage collector does not appear to detect deadlocks that occur when 2 objects reference one another. I checked the existing bug list, albeit briefly, to see if a similar bug had already been entered. I did not find an existing entry, but I apologize if this is a duplicate. I've attached a short example output file that demonstrates the issue. It would be beneficial if the "gc" module could detect when 2 objects have no other outstanding references except to one another. If modifying gc is not possible for some reason, then updating the Python gc documentation to illustrate this issue would be helpful. WORKAROUND: The problem can be worked around by ensuring each object removes the circular reference when it no longer needs to refer to the other object. -- >Comment By: Neil Schemenauer (nascheme) Date: 2005-04-04 18:22 Message: Logged In: YES user_id=35752 The gc is working as intended and as documented. Please refer to the gc module documentation, especially the section on the "garbage" attribute. Your objects are not collected because they have __del__ methods. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1176467&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1175396 ] codecs.readline sometimes removes newline chars
Bugs item #1175396, was opened at 2005-04-02 17:14 Message generated for change (Comment added) made by doerwalter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1175396&group_id=5470 Category: Python Library Group: Python 2.4 >Status: Closed >Resolution: Accepted Priority: 5 Submitted By: Irmen de Jong (irmen) Assigned to: Walter Dörwald (doerwalter) Summary: codecs.readline sometimes removes newline chars Initial Comment: In Python 2.4.1 i observed a new bug in codecs.readline, it seems that with certain inputs it removes newline characters from the end of the line Probably related to bug #1076985 (Incorrect behaviour of StreamReader.readline leads to crash) and bug #1098990 codec readline() splits lines apart (both with status closed) so I'm assigning this to Walter. See the attached files that demonstrate the problem. Reproduced with Python 2.4.1 on windows XP and on Linux. The problem does not occur with Python 2.4. (btw, it seems bug #1076985 was fixed in python 2.4.1, but the other one (#1098990) not? ) -- >Comment By: Walter Dörwald (doerwalter) Date: 2005-04-05 00:01 Message: Logged In: YES user_id=89016 Checked in a fix as: Lib/codecs.py 1.42/1.43 Lib/test/test_codecs.py 1.22 Lib/codecs.py 1.35.2.6 Lib/test/test_codecs.py 1.15.2.4 Are you really sure, that the fix for #1098990 is not in 2.4.1? According to the tracker for #1098990 the fix was in lib/codecs.py revision 1.35.2.2 and revision 1.35.2.3 is the one that got the r241c1 tag, so the fix should be in 2.4.1. -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1175396&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1168983 ] ftplib.py string index out of range
Bugs item #1168983, was opened at 2005-03-23 02:05 Message generated for change (Comment added) made by isandler You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1168983&group_id=5470 Category: Python Library Group: Python 2.4 Status: Open Resolution: None Priority: 5 Submitted By: David Carroll (vmlinuxz) Assigned to: Nobody/Anonymous (nobody) Summary: ftplib.py string index out of range Initial Comment: The following code works great on all of the 2.3.x releases I have used. def ftpFetch(localPath,remoteFileDate,ftpSite,ftpPass,ftpDir,ftpUser): print "Fetching split_mgr report" fileList=[] processList=[] ftp = FTP(ftpSite) ftp.login(ftpUser,ftpPass) ftp.dir('LIST '+ftpDir,fileList.append) for x in range(len(fileList)): if (string.find(fileList[x],remoteFileDate) != -1): print fileList[x] TMP=fileList[x] output=localPath+str(TMP[45:]) print output processList.append(output) print processList outfile = open(output,'w') ftp.retrbinary('RETR '+ftpDir+TMP[45:], open(output, 'wb').write) ftp.quit() print processList return processList However I get the following error under 2.4 Traceback (most recent call last): File "C:\Python24\lib\site-packages\PythonCard\widget.py", line 417, in _dispatch handler(background, aWxEvent) File "C:\Documents and Settings\PROTECTED\Desktop\ReadWaitReport\ReadWaitReport\readwaitreport.py", line 61, in on_btnRun_command mainRwclassLoop(self, mm+dd+yy, yesterday) File "C:\Documents and Settings\PROTECTED\Desktop\ReadWaitReport\ReadWaitReport\rwclass.py", line 39, in mainRwclassLoop processList = ftpFetch(localPath,"split_mgr."+date[0:4],ftpSite,ftpPass,ftpDir,ftpUser) File "C:\Documents and Settings\PROTECTED\Desktop\ReadWaitReport\ReadWaitReport\rwclass.py", line 173, in ftpFetch ftp.dir('LIST '+ftpDir,fileList.append) File "C:\Python24\lib\ftplib.py", line 464, in dir self.retrlines(cmd, func) File "C:\Python24\lib\ftplib.py", line 396, in retrlines conn = self.transfercmd(cmd) File "C:\Python24\lib\ftplib.py", line 345, in transfercmd return self.ntransfercmd(cmd, rest)[0] File "C:\Python24\lib\ftplib.py", line 328, in ntransfercmd if resp[0] != '1': IndexError: string index out of range https://lists.dulug.duke.edu/pipermail/yum/2004-August/005067.html discusses a similar problem under Linux in the YUM script, I have reproduced this error under 2000, and XP. I'm a fairly new programmer, and thus very new to python so I hope this is enough information. I will try and keep track of this and help out with more information in any capacity I can. Thank you for all your hard work and dedication. David Carroll -- Comment By: Ilya Sandler (isandler) Date: 2005-04-04 19:12 Message: Logged In: YES user_id=971153 Could you submit a minimalistic piece of code which illustrates the problem? As well as any input data which are required to reproduce it? (SourceForge garbled your original example) -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1168983&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1168983 ] ftplib.py string index out of range
Bugs item #1168983, was opened at 2005-03-23 05:05 Message generated for change (Settings changed) made by rhettinger You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1168983&group_id=5470 Category: Python Library Group: Python 2.4 Status: Open Resolution: None Priority: 5 Submitted By: David Carroll (vmlinuxz) >Assigned to: Raymond Hettinger (rhettinger) Summary: ftplib.py string index out of range Initial Comment: The following code works great on all of the 2.3.x releases I have used. def ftpFetch(localPath,remoteFileDate,ftpSite,ftpPass,ftpDir,ftpUser): print "Fetching split_mgr report" fileList=[] processList=[] ftp = FTP(ftpSite) ftp.login(ftpUser,ftpPass) ftp.dir('LIST '+ftpDir,fileList.append) for x in range(len(fileList)): if (string.find(fileList[x],remoteFileDate) != -1): print fileList[x] TMP=fileList[x] output=localPath+str(TMP[45:]) print output processList.append(output) print processList outfile = open(output,'w') ftp.retrbinary('RETR '+ftpDir+TMP[45:], open(output, 'wb').write) ftp.quit() print processList return processList However I get the following error under 2.4 Traceback (most recent call last): File "C:\Python24\lib\site-packages\PythonCard\widget.py", line 417, in _dispatch handler(background, aWxEvent) File "C:\Documents and Settings\PROTECTED\Desktop\ReadWaitReport\ReadWaitReport\readwaitreport.py", line 61, in on_btnRun_command mainRwclassLoop(self, mm+dd+yy, yesterday) File "C:\Documents and Settings\PROTECTED\Desktop\ReadWaitReport\ReadWaitReport\rwclass.py", line 39, in mainRwclassLoop processList = ftpFetch(localPath,"split_mgr."+date[0:4],ftpSite,ftpPass,ftpDir,ftpUser) File "C:\Documents and Settings\PROTECTED\Desktop\ReadWaitReport\ReadWaitReport\rwclass.py", line 173, in ftpFetch ftp.dir('LIST '+ftpDir,fileList.append) File "C:\Python24\lib\ftplib.py", line 464, in dir self.retrlines(cmd, func) File "C:\Python24\lib\ftplib.py", line 396, in retrlines conn = self.transfercmd(cmd) File "C:\Python24\lib\ftplib.py", line 345, in transfercmd return self.ntransfercmd(cmd, rest)[0] File "C:\Python24\lib\ftplib.py", line 328, in ntransfercmd if resp[0] != '1': IndexError: string index out of range https://lists.dulug.duke.edu/pipermail/yum/2004-August/005067.html discusses a similar problem under Linux in the YUM script, I have reproduced this error under 2000, and XP. I'm a fairly new programmer, and thus very new to python so I hope this is enough information. I will try and keep track of this and help out with more information in any capacity I can. Thank you for all your hard work and dedication. David Carroll -- Comment By: Ilya Sandler (isandler) Date: 2005-04-04 21:12 Message: Logged In: YES user_id=971153 Could you submit a minimalistic piece of code which illustrates the problem? As well as any input data which are required to reproduce it? (SourceForge garbled your original example) -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1168983&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1168983 ] ftplib.py string index out of range
Bugs item #1168983, was opened at 2005-03-23 02:05 Message generated for change (Comment added) made by isandler You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1168983&group_id=5470 Category: Python Library Group: Python 2.4 Status: Open Resolution: None Priority: 5 Submitted By: David Carroll (vmlinuxz) Assigned to: Raymond Hettinger (rhettinger) Summary: ftplib.py string index out of range Initial Comment: The following code works great on all of the 2.3.x releases I have used. def ftpFetch(localPath,remoteFileDate,ftpSite,ftpPass,ftpDir,ftpUser): print "Fetching split_mgr report" fileList=[] processList=[] ftp = FTP(ftpSite) ftp.login(ftpUser,ftpPass) ftp.dir('LIST '+ftpDir,fileList.append) for x in range(len(fileList)): if (string.find(fileList[x],remoteFileDate) != -1): print fileList[x] TMP=fileList[x] output=localPath+str(TMP[45:]) print output processList.append(output) print processList outfile = open(output,'w') ftp.retrbinary('RETR '+ftpDir+TMP[45:], open(output, 'wb').write) ftp.quit() print processList return processList However I get the following error under 2.4 Traceback (most recent call last): File "C:\Python24\lib\site-packages\PythonCard\widget.py", line 417, in _dispatch handler(background, aWxEvent) File "C:\Documents and Settings\PROTECTED\Desktop\ReadWaitReport\ReadWaitReport\readwaitreport.py", line 61, in on_btnRun_command mainRwclassLoop(self, mm+dd+yy, yesterday) File "C:\Documents and Settings\PROTECTED\Desktop\ReadWaitReport\ReadWaitReport\rwclass.py", line 39, in mainRwclassLoop processList = ftpFetch(localPath,"split_mgr."+date[0:4],ftpSite,ftpPass,ftpDir,ftpUser) File "C:\Documents and Settings\PROTECTED\Desktop\ReadWaitReport\ReadWaitReport\rwclass.py", line 173, in ftpFetch ftp.dir('LIST '+ftpDir,fileList.append) File "C:\Python24\lib\ftplib.py", line 464, in dir self.retrlines(cmd, func) File "C:\Python24\lib\ftplib.py", line 396, in retrlines conn = self.transfercmd(cmd) File "C:\Python24\lib\ftplib.py", line 345, in transfercmd return self.ntransfercmd(cmd, rest)[0] File "C:\Python24\lib\ftplib.py", line 328, in ntransfercmd if resp[0] != '1': IndexError: string index out of range https://lists.dulug.duke.edu/pipermail/yum/2004-August/005067.html discusses a similar problem under Linux in the YUM script, I have reproduced this error under 2000, and XP. I'm a fairly new programmer, and thus very new to python so I hope this is enough information. I will try and keep track of this and help out with more information in any capacity I can. Thank you for all your hard work and dedication. David Carroll -- Comment By: Ilya Sandler (isandler) Date: 2005-04-04 20:37 Message: Logged In: YES user_id=971153 It turns out that the code in plain text bug report is more or less readable, so I can see what you were trying to do... Seems like you are doing ftp.dir("LIST "+ftpDir) But ftplib docs: http://www.python.org/doc/current/lib/ftp-objects.html say that you need to specify the directory ftp.dir(ftpDir) so it seems that you are using ftp.dir() incorrectly But, even then IndexError seems like a wrong kind of exception for this kind of error... So, I guess, my original request for a working code snippet which would allow to reproduce the bug still stands.. -- Comment By: Ilya Sandler (isandler) Date: 2005-04-04 19:12 Message: Logged In: YES user_id=971153 Could you submit a minimalistic piece of code which illustrates the problem? As well as any input data which are required to reproduce it? (SourceForge garbled your original example) -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1168983&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[ python-Bugs-1168983 ] ftplib.py string index out of range
Bugs item #1168983, was opened at 2005-03-23 05:05 Message generated for change (Comment added) made by rhettinger You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1168983&group_id=5470 Category: Python Library Group: Python 2.4 Status: Open Resolution: None Priority: 5 Submitted By: David Carroll (vmlinuxz) >Assigned to: Nobody/Anonymous (nobody) Summary: ftplib.py string index out of range Initial Comment: The following code works great on all of the 2.3.x releases I have used. def ftpFetch(localPath,remoteFileDate,ftpSite,ftpPass,ftpDir,ftpUser): print "Fetching split_mgr report" fileList=[] processList=[] ftp = FTP(ftpSite) ftp.login(ftpUser,ftpPass) ftp.dir('LIST '+ftpDir,fileList.append) for x in range(len(fileList)): if (string.find(fileList[x],remoteFileDate) != -1): print fileList[x] TMP=fileList[x] output=localPath+str(TMP[45:]) print output processList.append(output) print processList outfile = open(output,'w') ftp.retrbinary('RETR '+ftpDir+TMP[45:], open(output, 'wb').write) ftp.quit() print processList return processList However I get the following error under 2.4 Traceback (most recent call last): File "C:\Python24\lib\site-packages\PythonCard\widget.py", line 417, in _dispatch handler(background, aWxEvent) File "C:\Documents and Settings\PROTECTED\Desktop\ReadWaitReport\ReadWaitReport\readwaitreport.py", line 61, in on_btnRun_command mainRwclassLoop(self, mm+dd+yy, yesterday) File "C:\Documents and Settings\PROTECTED\Desktop\ReadWaitReport\ReadWaitReport\rwclass.py", line 39, in mainRwclassLoop processList = ftpFetch(localPath,"split_mgr."+date[0:4],ftpSite,ftpPass,ftpDir,ftpUser) File "C:\Documents and Settings\PROTECTED\Desktop\ReadWaitReport\ReadWaitReport\rwclass.py", line 173, in ftpFetch ftp.dir('LIST '+ftpDir,fileList.append) File "C:\Python24\lib\ftplib.py", line 464, in dir self.retrlines(cmd, func) File "C:\Python24\lib\ftplib.py", line 396, in retrlines conn = self.transfercmd(cmd) File "C:\Python24\lib\ftplib.py", line 345, in transfercmd return self.ntransfercmd(cmd, rest)[0] File "C:\Python24\lib\ftplib.py", line 328, in ntransfercmd if resp[0] != '1': IndexError: string index out of range https://lists.dulug.duke.edu/pipermail/yum/2004-August/005067.html discusses a similar problem under Linux in the YUM script, I have reproduced this error under 2000, and XP. I'm a fairly new programmer, and thus very new to python so I hope this is enough information. I will try and keep track of this and help out with more information in any capacity I can. Thank you for all your hard work and dedication. David Carroll -- >Comment By: Raymond Hettinger (rhettinger) Date: 2005-04-04 23:31 Message: Logged In: YES user_id=80475 I fixed the IndexError. It should have been a protocol error. See Lib/ftplib.py 1.74. Leaving the bug open so the OP can make a more detailed post so we can see what the root issue is about. -- Comment By: Ilya Sandler (isandler) Date: 2005-04-04 22:37 Message: Logged In: YES user_id=971153 It turns out that the code in plain text bug report is more or less readable, so I can see what you were trying to do... Seems like you are doing ftp.dir("LIST "+ftpDir) But ftplib docs: http://www.python.org/doc/current/lib/ftp-objects.html say that you need to specify the directory ftp.dir(ftpDir) so it seems that you are using ftp.dir() incorrectly But, even then IndexError seems like a wrong kind of exception for this kind of error... So, I guess, my original request for a working code snippet which would allow to reproduce the bug still stands.. -- Comment By: Ilya Sandler (isandler) Date: 2005-04-04 21:12 Message: Logged In: YES user_id=971153 Could you submit a minimalistic piece of code which illustrates the problem? As well as any input data which are required to reproduce it? (SourceForge garbled your original example) -- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1168983&group_id=5470 ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com