471,348 Members | 1,469 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,348 software developers and data experts.

Segfault due to threads created by external modules

Dear list,

I'm using two external modules (matplotlib and pyroot). Both are using
different GUI threads (internally) Unfortunately, pretty soon after
I've loaded both modules and made some function calls (without
invoking GUI commands), python dies with a segfault. A libthread_db
captures the stack trace. My python version is 2.5 and I'm on a
Scientific Linux 5 system.

*** Break *** segmentation violation
Using host libthread_db library "/lib/libthread_db.so.1".
Attaching to program: /proc/20957/exe, process 20957
[Thread debugging using libthread_db enabled]
[New Thread -1208964416 (LWP 20957)]
[New Thread 133323664 (LWP 20964)]
[New Thread 48200592 (LWP 20958)]
0x009e2402 in __kernel_vsyscall ()
Thread 3 (Thread 48200592 (LWP 20958)):
#0 0x009e2402 in __kernel_vsyscall ()
#1 0x4e94bf91 in ___newselect_nocancel () from /lib/libc.so.6
#2 0x0494fcac in Tcl_InitNotifier () from /usr/lib/libtcl8.4.so
#3 0x4e9f92db in start_thread () from /lib/libpthread.so.0
#4 0x4e95312e in clone () from /lib/libc.so.6

Thread 2 (Thread 133323664 (LWP 20964)):
#0 0x009e2402 in __kernel_vsyscall ()
#1 0x4e9ff14e in sem_wait@GLIBC_2.0 () from /lib/libpthread.so.0
#2 0x00f2166e in PyThread_acquire_lock (lock=0x89b1ea8, waitflag=1)
at Python/thread_pthread.h:349
#3 0x00eeff27 in PyEval_RestoreThread (tstate=0xa255820) at Python/
ceval.c:312
#4 0x002bec23 in time_sleep (self=0x0, args=0x9afcfec) at /tmp/bvoigt/
Python-2.5.1/Modules/timemodule.c:921
#5 0x00ea900d in PyCFunction_Call (func=0xb7e544ac, arg=0x9afcfec,
kw=0x0) at Objects/methodobject.c:108
#6 0x00ef65df in PyEval_EvalFrameEx (f=0xa30028c, throwflag=0) at
Python/ceval.c:3564
#7 0x00ef7734 in PyEval_EvalCodeEx (co=0xb7cd7698,
globals=0xb7cb813c, locals=0x0, args=0x9afcfd8, argcount=1,
kws=0xa05cf40, kwcount=0, defs=0x0,
defcount=0, closure=0x0) at Python/ceval.c:2831
#8 0x00e953c0 in function_call (func=0xb7cdad14, arg=0x9afcfcc,
kw=0x9af99bc) at Objects/funcobject.c:517
#9 0x00e734f7 in PyObject_Call (func=0x0, arg=0x9afcfcc,
kw=0x9af99bc) at Objects/abstract.c:1860
#10 0x00ef441b in PyEval_EvalFrameEx (f=0xa30012c, throwflag=0) at
Python/ceval.c:3844
#11 0x00ef6260 in PyEval_EvalFrameEx (f=0xa2fff9c, throwflag=0) at
Python/ceval.c:3650
#12 0x00ef7734 in PyEval_EvalCodeEx (co=0xb7d93a88,
globals=0xb7d9024c, locals=0x0, args=0x9afcfb8, argcount=1, kws=0x0,
kwcount=0, defs=0x0,
defcount=0, closure=0x0) at Python/ceval.c:2831
#13 0x00e952ea in function_call (func=0xb7d9d09c, arg=0x9afcfac,
kw=0x0) at Objects/funcobject.c:517
#14 0x00e734f7 in PyObject_Call (func=0x0, arg=0x9afcfac, kw=0x0) at
Objects/abstract.c:1860
#15 0x00e7ad15 in instancemethod_call (func=0x9af6054, arg=0x9afcfac,
kw=0x0) at Objects/classobject.c:2497
#16 0x00e734f7 in PyObject_Call (func=0x0, arg=0xb7eca02c, kw=0x0) at
Objects/abstract.c:1860
#17 0x00eef43c in PyEval_CallObjectWithKeywords (func=0x9af6054,
arg=0xb7eca02c, kw=0x0) at Python/ceval.c:3433
#18 0x00f25d14 in t_bootstrap (boot_raw=0xa24eec8) at ./Modules/
threadmodule.c:424
#19 0x4e9f92db in start_thread () from /lib/libpthread.so.0
#20 0x4e95312e in clone () from /lib/libc.so.6

Thread 1 (Thread -1208964416 (LWP 20957)):
#0 0x009e2402 in __kernel_vsyscall ()
#1 0x4e9136ab in __waitpid_nocancel () from /lib/libc.so.6
#2 0x4e8bba0f in do_system () from /lib/libc.so.6
#3 0x4e8bbdc2 in system () from /lib/libc.so.6
#4 0x4ea010bd in system () from /lib/libpthread.so.0

I have no idea how to solve this. Somebody else has an idea?

Thanks! Bernhard

Jun 28 '07 #1
0 985

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Juho Saarikko | last post: by
6 posts views Thread by Stefan Behnel | last post: by
3 posts views Thread by Travis Berg | last post: by
1 post views Thread by Tony Meyer | last post: by
3 posts views Thread by Bryan Christopher | last post: by
6 posts views Thread by SamIAm | last post: by
10 posts views Thread by [Yosi] | last post: by
7 posts views Thread by David Rushby | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.