472,993 Members | 2,188 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,993 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/
#4 0x002bec23 in time_sleep (self=0x0, args=0x9afcfec) at /tmp/bvoigt/
#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
#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
#11 0x00ef6260 in PyEval_EvalFrameEx (f=0xa2fff9c, throwflag=0) at
#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
#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
#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/
#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 1039

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Juho Saarikko | last post by:
The program attached to this message makes the Python interpreter segfault randomly. I have tried both Python 2.2 which came with Debian Stable, and self-compiled Python 2.3.3 (newest I could find...
by: Stefan Behnel | last post by:
Hi! In Python 2.4b3, the deque is causing a segfault on two different machines I tested on. With deque, my program runs fine for a while (at least some tens of seconds up to minutes) and then...
by: Travis Berg | last post by:
I'm running into a problem when trying to perform a callback to a Python function from a C extension. Specifically, the callback is being made by a pthread that seems to cause the problem. If I...
by: Tony Meyer | last post by:
I have (unfortunately) a Python program that I can consistently (in a reproducible way) segfault. However, I've got somewhat used to Python's very nice habit of protecting me from segfaults and...
by: Bryan Christopher | last post by:
Hello All! I have a rather abstract question for some genius out there to answer. I want to integrate communication tracking, for customer relations, into an existing Access DB. What I was going...
by: SamIAm | last post by:
Hi am creating a email application that needs to mail out a very large amount of emails. I have created a multithreaded c# application that using message queuing. I have created a threadpool of 5...
by: [Yosi] | last post by:
I would like to know how threads behavior in .NET . When an application create 4 threads for example start all of them, the OS task manager will execute all 4 thread in deterministic order manes,...
by: Oenone | last post by:
I'm upgrading a DLL from VB6 to VB.NET. The DLL gets called from an ASP.NET web application. In the VB6 code there is a module-level object which stores the context about what the user is doing...
by: David Rushby | last post by:
Consider the following program (underscores are used to force indentation): ------------------------------------------------ import atexit, threading, time def atExitFunc(): ____print...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.