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

Threads with Python 2.2.2 on Red Hat 9.0

I am seeing some problems with threads on Red Hat Linux 9.0. With no
LD_ASSUME_KERNEL environment variable set, a large proportion, possibly
20%, of threads do not run. They are created OK and their __init__ which
includes a setDaemon(1) is successful. start() is called on the thread
object and a message successfully displayed after the start() call. But
no message is produced by the thread's run() method. The thread class is
derived directly from threading.Thread and in its __init__ calls
threading.Thread.__init__(self) before calling self.setDaemon(1).

The problem can be fixed by setting LD_ASSUME_KERNEL to 2.2.5 which
turns off the Native Posix Thread Library. It can also be fixed by using
Python 2.3.1. Recompiling Python 2.2.2 sees the same problem although it
may be occurring less often. I would prefer to be able to deliver on a
standard Red Hat 9. The code is quite complex, including large libraries
such as Oracle support and the problem could be a bug in a library or in
our code.

Does anyone know of any incompatibilities between Python 2.2.2 and
the Native Posix Thread Library? Googling found traces of problems but
no strong conclusion.

Neil

Jul 18 '05 #1
2 1130
On Fri, Dec 19, 2003 at 12:27:50AM +0000, Neil Hodgson wrote:
I am seeing some problems with threads on Red Hat Linux 9.0. With no
LD_ASSUME_KERNEL environment variable set, a large proportion, possibly
20%, of threads do not run. They are created OK and their __init__ which
includes a setDaemon(1) is successful. start() is called on the thread
object and a message successfully displayed after the start() call. But
no message is produced by the thread's run() method. The thread class is
derived directly from threading.Thread and in its __init__ calls
threading.Thread.__init__(self) before calling self.setDaemon(1).


Can you post the code that causes this problem? Preferably, it should be
the smallest program that consistently displays different behavior with
and without setting LD_ASSUME_KERNEL. The regression tests for threads
pass fine on RH9.

Oren

Jul 18 '05 #2
Oren Tirosh:
Can you post the code that causes this problem? Preferably, it should be
the smallest program that consistently displays different behavior with
and without setting LD_ASSUME_KERNEL. The regression tests for threads
pass fine on RH9.


Thanks for the reply, Oren. My company has just broken up for the year
and won't be back until January 12th, so I can't experiment now. As I
haven't seen any 'yes, it is a known problem' replies, I expect this is a
problem in our code, so will try removing chunks of functionality until it
starts working.

Neil
Jul 18 '05 #3

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

Similar topics

5
by: Bart Nessux | last post by:
Could someone explain the concept of threads and how I might use them in Python? I was a math major, not a CS major (theory instead of practice). Most of my programming knowledge has grown out of...
3
by: Ronan Viernes | last post by:
Hi, I have created a python script (see below) to count the maximum number of threads per process (by starting new threads continuously until it breaks). ###### #testThread.py import...
8
by: Alban Hertroys | last post by:
Hello, I'm using psycopg to insert records in a number of threads. After the threads finish, another thread runs to collect the inserted data. Now, my problem is that psycopg let's my threads...
11
by: Przemysław Różycki | last post by:
Hello, I have written some code, which creates many threads for each connection ('main connection'). The purpose of this code is to balance the load between several connections ('pipes'). The...
4
by: Steve Horsley | last post by:
I am trying to start two threads to do some time consuming work. This is my first stab at threading, and it isn't working as I expect. Instead of the threads starting when I call start(), they seem...
4
by: Rhamphoryncus | last post by:
First a bit about myself. I've been programming in python several years now, and I've got several more years before that with C. I've got a lot of interest in the more theoretical stuff (language...
1
by: Leonard J. Reder | last post by:
Hello Mark, I took your three day course here at JPL and recall that you said something was wrong with the implementation of threads within Python but I cannot recall what. So what is wrong...
29
by: Jeffrey Maitland | last post by:
Hello all, I am in the process of writing a multithreading program and what I was wondering is a sleep command in an executing function will affect the threads below it? Here is a basic example...
41
by: Carl J. Van Arsdall | last post by:
Hey everyone, I have a question about python threads. Before anyone goes further, this is not a debate about threads vs. processes, just a question. With that, are python threads reliable? Or...
6
by: nikhilketkar | last post by:
What are the implications of the Global Interpreter Lock in Python ? Does this mean that Python threads cannot exploit a dual core processor and the only advantage of using threads is in that...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.