select(0, NULL, NULL, NULL, {0, 8000}) = 0 (Timeout)
futex(0x822f530, FUTEX_WAKE, 1) = 0
gettimeofday({1075823054, 603000}, NULL) = 0
futex(0x822f530, FUTEX_WAKE, 1) = 0
select(0, NULL, NULL, NULL, {0, 16000}) = 0 (Timeout)
futex(0x822f530, FUTEX_WAKE, 1) = 0
gettimeofday({1075823054, 623210}, NULL) = 0
futex(0x822f530, FUTEX_WAKE, 1) = 0
select(0, NULL, NULL, NULL, {0, 30370}) = ? ERESTARTNOHAND (To be restarted)
+++ killed by SIGSEGV +++
This is the output from strace -o xx python2.3 Spider.py, Spider.py
being a threaded web crawler. The server segfaults at no specific
interval, running for 30 secs and up to 10-15 minutes.
I can't figure out what's going on. In my years of threaded programming
this is the first time I've seen it (if it makes me a novice, please
don't rub it in :) I've found some information about "ERESTARTNOHAND"
(one hint was /etc/security/limits.conf) and gotten the feeling that it
has more to do with RedHat 9.0 than python2.3.3, but I'd really like to
hear from someone who perhaps has got some experience with this.
Server and setup:
Compiled Python2.3.3 on RedHat 9.0 with default Athlon kernel.
The server starts a XMLRPCServer and Controller. The Controller starts
15 threads doing urllib2.urlopen with data, using queue.get_nowait(),
received on the XMLRPCServer . Each thread has it's own MySQLdb
connection doing INSER DELAYED.
mxTidy is used before data is fed to an HTMLParser instance.
regards
/rune 1 2416
Rune Hansen wrote: select(0, NULL, NULL, NULL, {0, 8000}) = 0 (Timeout) futex(0x822f530, FUTEX_WAKE, 1) = 0 gettimeofday({1075823054, 603000}, NULL) = 0 futex(0x822f530, FUTEX_WAKE, 1) = 0 select(0, NULL, NULL, NULL, {0, 16000}) = 0 (Timeout) futex(0x822f530, FUTEX_WAKE, 1) = 0 gettimeofday({1075823054, 623210}, NULL) = 0 futex(0x822f530, FUTEX_WAKE, 1) = 0 select(0, NULL, NULL, NULL, {0, 30370}) = ? ERESTARTNOHAND (To be restarted) +++ killed by SIGSEGV +++
This is the output from strace -o xx python2.3 Spider.py, Spider.py being a threaded web crawler. The server segfaults at no specific interval, running for 30 secs and up to 10-15 minutes.
I can't figure out what's going on. In my years of threaded programming this is the first time I've seen it (if it makes me a novice, please don't rub it in :) I've found some information about "ERESTARTNOHAND" (one hint was /etc/security/limits.conf) and gotten the feeling that it has more to do with RedHat 9.0 than python2.3.3, but I'd really like to hear from someone who perhaps has got some experience with this.
Server and setup: Compiled Python2.3.3 on RedHat 9.0 with default Athlon kernel.
The server starts a XMLRPCServer and Controller. The Controller starts 15 threads doing urllib2.urlopen with data, using queue.get_nowait(), received on the XMLRPCServer . Each thread has it's own MySQLdb connection doing INSER DELAYED. mxTidy is used before data is fed to an HTMLParser instance.
regards
/rune
In answer to my own question I'd like to quote our benevolent dictator:
"In any project that is multi-threaded, most bugs will come from
threading issues.
This is regardless of programming language -- it's a deep, as yet
ununderstood property of threads."
-- Guido van Rossum
So, there you are. Lesson learned.
regards
/rune This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Lane LiaBraaten |
last post by:
I am developing a GUI that uses multiple threading.Threads, and Queue.Queues
for communicating between the threads, and threading.Timers for checking the
queues.
Everything works well (runs to...
|
by: Garry Hodgson |
last post by:
a colleague of mine has seen an odd problem in some code of ours.
we initially noticed it on webware, but in distilling a test case it seems
to be strictly a python issue. in the real system, it...
|
by: Jerry Sievers |
last post by:
Greetings Pythonists;
I have limited experience with threaded apps and plenty with old style
forked heavyweight multi-processing apps.
Using Python 2.3.3 on a Redhat 7.x machine.
Wondering...
|
by: MattB |
last post by:
Hello
I am starting a new thread in a button click event.
This thread calls an method which sends emails, I don't want the page
to wait for the emails to finish going out as it slows the user...
|
by: John |
last post by:
I've got some reasonably complex business logic in my C# code, in a class
called by a ASP.NET page. This takes around 3-4 seconds to execute. It's not
dependent on SQL calls or anything like that....
|
by: Anthony Nystrom |
last post by:
What is the correct way to stop a thread? abort? sleep? Will it start up
again... Just curious... If the thread is enabling a form, if the form is
disposed is the thread as well?
Thanks,
...
|
by: Simon Verona |
last post by:
I think I'm doing this wrong :
I have a class with a public shared method such as follows:
public shared sub myFunction
dim frm as new myFrm
dim t as new Threading.Thread(Addressof ...
|
by: Mathieu Prevot |
last post by:
2008/8/13 Parimala <parimala.b@accord-soft.com>:
Hi,
a terminate method is given here:
http://sebulba.wikispaces.com/recipe+thread2
so you can terminate the thread by:
(...)
|
by: Edwin.Madari |
last post by:
1. check out the Caveats for thread module: http://docs.python.org/lib/module-thread.html
Threads interact strangely with interrupts: the KeyboardInterrupt exceptionwill be received by an...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
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...
|
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,...
| |