473,396 Members | 1,866 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,396 software developers and data experts.

python 2.5.1 segfault, multithreading & dual core issue?

I am running a multi-threaded python application in a dual core intel
running Ubuntu.

I am using python 2.5.1 that I compiled myself. At random points I am
getting segmentation faults (sometimes indicating a duplicate free).
Below is the backtrace of the latest segfault.

I am thinking this might be an issue related to the dual core CPU so I
am now running the app with affinity to one CPU to test this hypothesis.

Where can I put such a bugreport?

----

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1486967920 (LWP 4579)]
0x009196ed in fclose@@GLIBC_2.1 () from /lib/libc.so.6
(gdb) bt
#0 0x009196ed in fclose@@GLIBC_2.1 () from /lib/libc.so.6
#1 0x0806af9b in file_close (f=0xa259e30) at Objects/fileobject.c:446
#2 0x080c51b0 in PyEval_EvalFrameEx (f=0xa3c790c, throwflag=0) at
Python/ceval.c:3548
#3 0x080c5795 in PyEval_EvalFrameEx (f=0xa3c77a4, throwflag=0) at
Python/ceval.c:3650
#4 0x080c5795 in PyEval_EvalFrameEx (f=0xa3afccc, throwflag=0) at
Python/ceval.c:3650
#5 0x080c5795 in PyEval_EvalFrameEx (f=0xa3c8804, throwflag=0) at
Python/ceval.c:3650
#6 0x080c65a5 in PyEval_EvalCodeEx (co=0xb7f315c0, globals=0xb7f29824,
locals=0x0, args=0xa39b9a8, argcount=3,
kws=0xa39b9b4, kwcount=0, defs=0xb7c8fb98, defcount=1, closure=0x0)
at Python/ceval.c:2831
#7 0x080c4a59 in PyEval_EvalFrameEx (f=0xa39b864, throwflag=0) at
Python/ceval.c:3660
#8 0x080c65a5 in PyEval_EvalCodeEx (co=0xb7f2ec38, globals=0xb7f29824,
locals=0x0, args=0xa399920, argcount=3,
kws=0xa39992c, kwcount=0, defs=0xb7c8fad8, defcount=1, closure=0x0)
at Python/ceval.c:2831
#9 0x080c4a59 in PyEval_EvalFrameEx (f=0xa3997c4, throwflag=0) at
Python/ceval.c:3660
#10 0x080c65a5 in PyEval_EvalCodeEx (co=0xb7f2eda0, globals=0xb7f29824,
locals=0x0, args=0xa340e30, argcount=3,
kws=0xa340e3c, kwcount=0, defs=0xb7cea330, defcount=4, closure=0x0)
at Python/ceval.c:2831
#11 0x080c4a59 in PyEval_EvalFrameEx (f=0xa340cb4, throwflag=0) at
Python/ceval.c:3660
#12 0x080c65a5 in PyEval_EvalCodeEx (co=0xb7f317b8, globals=0xb7f29824,
locals=0x0, args=0xa39cedc, argcount=2,
kws=0xa39cee4, kwcount=2, defs=0xb7c905b0, defcount=3, closure=0x0)
at Python/ceval.c:2831
#13 0x080c4a59 in PyEval_EvalFrameEx (f=0xa39cd7c, throwflag=0) at
Python/ceval.c:3660
#14 0x080c65a5 in PyEval_EvalCodeEx (co=0xb7f316e0, globals=0xb7f29824,
locals=0x0, args=0xa3aff8c, argcount=4,
kws=0xa3aff9c, kwcount=1, defs=0xb7c8fbb8, defcount=2, closure=0x0)
at Python/ceval.c:2831
#15 0x080c4a59 in PyEval_EvalFrameEx (f=0xa3afe34, throwflag=0) at
Python/ceval.c:3660
#16 0x080c65a5 in PyEval_EvalCodeEx (co=0xb7f07728, globals=0xb7f59acc,
locals=0x0, args=0xa32b9ac, argcount=3,
kws=0xa32b9b8, kwcount=0, defs=0xb7c0a1f8, defcount=2, closure=0x0)
at Python/ceval.c:2831
#17 0x080c4a59 in PyEval_EvalFrameEx (f=0xa32b86c, throwflag=0) at
Python/ceval.c:3660
#18 0x080c5795 in PyEval_EvalFrameEx (f=0xa3c84f4, throwflag=0) at
Python/ceval.c:3650
#19 0x080c5795 in PyEval_EvalFrameEx (f=0xa3a4ef4, throwflag=0) at
Python/ceval.c:3650
#20 0x080c65a5 in PyEval_EvalCodeEx (co=0xb7f1d1d0, globals=0xb7f11dfc,
locals=0x0, args=0xa2d8cd8, argcount=1,
kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at
Python/ceval.c:2831
#21 0x0810d6a1 in function_call (func=0xb7f26e2c, arg=0xa2d8ccc, kw=0x0)
at Objects/funcobject.c:517
#22 0x0805a257 in PyObject_Call (func=0xa48ff4, arg=0xa2d8ccc, kw=0x0)
at Objects/abstract.c:1860
#23 0x08060387 in instancemethod_call (func=0xa23b2fc, arg=0xa2d8ccc,
kw=0x0) at Objects/classobject.c:2497
#24 0x0805a257 in PyObject_Call (func=0xa48ff4, arg=0xb7f4102c, kw=0x0)
at Objects/abstract.c:1860
#25 0x080be79c in PyEval_CallObjectWithKeywords (func=0xa23b2fc,
arg=0xb7f4102c, kw=0x0) at Python/ceval.c:3433
#26 0x080f01b8 in t_bootstrap (boot_raw=0xa3c8048) at
../Modules/threadmodule.c:424
#27 0x00a3a45b in start_thread () from /lib/libpthread.so.0
#28 0x0099223e in clone () from /lib/libc.so.6
Aug 21 '07 #1
3 1925
Paul Sijben wrote:
I am running a multi-threaded python application in a dual core intel
running Ubuntu.

