Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Difficult Python thread problem on AIX SMP machine

Reply
Thread Tools

Difficult Python thread problem on AIX SMP machine

 
 
Gardner Pomper
Guest
Posts: n/a
 
      11-12-2003
Hi,

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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
putenv for AIX and ifdef for AIX ClownPleco C Programming 5 08-24-2007 02:15 PM
SMP MPP VLIW for machine code Java, Forth, C, Scheme, etc. Reply7471859353@wmconnect.com Java 1 07-31-2005 05:52 AM
SMP MPP VLIW for machine code Java, Forth, C, Scheme, etc. Reply7471859353@wmconnect.com Java 1 07-23-2005 02:33 AM
Looking for AIX 5.2 binaries, IS anyone running Ruby on AIX 5.2 ?? bww00amdahl@yahoo.com Ruby 5 07-08-2005 11:54 AM
help! multi-threading problem on hyperthreading smp linux server Garry Hodgson Python 5 02-14-2004 12:21 AM



Advertisments