473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 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 1052

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

Similar topics

6
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...
6
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...
3
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...
1
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...
3
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...
6
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...
10
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,...
2
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...
7
by: David Rushby | last post by:
Consider the following program (underscores are used to force indentation): ------------------------------------------------ import atexit, threading, time def atExitFunc(): ____print...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.