Message57338
I'm still able to reproduce the bug in Python 2.5 (svn) and 2.6 (trunk).
import thread
f=open("tmp1", "w")
def worker():
global f
while 1:
f.close()
f=open("tmp1", "w")
f.seek(0,0)
thread.start_new_thread(worker, ())
thread.start_new_thread(worker, ())
Unhandled exception in thread started by <function worker at 0xb7d01aac>
Traceback (most recent call last):
*** glibc detected *** ./python: malloc(): memory corruption: 0xb7efc008 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6[0xb7dbe636]
/lib/tls/i686/cmov/libc.so.6(__libc_malloc+0x90)[0xb7dbffc0]
/lib/tls/i686/cmov/libc.so.6[0xb7dad03f]
/lib/tls/i686/cmov/libc.so.6(fopen64+0x2c)[0xb7daf61c]
./python(PyTraceBack_Print+0x1a4)[0x80ef0f4]
./python(PyErr_Display+0x76)[0x80e73a6]
./python[0x80ed80d]
./python(PyObject_Call+0x27)[0x805c927]
./python(PyEval_CallObjectWithKeywords+0x6c)[0x80c151c]
./python(PyErr_PrintEx+0xbe)[0x80e7e9e]
./python[0x80f37b1]
/lib/tls/i686/cmov/libpthread.so.0[0xb7ed146b]
/lib/tls/i686/cmov/libc.so.6(clone+0x5e)[0xb7e276de]
======= Memory map: ========
08048000-0813d000 r-xp 00000000 fe:01 10586072
/home/heimes/dev/python/release25-maint/python
0813d000-08162000 rw-p 000f4000 fe:01 10586072
/home/heimes/dev/python/release25-maint/python
08162000-081fe000 rw-p 08162000 00:00 0 [heap]
b6a00000-b6a21000 rw-p b6a00000 00:00 0
b6a21000-b6b00000 ---p b6a21000 00:00 0
b6bc1000-b6bc2000 ---p b6bc1000 00:00 0
b6bc2000-b73c2000 rw-p b6bc2000 00:00 0
b73c2000-b73c3000 ---p b73c2000 00:00 0
b73c3000-b7bc3000 rw-p b73c3000 00:00 0
b7bc3000-b7bff000 r-xp 00000000 08:05 325941 /lib/libncurses.so.5.6
b7bff000-b7c07000 rw-p 0003b000 08:05 325941 /lib/libncurses.so.5.6
b7c07000-b7c4e000 r-xp 00000000 08:05 325837 /lib/libncursesw.so.5.6
b7c4e000-b7c56000 rw-p 00046000 08:05 325837 /lib/libncursesw.so.5.6
b7c56000-b7c82000 r-xp 00000000 08:05 325955 /lib/libreadline.so.5.2
b7c82000-b7c86000 rw-p 0002c000 08:05 325955 /lib/libreadline.so.5.2
b7c86000-b7c87000 rw-p b7c86000 00:00 0
b7c87000-b7c8a000 r-xp 00000000 fe:01 10716611
/home/heimes/dev/python/release25-maint/build/lib.linux-i686-2.5/readline.so
b7c8a000-b7c8b000 rw-p 00003000 fe:01 10716611
/home/heimes/dev/python/release25-maint/build/lib.linux-i686-2.5/readline.so
b7c8b000-b7c92000 r--s 00000000 08:05 557857
/usr/lib/gconv/gconv-modules.cache
b7c92000-b7cd1000 r--p 00000000 08:05 570306
/usr/lib/locale/de_DE.utf8/LC_CTYPE
b7cd1000-b7d54000 rw-p b7cd1000 00:00 0
b7d54000-b7e98000 r-xp 00000000 08:05 326311
/lib/tls/i686/cmov/libc-2.6.1.so
b7e98000-b7e99000 r--p 00143000 08:05 326311
/lib/tls/i686/cmov/libc-2.6.1.so
b7e99000-b7e9b000 rw-p 00144000 08:05 326311
/lib/tls/i686/cmov/libc-2.6.1.so
b7e9b000-b7e9e000 rw-p b7e9b000 00:00 0
b7e9e000-b7ec1000 r-xp 00000000 08:05 326315
/lib/tls/i686/cmov/libm-2.6.1.so
b7ec1000-b7ec3000 rw-p 00023000 08:05 326315
/lib/tls/i686/cmov/libm-2.6.1.so
b7ec3000-b7ec5000 r-xp 00000000 08:05 326330
/lib/tls/i686/cmov/libutil-2.6.1.so
b7ec5000-b7ec7000 rw-p 00001000 08:05 326330
/lib/tls/i686/cmov/libutil-2.6.1.so
b7ec7000-b7ec8000 rw-p b7ec7000 00:00 0
b7ec8000-b7eca000 r-xp 00000000 08:05 326314
/lib/tls/i686/cmov/libdl-2.6.1.so
b7eca000-b7ecc000 rw-p 00001000 08:05 326314
/lib/tls/i686/cmov/libdl-2.6.1.so
b7ecc000-b7ee0000 r-xp 00000000 08:05 326325
/lib/tls/i686/cmov/libpthread-2.6.1.so
b7ee0000-b7ee2000 rw-p 00013000 08:05 326325
/lib/tls/i686/cmov/libpthread-2.6.1.so
b7ee2000-b7ee4000 rw-p b7ee2000 00:00 0
b7ef1000-b7efb000 r-xp 00000000 08:05 325908 /lib/libgcc_s.so.1
b7efb000-b7efc000 rw-p 0000a000 08:05 325908 /lib/libgcc_s.so.1
b7efc000-b7f01000 rw-p b7efc000 00:00 0
b7f01000-b7f1b000 r-xp 00000000 08:05 326530 /lib/ld-2.6.1.so
b7f1b000-b7f1d000 rw-p 00019000 08:05 326530 /lib/ld-2.6.1.so
bfcd2000-bfcee000 rw-p bfcd2000 00:00 0 [stack]
ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso]
However Python 3.0 doesn't crash:
Unhandled exception in thread started by <function worker at 0x840860c>
Traceback (most recent call last):
File "<stdin>", line 6, in worker
File "/home/heimes/dev/python/py3k/Lib/io.py", line 1234, in seek
self.buffer.seek(pos)
File "/home/heimes/dev/python/py3k/Lib/io.py", line 877, in seek
return self.raw.seek(pos, whence)
IOError: [Errno 9] Bad file descriptor |
|
Date |
User |
Action |
Args |
2007-11-09 22:14:35 | christian.heimes | set | spambayes_score: 0.156813 -> 0.15681285 recipients:
+ christian.heimes, tim.peters, loewis, jhylton, anthonybaxter, jafo, janixia |
2007-11-09 22:14:34 | christian.heimes | set | spambayes_score: 0.156813 -> 0.156813 messageid: <1194646474.95.0.983763332778.issue815646@psf.upfronthosting.co.za> |
2007-11-09 22:14:34 | christian.heimes | link | issue815646 messages |
2007-11-09 22:14:34 | christian.heimes | create | |
|