473,406 Members | 2,867 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,406 software developers and data experts.

Threading server exits ERESTARTNOHAND

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

Jul 18 '05 #1
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
Jul 18 '05 #2

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

Similar topics

1
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...
5
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...
12
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...
8
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...
13
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....
7
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, ...
14
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 ...
1
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: (...)
0
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
jinu1996
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...
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.