473,320 Members | 1,713 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,320 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 1921
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.