Message11260

Author jamesmudd
Recipients jamesmudd, stefan.richthofer, stuckyb
Date 2017-03-21.20:44:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1490129082.66.0.159642888787.issue2532@psf.upfronthosting.co.za>
In-reply-to
Content
I can reproduce this and it is actually an issue with the cpython launch script when used on Linux (it's ok on Windows). The shell script works correctly and should probably be used on Linux, but this should still be fixed I guess.

With shell script:
james@james-ubuntu:~/git/jython/dist$ ./bin/jython -J-Xmx345m
Jython 2.7.1rc1 (, Mar 21 2017, 20:17:11) 
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.8.0_111
Type "help", "copyright", "credits" or "license" for more information.
>>> from java.lang.management import ManagementFactory
>>> ManagementFactory.getRuntimeMXBean().getInputArguments()
[-Xmx345m, -Xss2560k, -Dpython.home=., -Dpython.executable=./bin/jython]

But with cpython launch script:
james@james-ubuntu:~/git/jython/dist$ python bin/jython.py -J-Xmx345m
Jython 2.7.1rc1 (, Mar 21 2017, 20:17:11) 
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.8.0_111
Type "help", "copyright", "credits" or "license" for more information.
>>> from java.lang.management import ManagementFactory
>>> ManagementFactory.getRuntimeMXBean().getInputArguments()
[-Xss2560k, -Dpython.home=/home/james/git/jython/dist, -Dpython.executable=/home/james/git/jython/dist/bin/jython.py, -Dpython.launcher.uname=linux, -Dpython.launcher.tty=true]
>>>
The Xmx setting doesn't get passed to the JVM

If you add the --print it correctly shows the -Xmx arg which should be passed.

It does seem to be caused by the use of os.execvp on line 431 instead of using subprocess.call which will be used on Windows, i'm assuming there is some good reason for this difference?
History
Date User Action Args
2017-03-21 20:44:42jamesmuddsetmessageid: <1490129082.66.0.159642888787.issue2532@psf.upfronthosting.co.za>
2017-03-21 20:44:42jamesmuddsetrecipients: + jamesmudd, stefan.richthofer, stuckyb
2017-03-21 20:44:42jamesmuddlinkissue2532 messages
2017-03-21 20:44:41jamesmuddcreate