I am using python 2.5.1 that I compiled myself. At random points I am
getting segmentation faults (sometimes indicating a duplicate free).
Below is the backtrace of the latest segfault.

I am thinking this might be an issue related to the dual core CPU so I
am now running the app with affinity to one CPU to test this hypothesis.

Where can I put such a bugreport?
http://sourceforge.net/bugs/?group_id=5470

if you do it before August 23, when the bugtracker will be moved to
bugs.python.org.

Note that a thread-related bug causing a segfault has been reported today at

http://sourceforge.net/tracker/index...70&atid=105470

I could reproduce this one on my machine, though, so I'm sure that it has
nothing to do with a dual core CPU.

Peter

Aug 21 '07 #2
Paul Sijben <pa*********@xs4all.nlwrites:
I am running a multi-threaded python application in a dual core
intel running Ubuntu.
[...]

Judging from the stack trace, this patch has a good chance of fixing
your problem:

http://mail.python.org/pipermail/pyt...st/074232.html
Aug 21 '07 #3
thanks very much! I am currently compiling python with the patch and
will test it over the coming days.

Paul

Hrvoje Niksic wrote:
Paul Sijben <pa*********@xs4all.nlwrites:
>I am running a multi-threaded python application in a dual core
intel running Ubuntu.
[...]

Judging from the stack trace, this patch has a good chance of fixing
your problem:

http://mail.python.org/pipermail/pyt...st/074232.html
Aug 22 '07 #4

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

Similar topics

25
by: abhinav | last post by:
Hello guys, I am a novice in python.I have to implement a full fledged mail server ..But i am not able to choose the language.Should i go for C(socket API) or python for this project? What are the...
2
by: robert | last post by:
There is a strange freeze/crash only on dual core machines: I have a python app (Python 2.3.5 /Pythonwin build 203 / Windows) running with no stability problems on normal machines (Or a crash is...
16
by: PyDenis | last post by:
Today, I found strange error while using py2exe: 1. I wrote simple program and save as 1.py: import win32ui import win32con win32ui.MessageBox('Test messageBox.' , 'Test', win32con.MB_OK |...
41
by: km | last post by:
Hi all, Is there any PEP to introduce true threading features into python's next version as in java? i mean without having GIL. when compared to other languages, python is fun to code but i feel...
5
by: robert | last post by:
Simple Python code obviously cannot use the dual core by Python threads. Yet, a program drawing CPU mainly for matrix computations - preferably with Numeric/SciPy - will this profit from a dual...
0
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 431 open ( +3) / 3425 closed ( +8) / 3856 total (+11) Bugs : 916 open (-23) / 6273 closed (+44) / 7189 total (+21) RFE : 244 open...
3
by: arunairs | last post by:
Hi, In a multi-threaded app on a dual core machine, is it possible to know on which cpu a particular thread is currently executing on? thanks, Arun
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...

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.