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.

Author christian.heimes
Recipients Karemir, christian.heimes, gvanrossum
Date 2007-11-21.04:55:58
SpamBayes Score 0.08096259
Marked as misclassified No
Message-id <1195620960.92.0.70816786301.issue1306@psf.upfronthosting.co.za>
In-reply-to
Content
The patch solves one issue. It resets the Py_DefaultFileSystemEncoding
to NULL when no default value was given. However the finalization fails
after the 3rd round at 

        if (op == &refchain ||
            op->_ob_prev->_ob_next != op || op->_ob_next->_ob_prev != op)
                Py_FatalError("UNREF invalid object");

$ gdb ./reinit_test
GNU gdb 6.6-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(gdb) run
Starting program: /home/heimes/dev/python/py3k/reinit_test
[Thread debugging using libthread_db enabled]
[New Thread -1210464064 (LWP 8060)]
round 1
[23832 refs]
round 2
[24558 refs]
round 3
Fatal Python error: UNREF invalid object

Program received signal SIGABRT, Aborted.
[Switching to Thread -1210464064 (LWP 8060)]
0xffffe410 in __kernel_vsyscall ()
(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7dc7875 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7dc9201 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0x0805d62d in Py_FatalError (msg=0x81790d8 "UNREF invalid object")
at Python/pythonrun.c:1761
#4  0x080aac57 in _Py_ForgetReference (op=0x821d728) at
Objects/object.c:1536
#5  0x080aaca6 in _Py_Dealloc (op=0x821d728) at Objects/object.c:1555
#6  0x080c0f52 in tupledealloc (op=0x82ebc3c) at Objects/tupleobject.c:169
#7  0x080aacb1 in _Py_Dealloc (op=0x82ebc3c) at Objects/object.c:1556
#8  0x080c0f52 in tupledealloc (op=0x83f9154) at Objects/tupleobject.c:169
#9  0x080aacb1 in _Py_Dealloc (op=0x83f9154) at Objects/object.c:1556
#10 0x08083605 in code_dealloc (co=0x83b1bc8) at Objects/codeobject.c:276
#11 0x080aacb1 in _Py_Dealloc (op=0x83b1bc8) at Objects/object.c:1556
#12 0x081691bf in func_dealloc (op=0x83f7924) at Objects/funcobject.c:555
#13 0x080aacb1 in _Py_Dealloc (op=0x83f7924) at Objects/object.c:1556
#14 0x080a272e in PyDict_Clear (op=0x83f6df4) at Objects/dictobject.c:798
#15 0x080a524f in dict_tp_clear (op=0x83f6df4) at Objects/dictobject.c:1793
#16 0x08068c13 in delete_garbage (collectable=0xbf9fa024, old=0x81978e8)
at Modules/gcmodule.c:688
#17 0x0806909f in collect (generation=2) at Modules/gcmodule.c:824
#18 0x080699ea in PyGC_Collect () at Modules/gcmodule.c:1238
#19 0x0805a022 in Py_Finalize () at Python/pythonrun.c:416
#20 0x08059791 in main () at reinit_test.c:9
(gdb)
Files
File name Uploaded
py3k_reinit.patch christian.heimes, 2007-11-21.04:55:59
History
Date User Action Args
2007-11-21 04:56:01christian.heimessetspambayes_score: 0.0809626 -> 0.08096259
recipients: + christian.heimes, gvanrossum, Karemir
2007-11-21 04:56:00christian.heimessetspambayes_score: 0.0809626 -> 0.0809626
messageid: <1195620960.92.0.70816786301.issue1306@psf.upfronthosting.co.za>
2007-11-21 04:56:00christian.heimeslinkissue1306 messages
2007-11-21 04:55:59christian.heimescreate