[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Segfault in libc/libapr when using ctypes bindings

From: Thomas Åkesson <thomas_at_akesson.cc>
Date: Mon, 24 Aug 2009 14:21:01 +0200

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
Received on 2009-08-24 14:37:42 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.