[ python-Bugs-1015937 ] os.system segmentation fault

SourceForge.net noreply at sourceforge.net
Thu Aug 26 02:04:13 CEST 2004


Bugs item #1015937, was opened at 2004-08-25 09:25
Message generated for change (Comment added) made by kowaltowski
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1015937&group_id=5470

Category: Threads
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Tomasz Kowaltowski (kowaltowski)
Assigned to: Nobody/Anonymous (nobody)
Summary: os.system segmentation fault 

Initial Comment:
System used: Linux Fedora Core 2.
Python version: Python 2.3.3 (#1, May  7 2004, 10:31:40)
------------------------------------------------

Depending on the build used for Java, its invocation
through os.system within a thread causes a segmentation
fault. The attached short program illustrates this problem.

Any Java class 'DoNothing.class' (also attached) in the
current directory will do. Notice that only the second
one of the two builds 04 and 05 causes this problem.

It migh be a Java problem but I tried the same thing
with pthreads in C, and no problems occured.

-- Tomasz Kowaltowski


----------------------------------------------------------------------

>Comment By: Tomasz Kowaltowski (kowaltowski)
Date: 2004-08-25 21:04

Message:
Logged In: YES 
user_id=185428

I tried all these things. Adding 'strace' to the command
line to be executed reports a segmentation fault which was
already expected because of the error code 11 printed by the
Python test program. 'ulimit -a' reports everything that
counts unlimited. I also tried Java memory options without
any success. You are right -- it is the java that is dying
not Python, but it only happens under this unusual circumstance.

It seems to me that if it were an environment problem it
would happen within any call of os.system. It happens
however only within Python threads: I tested both packages
'thread' and 'threading' and they both had the same
behavior. It does not happen if no threads are envolved, or
if threads are programmed in C.

----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2004-08-25 19:02

Message:
Logged In: YES 
user_id=33168

This sounds like an environment problem.  I'm guessing that
the stack is being blown and the kernel is killing the
process.  It's java that's dying, not python, correct?  

I don't have _05.  _04 works fine for me one Fedora 1.  Can
you use strace or gdb to try to determine what's happening?
 I'm not sure if anyone will be able to reproduce this
problem.  Can you also try starting java with options to
lower the the memory consumption, e.g., -Xss -Xmx.

>From your shell you can also try raising stack size, etc
with ulimit.  This may get java to run ok.  -s changes the
stack size.  BTW, what does ulimit -a report?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1015937&group_id=5470


More information about the Python-bugs-list mailing list