Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue13992] Segfault in PyTrash_destroy_chain

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

Aug 1, 2012, 12:39 AM

Post #1 of 5 (138 views)
Permalink
[issue13992] Segfault in PyTrash_destroy_chain

Manu Cupcic added the comment:

I am also hitting this issue.

I have been able to reproduce it in python 2.5 and 2.7, on debian 6 (64 bits)
Exactly like the reporter, I am making extensive use of threads. I am also using SQLalchemy.

All my threads but one are waiting (probably for the GIL) :
(gdb) info threads
15 Thread 0x7fffe3ff7700 (LWP 419) 0x00007ffff7bd03c0 in sem_wait () from /lib/libpthread.so.0
14 Thread 0x7fffe47f8700 (LWP 418) 0x00007ffff7bd03c0 in sem_wait () from /lib/libpthread.so.0
13 Thread 0x7fffe4ff9700 (LWP 417) 0x00007ffff7bd03c0 in sem_wait () from /lib/libpthread.so.0
12 Thread 0x7fffe57fa700 (LWP 416) 0x00007ffff7bd03c0 in sem_wait () from /lib/libpthread.so.0
11 Thread 0x7fffe5ffb700 (LWP 415) 0x00007ffff7bd03c0 in sem_wait () from /lib/libpthread.so.0
* 10 Thread 0x7fffe67fc700 (LWP 414) 0x000000000046479f in _Py_ForgetReference (op=0x4dc7bc0)
at Objects/object.c:2222
9 Thread 0x7fffe6ffd700 (LWP 413) 0x00007ffff7bd03c0 in sem_wait () from /lib/libpthread.so.0
8 Thread 0x7fffe77fe700 (LWP 412) 0x00007ffff7bd03c0 in sem_wait () from /lib/libpthread.so.0
7 Thread 0x7fffe7fff700 (LWP 411) 0x00007ffff7bd03c0 in sem_wait () from /lib/libpthread.so.0
6 Thread 0x7fffec81c700 (LWP 410) 0x00007ffff72a11a3 in select () from /lib/libc.so.6
5 Thread 0x7fffed01d700 (LWP 409) 0x00007ffff7bd03c0 in sem_wait () from /lib/libpthread.so.0
4 Thread 0x7fffed81e700 (LWP 408) 0x00007ffff7bd03c0 in sem_wait () from /lib/libpthread.so.0
3 Thread 0x7fffee01f700 (LWP 407) 0x00007ffff7bd03c0 in sem_wait () from /lib/libpthread.so.0
2 Thread 0x7fffee820700 (LWP 406) 0x00007ffff729c9d3 in poll () from /lib/libc.so.6
1 Thread 0x7ffff7fec700 (LWP 393) 0x00007ffff72a11a3 in select () from /lib/libc.so.6

And the segfault happens in _Py_ForgetReference :

(gdb) bt
#0 0x000000000046479f in _Py_ForgetReference (op=0x4dc7bc0) at Objects/object.c:2222
#1 0x0000000000464810 in _Py_Dealloc (op=0x4dc7bc0) at Objects/object.c:2242
#2 0x0000000000559a68 in frame_dealloc (f=0x4997ab0) at Objects/frameobject.c:458
#3 0x000000000046481d in _Py_Dealloc (op=0x4997ab0) at Objects/object.c:2243
...

probably because something else zeroed out the op object :
(gdb) select-frame 0
(gdb) print *op
$6 = {_ob_next = 0x0, _ob_prev = 0x0, ob_refcnt = 0, ob_type = 0x2364020}

Is there something else I can do to help resolve this bug ? I can help debugging this, but I am not sure how to proceed. I have a --with-pydebug interpreter stopped at the segfault in gdb.

----------
nosy: +cupcicm

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue13992>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 1, 2012, 4:48 AM

Post #2 of 5 (126 views)
Permalink
[issue13992] Segfault in PyTrash_destroy_chain [In reply to]

Charles-Fran├žois Natali added the comment:

> Is there something else I can do to help resolve this bug ? I can help debugging this, but I am not sure how to proceed. I have a --with-pydebug interpreter stopped at the segfault in gdb.

Could you post the output of :
"""
p op
"""

and

"""
thread apply all bt
"""

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue13992>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 1, 2012, 4:53 AM

Post #3 of 5 (128 views)
Permalink
[issue13992] Segfault in PyTrash_destroy_chain [In reply to]

Manu Cupcic added the comment:

(gdb) p op
$12 = (PyObject *) 0x4dc7bc0

thread all apply bt is going to be very long no ? Could you tell me what you want to know that is not in info threads maybe ? I can definitely post it here, but it's going to be a lot of output.

I can be available on IRC if you want to debug it live.

Thanks !

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue13992>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 3, 2012, 12:59 AM

Post #4 of 5 (124 views)
Permalink
[issue13992] Segfault in PyTrash_destroy_chain [In reply to]

Charles-Fran├žois Natali added the comment:

> (gdb) p op
> $12 = (PyObject *) 0x4dc7bc0

Don't you have GDB 7, to decode Python objects ?
You can check the type of the object with :
"""
p op->ob_type.tp_name
"""

>
> thread all apply bt is going to be very long no ? Could you tell me what you want to know that is not in info threads maybe ? I can definitely post it here, but it's going to be a lot of output.

You can add it as an attachment.

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue13992>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 7, 2012, 1:12 AM

Post #5 of 5 (117 views)
Permalink
[issue13992] Segfault in PyTrash_destroy_chain [In reply to]

Francois VISCONTE added the comment:

Hi,

Following Manu's information I complete with what you asked.
I repeated the bug described by Manu, with the same software in exactly the same conditions.

The corrupted object is one of our SQLAlchemy mapped object. Chances are that the bug came from SQLAlchemy.

Find joined the "thread all apply bt" output. I will investigate today on this bug and will try to find a quicker way to reproduce it in order to use an hardware watchpoint on object refcount.

----------
nosy: +fvisconte
Added file: http://bugs.python.org/file26717/thread_all_apply_bt.txt

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue13992>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.