472,353 Members | 1,995 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

Difficult Python thread problem on AIX SMP machine


I am pretty new to python, so be gentle :)

I have a python script that spawns a number of threads (configurable) on a
12 processor AIX RISC-6000 machine. It works fine, so long as I am running
less than 5 threads. With more than 5, I get errors, but only on AIX, not
on Linux.

The python script is fairly simple, because each thread just spawns a korn
shell script. I actually get the error in the shell script, not in python,
but I think it may be python related, because I don't get the error when I
run the whole thing as a korn shell script.

Basically, each thread does:

pipe0_ = os.popen( 't.ksh 2>&1', 'r')
text0_ = pipe0_.read()
sts0_ = pipe0_.close()`

to spawn a shell script (t.ksh) that does:

cd subdir
ls -l
exit $?

There is a different subdir for each thread.

This works fine, so long as I am running less than 5 threads. But once I
run more than that, I start getting an error from the script:

sh: /home/gpomper/tmp/t8/thread.ksh: 0403-015 Cannot access a required
executable file. It is in use.

This problem only occurs on AIX. It runs fine on my Red Hat 9.0 machine.

I have tried to find what that AIX error means, with no luck. My problem
is made more difficult, because I try to simulate the error by writing a
korn shell script that basically does this:

t.ksh &
t.ksh &
t.ksh &
t.ksh &

repeated 20 times, and modify t.ksh so that it loops 100 time, so that I
can guarantee that all the processes are running simultaneously. When I
try this, I don't get the error.

Unfortunately, this makes AIX tech support think that this is a python
issue, not an AIX issue.

I would be *extremely* grateful for helpful suggestions.

- Gardner

Jul 18 '05 #1
0 2398

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

Similar topics

by: Anthony Baxter | last post by:
On behalf of the Python development team and the Python community, I'm happy to announce the release of Python 2.3.1 (final). Python 2.3.1 is a...
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...
by: 63q2o4i02 | last post by:
Hi, I've been thinking about Python vs. Lisp. I've been learning Python the past few months and like it very much. A few years ago I had an AI...
by: robert | last post by:
When employing complex UI libs (wx, win32ui, ..) and other extension libs, nice "only Python stack traces" remain a myth. Currently I'm hunting...
by: H J van Rooyen | last post by:
Hi, I want to write a small system that is transaction based. I want to split the GUI front end data entry away from the file handling and...
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...

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.