You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Thomas Åkesson <th...@fastmail.fm> on 2009/08/24 10:58:10 UTC
Segfault in libc/libapr when using ctypes bindings
Hi,
I would like to report a segfault when using the python ctypes
bindings to list properties.
Trying to summarize the situation:
- Having the most frequent problem with
RemoteRepository.proplist(path, rev).
- The crash happens randomly in libapr or libc. It is not happening
consistently when reading a certain path/revision.
- Crashes significantly more frequently when accessing repo via
file:// compared to http://.
- System: OpenSuse 11.1 x86_64, Svn 1.5.7 from package management
(Yast) and csvn binding built by me.
- Tried both python 2.6 from Yast and 2.6.2.
- Tried updating to Svn 1.6.3 (from OpenSuse build service)
Same python code tested successfully on Mac OS with Svn 1.6.x from
MacPorts.
See below:
- Excerpt of segfaults in messages log.
- Stacktrace produced with gdb.
I would like some input on how to report this issue. Can anyone
isolate the issue to a specific module by looking at the below
information? I can't say whether the issue is with ctypes-bindings,
ctypesgen, python, Svn core, libapr or libc or something specific to
OpenSuse.
Thanks in advance,
Thomas Åkesson
Messages log:
Aug 21 12:09:18 pds-suse-svn1 kernel: python[4746]: segfault at
ffffffffd40015b0 ip 00007f52e010c580 sp 00007fff03ef7ab8 error 4 in
libc-2.9.so[7f52e0090000+14f000]
Aug 21 12:09:33 pds-suse-svn1 kernel: python[4775]: segfault at
48008cd8 ip 00007f535095e9e0 sp 00007f534ce25038 error 4 in
libapr-1.so.0.3.3[7f535094c000+2b000]
Aug 21 12:32:07 pds-suse-svn1 kernel: python[6011]: segfault at
ffffffffec0015b0 ip 00007f2cf83bf580 sp 00007fff11260158 error 4 in
libc-2.9.so[7f2cf8343000+14f000]
Aug 21 12:32:09 pds-suse-svn1 kernel: python[6019]: segfault at
240015e0 ip 00007fd12f6e7580 sp 00007fffd68f9e38 error 4 in
libc-2.9.so[7fd12f66b000+14f000]
Aug 21 12:32:11 pds-suse-svn1 kernel: python[6029]: segfault at
ffffffffdc0015e0 ip 00007fa0e91db580 sp 00007fff828a3528 error 4 in
libc-2.9.so[7fa0e915f000+14f000]
Aug 21 12:32:14 pds-suse-svn1 kernel: python[6039]: segfault at
fffffffff00015e0 ip 00007f1bfca3f580 sp 00007fff7ef65418 error 4 in
libc-2.9.so[7f1bfc9c3000+14f000]
Aug 21 12:32:17 pds-suse-svn1 kernel: python[6049]: segfault at
ffffffffd00015e0 ip 00007f32dc497580 sp 00007fffff321988 error 4 in
libc-2.9.so[7f32dc41b000+14f000]
Aug 21 12:32:19 pds-suse-svn1 kernel: python[6058]: segfault at
ffffffffdc008cd8 ip 00007f4be4cf29e0 sp 00007f4be11b9038 error 4 in
libapr-1.so.0.3.3[7f4be4ce0000+2b000]
Stacktrace gdb:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6ef2580 in strlen () from /lib64/libc.so.6
(gdb) where
#0 0x00007ffff6ef2580 in strlen () from /lib64/libc.so.6
#1 0x00007ffff7ad4090 in PyString_FromString ()
from /usr/lib64/libpython2.6.so.1.0
#2 0x00007ffff7ac7c27 in PyObject_GenericGetAttr ()
from /usr/lib64/libpython2.6.so.1.0
#3 0x00007ffff7b15341 in PyEval_EvalFrameEx ()
from /usr/lib64/libpython2.6.so.1.0
#4 0x00007ffff7b1aa42 in PyEval_EvalCodeEx ()
from /usr/lib64/libpython2.6.so.1.0
#5 0x00007ffff7ab3318 in function_call () from /usr/lib64/
libpython2.6.so.1.0
#6 0x00007ffff7a90c09 in PyObject_Call () from /usr/lib64/
libpython2.6.so.1.0
#7 0x00007ffff7a9d6f7 in instancemethod_call ()
from /usr/lib64/libpython2.6.so.1.0
#8 0x00007ffff7a90c09 in PyObject_Call () from /usr/lib64/
libpython2.6.so.1.0
#9 0x00007ffff7b14718 in PyEval_CallObjectWithKeywords ()
from /usr/lib64/libpython2.6.so.1.0
#10 0x00007ffff7ae3019 in slot_tp_str () from /usr/lib64/
libpython2.6.so.1.0
#11 0x00007ffff7ac8a6a in _PyObject_Str () from /usr/lib64/
libpython2.6.so.1.0
#12 0x00007ffff7ac8b23 in PyObject_Str () from /usr/lib64/
libpython2.6.so.1.0
#13 0x00007ffff7ad4718 in string_new () from /usr/lib64/
libpython2.6.so.1.0
#14 0x00007ffff7ade263 in type_call () from /usr/lib64/libpython2.6.so.
1.0
#15 0x00007ffff7a90c09 in PyObject_Call () from /usr/lib64/
libpython2.6.so.1.0
#16 0x00007ffff7b1612b in PyEval_EvalFrameEx ()
---Type <return> to continue, or q <return> to quit---
from /usr/lib64/libpython2.6.so.1.0
#17 0x00007ffff7b1aa42 in PyEval_EvalCodeEx ()
from /usr/lib64/libpython2.6.so.1.0
#18 0x00007ffff7b15447 in PyEval_EvalFrameEx ()
from /usr/lib64/libpython2.6.so.1.0
#19 0x00007ffff7b1aa42 in PyEval_EvalCodeEx ()
from /usr/lib64/libpython2.6.so.1.0
#20 0x00007ffff7b15447 in PyEval_EvalFrameEx ()
from /usr/lib64/libpython2.6.so.1.0
#21 0x00007ffff7b1ac40 in PyEval_EvalCodeEx ()
from /usr/lib64/libpython2.6.so.1.0
#22 0x00007ffff7b15447 in PyEval_EvalFrameEx ()
from /usr/lib64/libpython2.6.so.1.0
#23 0x00007ffff7b1aa42 in PyEval_EvalCodeEx ()
from /usr/lib64/libpython2.6.so.1.0
#24 0x00007ffff7b15447 in PyEval_EvalFrameEx ()
from /usr/lib64/libpython2.6.so.1.0
#25 0x00007ffff7b1ac40 in PyEval_EvalCodeEx ()
from /usr/lib64/libpython2.6.so.1.0
#26 0x00007ffff7b15447 in PyEval_EvalFrameEx ()
from /usr/lib64/libpython2.6.so.1.0
#27 0x00007ffff7b1ac40 in PyEval_EvalCodeEx ()
from /usr/lib64/libpython2.6.so.1.0
---Type <return> to continue, or q <return> to quit---
#28 0x00007ffff7b13de2 in PyEval_EvalCode ()
from /usr/lib64/libpython2.6.so.1.0
#29 0x00007ffff7b342c3 in run_mod () from /usr/lib64/libpython2.6.so.1.0
#30 0x00007ffff7b3437a in PyRun_FileExFlags ()
from /usr/lib64/libpython2.6.so.1.0
#31 0x00007ffff7b34cd4 in PyRun_SimpleFileExFlags ()
from /usr/lib64/libpython2.6.so.1.0
#32 0x00007ffff7b4076a in Py_Main () from /usr/lib64/libpython2.6.so.1.0
#33 0x00007ffff6e94586 in __libc_start_main () from /lib64/libc.so.6
#34 0x00000000004006e9 in _start ()
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2386699
Re: Segfault in libc/libapr when using ctypes bindings
Posted by Thomas Åkesson <th...@akesson.cc>.
Hi again,
I spent some more time with gdb and managed to get a stacktrace on a
crash in libapr. It was more informative and led me to connect the
issue with the 64-bit ctypes issue that seems to have plagued quite a
few python programmers.
It has actually been discussed here some time ago:
http://svn.haxx.se/dev/archive-2007-12/0063.shtml
Some more links:
http://osdir.com/ml/python.ctypes/2007-12/msg00001.html
http://sgillies.net/blog/829/shapely-1-0-8/
This is the changeset applied to Shapely:
http://trac.gispython.org/lab/changeset/1145
So what do you think? Is this a similar issue that can be fixed by
additional declarations in csvn? Is it an issue in ctypesgen?
Regards,
Thomas Å.
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff08d1950 (LWP 13821)]
0x00007ffff416d933 in apr_hash_next () from /usr/lib64/libapr-1.so.0.3.3
(gdb) stack
Undefined command: "stack". Try "help".
(gdb) where
#0 0x00007ffff416d933 in apr_hash_next () from /usr/lib64/libapr-1.so.
0.3.3
#1 0x00007ffff479a034 in ffi_call_unix64 ()
from /usr/lib64/python2.6/lib-dynload/_ctypes.so
#2 0x00007ffff4799e1c in ffi_call ()
from /usr/lib64/python2.6/lib-dynload/_ctypes.so
#3 0x00007ffff4794c92 in _CallProc ()
from /usr/lib64/python2.6/lib-dynload/_ctypes.so
#4 0x00007ffff478de79 in CFuncPtr_call ()
from /usr/lib64/python2.6/lib-dynload/_ctypes.so
#5 0x00007ffff7a90c09 in PyObject_Call () from /usr/lib64/
libpython2.6.so.1.0
#6 0x00007ffff7b1612b in PyEval_EvalFrameEx ()
from /usr/lib64/libpython2.6.so.1.0
#7 0x00007ffff7aa8668 in gen_send_ex () from /usr/lib64/
libpython2.6.so.1.0
#8 0x00007ffff7b151c2 in PyEval_EvalFrameEx ()
from /usr/lib64/libpython2.6.so.1.0
#9 0x00007ffff7aa8668 in gen_send_ex () from /usr/lib64/
libpython2.6.so.1.0
#10 0x00007ffff7b151c2 in PyEval_EvalFrameEx ()
from /usr/lib64/libpython2.6.so.1.0
#11 0x00007ffff7aa8668 in gen_send_ex () from /usr/lib64/
libpython2.6.so.1.0
#12 0x00007ffff7b151c2 in PyEval_EvalFrameEx ()
from /usr/lib64/libpython2.6.so.1.0
#13 0x00007ffff7b1aa42 in PyEval_EvalCodeEx ()
from /usr/lib64/libpython2.6.so.1.0
---Type <return> to continue, or q <return> to quit---
#14 0x00007ffff7b15447 in PyEval_EvalFrameEx ()
from /usr/lib64/libpython2.6.so.1.0
#15 0x00007ffff7b1ac40 in PyEval_EvalCodeEx ()
from /usr/lib64/libpython2.6.so.1.0
#16 0x00007ffff7ab34f1 in function_call () from /usr/lib64/
libpython2.6.so.1.0
#17 0x00007ffff7a90c09 in PyObject_Call () from /usr/lib64/
libpython2.6.so.1.0
#18 0x00007ffff7a9d6f7 in instancemethod_call ()
from /usr/lib64/libpython2.6.so.1.0
#19 0x00007ffff7a90c09 in PyObject_Call () from /usr/lib64/
libpython2.6.so.1.0
#20 0x00007ffff7b14718 in PyEval_CallObjectWithKeywords ()
from /usr/lib64/libpython2.6.so.1.0
#21 0x00007ffff7a9eaf6 in PyInstance_New () from /usr/lib64/
libpython2.6.so.1.0
#22 0x00007ffff7a90c09 in PyObject_Call () from /usr/lib64/
libpython2.6.so.1.0
#23 0x00007ffff7b1612b in PyEval_EvalFrameEx ()
from /usr/lib64/libpython2.6.so.1.0
#24 0x00007ffff7b1aa42 in PyEval_EvalCodeEx ()
from /usr/lib64/libpython2.6.so.1.0
#25 0x00007ffff7ab3318 in function_call () from /usr/lib64/
libpython2.6.so.1.0
#26 0x00007ffff7a90c09 in PyObject_Call () from /usr/lib64/
libpython2.6.so.1.0
#27 0x00007ffff7a9d6f7 in instancemethod_call ()
from /usr/lib64/libpython2.6.so.1.0
#28 0x00007ffff7a90c09 in PyObject_Call () from /usr/lib64/
libpython2.6.so.1.0
#29 0x00007ffff7b14718 in PyEval_CallObjectWithKeywords ()
---Type <return> to continue, or q <return> to quit---
from /usr/lib64/libpython2.6.so.1.0
#30 0x00007ffff4793130 in closure_fcn ()
from /usr/lib64/python2.6/lib-dynload/_ctypes.so
#31 0x00007ffff4799a8a in ffi_closure_unix64_inner ()
from /usr/lib64/python2.6/lib-dynload/_ctypes.so
#32 0x00007ffff479a160 in ffi_closure_unix64 ()
from /usr/lib64/python2.6/lib-dynload/_ctypes.so
#33 0x00007ffff335df20 in ?? () from /usr/lib64/libsvn_subr-1.so.0
#34 0x00007ffff11b1d33 in ?? () from /usr/lib64/libsvn_ra_neon-1.so.0
#35 0x00007ffff11b9128 in ?? () from /usr/lib64/libsvn_ra_neon-1.so.0
#36 0x00007ffff0f92f9f in ?? () from /usr/lib64/libneon.so.27
#37 0x00007ffff3599e63 in ?? () from /lib64/libexpat.so.1
#38 0x00007ffff359ad94 in ?? () from /lib64/libexpat.so.1
#39 0x00007ffff359c90a in ?? () from /lib64/libexpat.so.1
#40 0x00007ffff359d02b in ?? () from /lib64/libexpat.so.1
#41 0x00007ffff3593271 in XML_ParseBuffer () from /lib64/libexpat.so.1
#42 0x00007ffff0f93062 in ne_xml_parse () from /usr/lib64/libneon.so.27
#43 0x00007ffff0f86fae in ne_read_response_block ()
from /usr/lib64/libneon.so.27
#44 0x00007ffff0f872f0 in ne_discard_response () from /usr/lib64/
libneon.so.27
#45 0x00007ffff0f8813b in ne_request_dispatch () from /usr/lib64/
libneon.so.27
#46 0x00007ffff11b9803 in svn_ra_neon__request_dispatch ()
from /usr/lib64/libsvn_ra_neon-1.so.0
---Type <return> to continue, or q <return> to quit---
#47 0x00007ffff11ba9de in svn_ra_neon__parsed_request ()
from /usr/lib64/libsvn_ra_neon-1.so.0
#48 0x00007ffff11b1c91 in svn_ra_neon__get_log ()
from /usr/lib64/libsvn_ra_neon-1.so.0
#49 0x00007ffff17e8a3f in svn_ra_get_log ()
from /usr/lib64/libsvn_ra-1.so.0.0.0
#50 0x00007ffff479a034 in ffi_call_unix64 ()
from /usr/lib64/python2.6/lib-dynload/_ctypes.so
#51 0x00007ffff4799e1c in ffi_call ()
from /usr/lib64/python2.6/lib-dynload/_ctypes.so
#52 0x00007ffff4794c92 in _CallProc ()
from /usr/lib64/python2.6/lib-dynload/_ctypes.so
#53 0x00007ffff478de79 in CFuncPtr_call ()
from /usr/lib64/python2.6/lib-dynload/_ctypes.so
#54 0x00007ffff7a90c09 in PyObject_Call () from /usr/lib64/
libpython2.6.so.1.0
#55 0x00007ffff7b1612b in PyEval_EvalFrameEx ()
from /usr/lib64/libpython2.6.so.1.0
#56 0x00007ffff7b1aa42 in PyEval_EvalCodeEx ()
from /usr/lib64/libpython2.6.so.1.0
#57 0x00007ffff7ab34f1 in function_call () from /usr/lib64/
libpython2.6.so.1.0
#58 0x00007ffff7a90c09 in PyObject_Call () from /usr/lib64/
libpython2.6.so.1.0
#59 0x00007ffff7b16f59 in PyEval_EvalFrameEx ()
from /usr/lib64/libpython2.6.so.1.0
---Type <return> to continue, or q <return> to quit---
#60 0x00007ffff7b1aa42 in PyEval_EvalCodeEx ()
from /usr/lib64/libpython2.6.so.1.0
#61 0x00007ffff7b15447 in PyEval_EvalFrameEx ()
from /usr/lib64/libpython2.6.so.1.0
#62 0x00007ffff7b15f80 in PyEval_EvalFrameEx ()
from /usr/lib64/libpython2.6.so.1.0
#63 0x00007ffff7b1aa42 in PyEval_EvalCodeEx ()
from /usr/lib64/libpython2.6.so.1.0
#64 0x00007ffff7ab3318 in function_call () from /usr/lib64/
libpython2.6.so.1.0
#65 0x00007ffff7a90c09 in PyObject_Call () from /usr/lib64/
libpython2.6.so.1.0
#66 0x00007ffff7a9d6f7 in instancemethod_call ()
from /usr/lib64/libpython2.6.so.1.0
#67 0x00007ffff7a90c09 in PyObject_Call () from /usr/lib64/
libpython2.6.so.1.0
#68 0x00007ffff7b14718 in PyEval_CallObjectWithKeywords ()
from /usr/lib64/libpython2.6.so.1.0
#69 0x00007ffff7b42f0f in t_bootstrap () from /usr/lib64/
libpython2.6.so.1.0
#70 0x00007ffff7833070 in start_thread () from /lib64/libpthread.so.0
#71 0x00007ffff6f4910d in clone () from /lib64/libc.so.6
#72 0x0000000000000000 in ?? ()
On 24 aug 2009, at 12.58, Thomas Åkesson wrote:
> Hi,
> I would like to report a segfault when using the python ctypes
> bindings to list properties.
>
> Trying to summarize the situation:
> - Having the most frequent problem with
> RemoteRepository.proplist(path, rev).
> - The crash happens randomly in libapr or libc. It is not happening
> consistently when reading a certain path/revision.
> - Crashes significantly more frequently when accessing repo via
> file:// compared to http://.
> - System: OpenSuse 11.1 x86_64, Svn 1.5.7 from package management
> (Yast) and csvn binding built by me.
> - Tried both python 2.6 from Yast and 2.6.2.
> - Tried updating to Svn 1.6.3 (from OpenSuse build service)
>
> Same python code tested successfully on Mac OS with Svn 1.6.x from
> MacPorts.
>
> See below:
> - Excerpt of segfaults in messages log.
> - Stacktrace produced with gdb.
>
>
> I would like some input on how to report this issue. Can anyone
> isolate the issue to a specific module by looking at the below
> information? I can't say whether the issue is with ctypes-bindings,
> ctypesgen, python, Svn core, libapr or libc or something specific to
> OpenSuse.
>
> Thanks in advance,
> Thomas Åkesson
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2386719