By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,814 Members | 1,136 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,814 IT Pros & Developers. It's quick & easy.

Debug Infinite Loop?

P: n/a
I have a multi-threaded background program in Python
(http://www.bmsi.com/python/milter.html). Rarely, several threads will
get themselves into an infinite loop. The system continues to run - but
with more and more of the CPU eaten by the looping threads. stderr is
connected to a logfile, and exceptions print stack traces to the logfile -
so debugging them is easy. However, I haven't been able to find a way to
cause a looping thread to terminate with a stack trace. I am on RedHat
7.2. Sending SIGINT to the looping thread doesn't do anything. The
situation may be complicated by the fact that the application uses
libmilter - a C library which does signal handling in its own C thread
(initiating an orderly shutdown on SIGTERM). This may be interfering
with reception on SIGINT by python threads.

I am looking for the best way to get a stack trace from a looping
Python background thread.

--
Stuart D. Gathman <st****@bmsi.com>
Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flamis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.

Jul 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.