jepp-users Mailing List for Java Embedded Python (Page 5)
Brought to you by:
mrjohnson0
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(7) |
Sep
(4) |
Oct
(3) |
Nov
(4) |
Dec
|
2007 |
Jan
|
Feb
|
Mar
(4) |
Apr
(12) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(17) |
Dec
|
2008 |
Jan
|
Feb
(9) |
Mar
(7) |
Apr
|
May
(7) |
Jun
|
Jul
(8) |
Aug
|
Sep
|
Oct
(3) |
Nov
(5) |
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
(8) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
(3) |
Feb
(2) |
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
(7) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
|
Sep
(1) |
Oct
(4) |
Nov
(3) |
Dec
(1) |
2012 |
Jan
|
Feb
(3) |
Mar
(1) |
Apr
|
May
(2) |
Jun
(9) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2013 |
Jan
|
Feb
(3) |
Mar
(2) |
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
(1) |
Dec
(5) |
2014 |
Jan
(5) |
Feb
(1) |
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
(5) |
Aug
(7) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
(1) |
Apr
(2) |
May
(7) |
Jun
(13) |
Jul
(2) |
Aug
(3) |
Sep
(1) |
Oct
|
Nov
|
Dec
(1) |
2016 |
Jan
(2) |
Feb
(2) |
Mar
(1) |
Apr
(5) |
May
(1) |
Jun
(2) |
Jul
(2) |
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2017 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Marcin Z. <ms...@wp...> - 2012-02-28 13:08:01
|
Dnia 28-02-2012 o godz. 10:39 Marcin Zajączkowski napisał(a): > Hi, > > I tried to use a simple Java class in Python code based on a > http://jepp.sourceforge.net/usage.html#features > > <code> > from java.util import Arrays > > print Arrays.toString(stringArray) > </code> > > Unfortnately I've got: jep.JepException: <type > 'exceptions.ImportError'>: No module named java.util. > > I tried also with examples in a documentation, but with no luck. Do you > know what could be wrong? I have found that using code in Test.java and test.py is much more useful. The problem was with missing additional imports. Working code (for other group's readers): <code> from jep import * __builtins__.__import__ = jep.jimport from java.util import Arrays </code> Regards Marcin > > Jepp 2.4, CPython 2.7.2, Fedora 16, 64-bit > > Regards > Marcin |
From: Marcin Z. <ms...@wp...> - 2012-02-28 09:39:25
|
Hi, I tried to use a simple Java class in Python code based on a http://jepp.sourceforge.net/usage.html#features <code> from java.util import Arrays print Arrays.toString(stringArray) </code> Unfortnately I've got: jep.JepException: <type 'exceptions.ImportError'>: No module named java.util. I tried also with examples in a documentation, but with no luck. Do you know what could be wrong? Jepp 2.4, CPython 2.7.2, Fedora 16, 64-bit Regards Marcin |
From: Andreas B. <and...@go...> - 2011-12-15 16:59:34
|
Hello, I've got a problem at the import from dynamic shared libraries when i use jep to run the python script. I have got a python script which imports a dynamic shared library, for example "test.so". If the script runs with python everything works fine. The same script crashes when i want to run it from java by using jep with the error : Exception in thread "main" jep.JepException: <type 'exceptions.ImportError'>: /usr/lib/libboost_python-py26.so.1.40.0: undefined symbol: PyExc_ImportError Does anybody know why jep throws this exception or how the problem can be fixed?? Thank you. Regards, Andreas |
From: Mike J. <mi...@pu...> - 2011-11-23 19:00:33
|
Hi all, I'm not currently planning on updating the Windows build. On x64 it doesn't appear possible to compile a Python to link against the same MSVCRT that Oracle is compiling current Java builds with. And I no longer have the vs6 compiler in order to compile a new 2.7 Python, not to mention the build processes have changed and the vs files appear to be out of date for the older compiler versions. Nothing in my career has sucked as much as trying to build this on Windows. Please stop using Windows. :-) Mike On Tue, Nov 22, 2011 at 11:36 PM, Andy Gotz <and...@es...> wrote: > Hi Jon, > > I have built jep2.4 on Linux Ubuntu 11.10 using python2.7 and it > compiles, install and the test runs with the output below. > > I presume despite the exceptions it is working. A least jep lets me > import numpy+scipy which are needed by our programs. > > Andy > > > On 11/22/2011 08:46 AM, Jonathan WRIGHT wrote: > > Hi Mike, > > > > Are you planning to do a release for python27? We are about to try to > > make a new release of our application and a couple of python libraries > > now want to drop support for python25. If we can skip straight to > > python27 it would bring us right up to date. Do you know of anything > > which might be problematic in the latest python release? > > > > Thanks > > > > Jon > > > > > ------------------------------------------------------------------------------ > > All the data continuously generated in your IT infrastructure > > contains a definitive record of customers, application performance, > > security threats, fraudulent activity, and more. Splunk takes this > > data and makes sense of it. IT sense. And common sense. > > http://p.sf.net/sfu/splunk-novd2d > > _______________________________________________ > > Jepp-users mailing list > > Jep...@li... > > https://lists.sourceforge.net/lists/listinfo/jepp-users > > goetz@andy-laptop:~/jepp/jep-2.4$ java -classpath src jep.Test 0 > running i: 0 > 1 > 1.0 > 1 > Hello world using Jep. > sys.path: ['/home/goetz/jepp/jep-2.4', > '/opt/sardana/lib/python2.6/site-packages', '/usr/lib/python2.7', > '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', > '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', > '/usr/local/lib/python2.7/dist-packages', > '/usr/lib/python2.7/dist-packages', > '/usr/lib/python2.7/dist-packages/PIL', > '/usr/lib/python2.7/dist-packages/gst-0.10', > '/usr/lib/python2.7/dist-packages/gtk-2.0', > '/usr/lib/pymodules/python2.7', > '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', > '/usr/lib/python2.7/dist-packages/ubuntuone-client', > '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel', > '/usr/lib/python2.7/dist-packages/ubuntuone-couch', > '/usr/lib/python2.7/dist-packages/ubuntuone-installer', > '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol', > '/home/goetz/jepp/jep-2.4/.'] > dir(jep): ['JBOOLEAN_ID', 'JBYTE_ID', 'JCHAR_ID', 'JDOUBLE_ID', > 'JFLOAT_ID', 'JINT_ID', 'JLONG_ID', 'JSHORT_ID', 'JSTRING_ID', > 'VERSION', '__doc__', '__name__', '__package__', 'findClass', 'forName', > 'jarray', 'jimport', 'jproxy', 'printStack'] > > ################################################## > # test parameters > ################################################## > > dir test object: ['booleanField', 'byteField', 'callStaticVoid', > 'callback', 'charField', 'classField', 'doubleField', 'equals', > 'floatField', 'getBooleanArray', 'getByte', 'getChar', 'getClass', > 'getClassDouble', 'getClassFloat', 'getClassLong', 'getDouble', > 'getEnum', 'getFloat', 'getFloatArray', 'getInt', 'getIntArray', > 'getInteger', 'getJep', 'getLong', 'getObject', 'getObjectArray', > 'getShort', 'getShortArray', 'getStaticBoolean', 'getStaticByte', > 'getStaticChar', 'getStaticClass', 'getStaticDouble', 'getStaticFloat', > 'getStaticInt', 'getStaticLong', 'getStaticObject', 'getStaticShort', > 'getStaticString', 'getStringArray', 'getStringStringArray', 'hashCode', > 'intField', 'longField', 'main', 'notify', 'notifyAll', 'run', > 'sendIntArray', 'sendMeSomeStuff', 'sendObjectArray', 'shortField', > 'staticBoolean', 'staticByte', 'staticChar', 'staticClass', > 'staticDouble', 'staticFloat', 'staticInt', 'staticLong', 'staticShort', > 'staticString', 'stringField', 'toString', 'wait'] > test object: toString(). Thanks for calling Java(tm). > test parameter: value from java. > test int param: 0 > test bool param: 1 > test long param: 123123122112 > double param: 123.123 > float param: 12312.1230469 > test byte: 127 > test char: t > test null obj: None > test class obj: toString(). Thanks for calling Java(tm). > test b array: 1 > test d array: 1.79769313486e+308 > test b array: 1 > test d array: 1.79769313486e+308 > > ################################################## > # test method calling > ################################################## > > test callback: Hey, you called a Java(tm) method! > test toString: toString(). Thanks for calling Java(tm). > test getInt: 2147483647 > test getShort: 321 > test getLong: 9223372036854775807 > test getDouble: 1.79769313486e+308 > test getFloat: 3.40282346639e+38 > test getByte: 123 > test getChar: c > test getClass: > dir getInteger: ['MAX_VALUE', 'MIN_VALUE', 'SIZE', 'TYPE', 'bitCount', > 'byteValue', 'compareTo', 'decode', 'doubleValue', 'equals', > 'floatValue', 'getClass', 'getInteger', 'hashCode', 'highestOneBit', > 'intValue', 'longValue', 'lowestOneBit', 'notify', 'notifyAll', > 'numberOfLeadingZeros', 'numberOfTrailingZeros', 'parseInt', 'reverse', > 'reverseBytes', 'rotateLeft', 'rotateRight', 'shortValue', 'signum', > 'toBinaryString', 'toHexString', 'toOctalString', 'toString', 'valueOf', > 'wait'] > dir getLong: ['MAX_VALUE', 'MIN_VALUE', 'SIZE', 'TYPE', 'bitCount', > 'byteValue', 'compareTo', 'decode', 'doubleValue', 'equals', > 'floatValue', 'getClass', 'getLong', 'hashCode', 'highestOneBit', > 'intValue', 'longValue', 'lowestOneBit', 'notify', 'notifyAll', > 'numberOfLeadingZeros', 'numberOfTrailingZeros', 'parseLong', 'reverse', > 'reverseBytes', 'rotateLeft', 'rotateRight', 'shortValue', 'signum', > 'toBinaryString', 'toHexString', 'toOctalString', 'toString', 'valueOf', > 'wait'] > long value: 9223372036854775807 > integer value: -2147483648 > double value: 4.9E-324 > float value: 3.4028235E38 > dir(jarrayList): ['add', 'addAll', 'clear', 'clone', 'contains', > 'containsAll', 'ensureCapacity', 'equals', 'get', 'getClass', > 'hashCode', 'indexOf', 'isEmpty', 'iterator', 'lastIndexOf', > 'listIterator', 'notify', 'notifyAll', 'remove', 'removeAll', > 'retainAll', 'set', 'size', 'subList', 'toArray', 'toString', > 'trimToSize', 'wait'] > test getObject list 0 > dir(it) ['equals', 'getClass', 'hasNext', 'hashCode', 'next', > 'notify', 'notifyAll', 'remove', 'toString', 'wait'] > it.hasNext() 1 > array parameter: list 1 > got some stuff: v = an arraylist object and a = [list 0, list 1, list 2] > test send stuff None > got some stuff: v = null and a = [list 0, list 1, list 2] > test send stuff None > > ################################################## > # test constructors > ################################################## > > new Integer: 12 > new HashMap: {test=w00t} > new Boolean: false > <PyJobject object at 0x7faec8209c48> > make jstring: tested new string > make long: 123123123123123 > make double: 132123.123123 > make float: 123.123 > make char: j > make byte: 123 > > ################################################## > # test fields > ################################################## > > stringField: a stringField > intField: 123 > shortField: 321 > booleanField: 1 > longField: 9223372036854775807 > doubleField: 123.123 > floatField: 3.40282346639e+38 > byteField: 43 > charField: c > classField: > stringField: a new string for loop: 0 > intField: 0 > shortField: 0 > booleanField: 0 > longField: -9223372036854775807 > doubleField: 1223123.123 > floatField: 12312.1220703 > byteField: 2 > charField: j > classField: > > ################################################## > # test static fields > ################################################## > > staticString: stringField > staticInt: 123 > staticShort: 321 > staticBoolean: 1 > staticLong: 9223372036854775807 > staticDouble: 123.123 > staticFloat: 3.40282346639e+38 > staticChar: j > staticByte: 125 > staticClass: > > staticShort: 0 > staticString: a new string for loop: 0 > staticInt: 0 > staticBoolean: 1 > staticLong: -9223372036854775807 > staticDouble: 123.12 > staticFloat: 123.123001099 > staticChar: z > staticByte: -30 > staticClass: > staticString: a new string for loop: 0 > staticInt: 0 > staticShort: 0 > staticBoolean: 1 > staticLong: 9223372036854775807 > staticDouble: 213239.990921 > staticFloat: 3.21212315559 > staticChar: a > staticByte: -44 > int min value: -2147483648 > int min value: -2147483648 > ii type: <type 'PyJobject'> > Integer type: <type 'PyJobject'> > > ################################################## > # test static methods > ################################################## > > staticString: a static string. > staticBoolean: 0 > staticInt: 123 > staticShort: 321 > staticObject: java.lang.Object@199a0c7c > staticVoid: None > staticLong: 9223372036854775807 > staticDouble: 123123213.123 > staticFloat: 12312.1230469 > staticByte: 23 > staticChar: b > staticClass: > > ################################################## > # test exceptions > ################################################## > > 12: 12 > Exception in thread "main" java.lang.NumberFormatException: For input > string: "asdf" > at > > java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) > at java.lang.Integer.parseInt(Integer.java:481) > at java.lang.Integer.parseInt(Integer.java:514) > at jep.Jep.run(Native Method) > at jep.Jep.runScript(Jep.java:191) > at jep.Jep.runScript(Jep.java:167) > at jep.Test.run(Test.java:89) > at jep.Test.main(Test.java:371) > parseInt: caught NumberFormatException > Exception in thread "main" java.io.FileNotFoundException: asdf (No such > file or directory) > at java.io.FileInputStream.open(Native Method) > at java.io.FileInputStream.<init>(FileInputStream.java:137) > at java.io.FileInputStream.<init>(FileInputStream.java:96) > at jep.Jep.run(Native Method) > at jep.Jep.runScript(Jep.java:191) > at jep.Jep.runScript(Jep.java:167) > at jep.Test.run(Test.java:89) > at jep.Test.main(Test.java:371) > inputStream: caught FileNotFoundException > Integer = fixed > regression test. > regression: no crash yet > > ################################################## > # array handling > ################################################## > > configure starts #! /bin/sh > string[] len: 2 > [0], [1], [2]: one two two > [0], [1]: new None > sending: > array[0] = new > array[1] = null > string[][]: 2 > [0][1]: two > object array: 2 > [0], [1]: toString(). Thanks for calling Java(tm). toString(). > Thanks for calling Java(tm). > [0], [1]: toString(). Thanks for calling Java(tm). None > int array[0]: 1 > sending: <jarray object at 0x7faec8141b28> > array[0] = -99 > array[1] = 2 > bool array[1]: 1 > short [1]: 123 > float[0]: 123.123001099 > Float max: 3.40282346639e+38 > python loop 0 finished. > testMethod: 1 > testMethod: 123 > testMethod: 112 > testMethod: 112.23 > testMethod: 112.231231689 > testMethod: -45 > testMethod: t > testMethod: method called from Java > testMethod ret: 12 > Test get object: toString(). Thanks for calling Java(tm). > Test get string: value from java. > Test get int: 0 > Test get boolean: true > Test get long: 123123122112 > Test get double: 123.123 > Test get float: 12312.123 > Test get short: 127 > Test get null: null > Test get class: class jep.Test > Test get Python object: {'blah': 'har'} > get unknown val: <type 'exceptions.NameError'>: name '_asdf' is not defined > **** close me > test instance finalized, you should see this if the reference counting > worked... > test instance finalized, you should see this if the reference counting > worked... > test instance finalized, you should see this if the reference counting > worked... > > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure > contains a definitive record of customers, application performance, > security threats, fraudulent activity, and more. Splunk takes this > data and makes sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-novd2d > _______________________________________________ > Jepp-users mailing list > Jep...@li... > https://lists.sourceforge.net/lists/listinfo/jepp-users > |
From: Andy G. <and...@es...> - 2011-11-23 07:36:33
|
Hi Jon, I have built jep2.4 on Linux Ubuntu 11.10 using python2.7 and it compiles, install and the test runs with the output below. I presume despite the exceptions it is working. A least jep lets me import numpy+scipy which are needed by our programs. Andy On 11/22/2011 08:46 AM, Jonathan WRIGHT wrote: > Hi Mike, > > Are you planning to do a release for python27? We are about to try to > make a new release of our application and a couple of python libraries > now want to drop support for python25. If we can skip straight to > python27 it would bring us right up to date. Do you know of anything > which might be problematic in the latest python release? > > Thanks > > Jon > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure > contains a definitive record of customers, application performance, > security threats, fraudulent activity, and more. Splunk takes this > data and makes sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-novd2d > _______________________________________________ > Jepp-users mailing list > Jep...@li... > https://lists.sourceforge.net/lists/listinfo/jepp-users goetz@andy-laptop:~/jepp/jep-2.4$ java -classpath src jep.Test 0 running i: 0 1 1.0 1 Hello world using Jep. sys.path: ['/home/goetz/jepp/jep-2.4', '/opt/sardana/lib/python2.6/site-packages', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PIL', '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/ubuntuone-client', '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel', '/usr/lib/python2.7/dist-packages/ubuntuone-couch', '/usr/lib/python2.7/dist-packages/ubuntuone-installer', '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol', '/home/goetz/jepp/jep-2.4/.'] dir(jep): ['JBOOLEAN_ID', 'JBYTE_ID', 'JCHAR_ID', 'JDOUBLE_ID', 'JFLOAT_ID', 'JINT_ID', 'JLONG_ID', 'JSHORT_ID', 'JSTRING_ID', 'VERSION', '__doc__', '__name__', '__package__', 'findClass', 'forName', 'jarray', 'jimport', 'jproxy', 'printStack'] ################################################## # test parameters ################################################## dir test object: ['booleanField', 'byteField', 'callStaticVoid', 'callback', 'charField', 'classField', 'doubleField', 'equals', 'floatField', 'getBooleanArray', 'getByte', 'getChar', 'getClass', 'getClassDouble', 'getClassFloat', 'getClassLong', 'getDouble', 'getEnum', 'getFloat', 'getFloatArray', 'getInt', 'getIntArray', 'getInteger', 'getJep', 'getLong', 'getObject', 'getObjectArray', 'getShort', 'getShortArray', 'getStaticBoolean', 'getStaticByte', 'getStaticChar', 'getStaticClass', 'getStaticDouble', 'getStaticFloat', 'getStaticInt', 'getStaticLong', 'getStaticObject', 'getStaticShort', 'getStaticString', 'getStringArray', 'getStringStringArray', 'hashCode', 'intField', 'longField', 'main', 'notify', 'notifyAll', 'run', 'sendIntArray', 'sendMeSomeStuff', 'sendObjectArray', 'shortField', 'staticBoolean', 'staticByte', 'staticChar', 'staticClass', 'staticDouble', 'staticFloat', 'staticInt', 'staticLong', 'staticShort', 'staticString', 'stringField', 'toString', 'wait'] test object: toString(). Thanks for calling Java(tm). test parameter: value from java. test int param: 0 test bool param: 1 test long param: 123123122112 double param: 123.123 float param: 12312.1230469 test byte: 127 test char: t test null obj: None test class obj: toString(). Thanks for calling Java(tm). test b array: 1 test d array: 1.79769313486e+308 test b array: 1 test d array: 1.79769313486e+308 ################################################## # test method calling ################################################## test callback: Hey, you called a Java(tm) method! test toString: toString(). Thanks for calling Java(tm). test getInt: 2147483647 test getShort: 321 test getLong: 9223372036854775807 test getDouble: 1.79769313486e+308 test getFloat: 3.40282346639e+38 test getByte: 123 test getChar: c test getClass: dir getInteger: ['MAX_VALUE', 'MIN_VALUE', 'SIZE', 'TYPE', 'bitCount', 'byteValue', 'compareTo', 'decode', 'doubleValue', 'equals', 'floatValue', 'getClass', 'getInteger', 'hashCode', 'highestOneBit', 'intValue', 'longValue', 'lowestOneBit', 'notify', 'notifyAll', 'numberOfLeadingZeros', 'numberOfTrailingZeros', 'parseInt', 'reverse', 'reverseBytes', 'rotateLeft', 'rotateRight', 'shortValue', 'signum', 'toBinaryString', 'toHexString', 'toOctalString', 'toString', 'valueOf', 'wait'] dir getLong: ['MAX_VALUE', 'MIN_VALUE', 'SIZE', 'TYPE', 'bitCount', 'byteValue', 'compareTo', 'decode', 'doubleValue', 'equals', 'floatValue', 'getClass', 'getLong', 'hashCode', 'highestOneBit', 'intValue', 'longValue', 'lowestOneBit', 'notify', 'notifyAll', 'numberOfLeadingZeros', 'numberOfTrailingZeros', 'parseLong', 'reverse', 'reverseBytes', 'rotateLeft', 'rotateRight', 'shortValue', 'signum', 'toBinaryString', 'toHexString', 'toOctalString', 'toString', 'valueOf', 'wait'] long value: 9223372036854775807 integer value: -2147483648 double value: 4.9E-324 float value: 3.4028235E38 dir(jarrayList): ['add', 'addAll', 'clear', 'clone', 'contains', 'containsAll', 'ensureCapacity', 'equals', 'get', 'getClass', 'hashCode', 'indexOf', 'isEmpty', 'iterator', 'lastIndexOf', 'listIterator', 'notify', 'notifyAll', 'remove', 'removeAll', 'retainAll', 'set', 'size', 'subList', 'toArray', 'toString', 'trimToSize', 'wait'] test getObject list 0 dir(it) ['equals', 'getClass', 'hasNext', 'hashCode', 'next', 'notify', 'notifyAll', 'remove', 'toString', 'wait'] it.hasNext() 1 array parameter: list 1 got some stuff: v = an arraylist object and a = [list 0, list 1, list 2] test send stuff None got some stuff: v = null and a = [list 0, list 1, list 2] test send stuff None ################################################## # test constructors ################################################## new Integer: 12 new HashMap: {test=w00t} new Boolean: false <PyJobject object at 0x7faec8209c48> make jstring: tested new string make long: 123123123123123 make double: 132123.123123 make float: 123.123 make char: j make byte: 123 ################################################## # test fields ################################################## stringField: a stringField intField: 123 shortField: 321 booleanField: 1 longField: 9223372036854775807 doubleField: 123.123 floatField: 3.40282346639e+38 byteField: 43 charField: c classField: stringField: a new string for loop: 0 intField: 0 shortField: 0 booleanField: 0 longField: -9223372036854775807 doubleField: 1223123.123 floatField: 12312.1220703 byteField: 2 charField: j classField: ################################################## # test static fields ################################################## staticString: stringField staticInt: 123 staticShort: 321 staticBoolean: 1 staticLong: 9223372036854775807 staticDouble: 123.123 staticFloat: 3.40282346639e+38 staticChar: j staticByte: 125 staticClass: staticShort: 0 staticString: a new string for loop: 0 staticInt: 0 staticBoolean: 1 staticLong: -9223372036854775807 staticDouble: 123.12 staticFloat: 123.123001099 staticChar: z staticByte: -30 staticClass: staticString: a new string for loop: 0 staticInt: 0 staticShort: 0 staticBoolean: 1 staticLong: 9223372036854775807 staticDouble: 213239.990921 staticFloat: 3.21212315559 staticChar: a staticByte: -44 int min value: -2147483648 int min value: -2147483648 ii type: <type 'PyJobject'> Integer type: <type 'PyJobject'> ################################################## # test static methods ################################################## staticString: a static string. staticBoolean: 0 staticInt: 123 staticShort: 321 staticObject: java.lang.Object@199a0c7c staticVoid: None staticLong: 9223372036854775807 staticDouble: 123123213.123 staticFloat: 12312.1230469 staticByte: 23 staticChar: b staticClass: ################################################## # test exceptions ################################################## 12: 12 Exception in thread "main" java.lang.NumberFormatException: For input string: "asdf" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Integer.parseInt(Integer.java:481) at java.lang.Integer.parseInt(Integer.java:514) at jep.Jep.run(Native Method) at jep.Jep.runScript(Jep.java:191) at jep.Jep.runScript(Jep.java:167) at jep.Test.run(Test.java:89) at jep.Test.main(Test.java:371) parseInt: caught NumberFormatException Exception in thread "main" java.io.FileNotFoundException: asdf (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:137) at java.io.FileInputStream.<init>(FileInputStream.java:96) at jep.Jep.run(Native Method) at jep.Jep.runScript(Jep.java:191) at jep.Jep.runScript(Jep.java:167) at jep.Test.run(Test.java:89) at jep.Test.main(Test.java:371) inputStream: caught FileNotFoundException Integer = fixed regression test. regression: no crash yet ################################################## # array handling ################################################## configure starts #! /bin/sh string[] len: 2 [0], [1], [2]: one two two [0], [1]: new None sending: array[0] = new array[1] = null string[][]: 2 [0][1]: two object array: 2 [0], [1]: toString(). Thanks for calling Java(tm). toString(). Thanks for calling Java(tm). [0], [1]: toString(). Thanks for calling Java(tm). None int array[0]: 1 sending: <jarray object at 0x7faec8141b28> array[0] = -99 array[1] = 2 bool array[1]: 1 short [1]: 123 float[0]: 123.123001099 Float max: 3.40282346639e+38 python loop 0 finished. testMethod: 1 testMethod: 123 testMethod: 112 testMethod: 112.23 testMethod: 112.231231689 testMethod: -45 testMethod: t testMethod: method called from Java testMethod ret: 12 Test get object: toString(). Thanks for calling Java(tm). Test get string: value from java. Test get int: 0 Test get boolean: true Test get long: 123123122112 Test get double: 123.123 Test get float: 12312.123 Test get short: 127 Test get null: null Test get class: class jep.Test Test get Python object: {'blah': 'har'} get unknown val: <type 'exceptions.NameError'>: name '_asdf' is not defined **** close me test instance finalized, you should see this if the reference counting worked... test instance finalized, you should see this if the reference counting worked... test instance finalized, you should see this if the reference counting worked... |
From: Jonathan W. <wr...@es...> - 2011-11-22 07:47:01
|
Hi Mike, Are you planning to do a release for python27? We are about to try to make a new release of our application and a couple of python libraries now want to drop support for python25. If we can skip straight to python27 it would bring us right up to date. Do you know of anything which might be problematic in the latest python release? Thanks Jon |
From: Mike J. <mi...@pu...> - 2011-10-25 15:01:39
|
Hi Sergi, That's weird, the -MF flag is passed to the compiler and gcc should have written out that file. What version of gcc do you have? (gcc --version). You might try and older version of the compiler, too. If that doesn't work, send me the config.log file so I can see what was discovered during configure. Thanks, Mike On Tue, Oct 25, 2011 at 2:43 AM, Sergi Pons Freixes <spo...@gm...>wrote: > Hi All, > > I'm having some difficulties trying to build Jepp, and I cannot find > what I'm doing wrong. My machine is an Arch Linux: > Linux 3.0-ARCH #1 SMP PREEMPT x86_64 Intel(R) Core(TM) i5-2500 CPU @ > 3.30GHz GenuineIntel GNU/Linux > > Using openjdk for java: openjdk6 6.b22_1.10.4-1 > And Python 2.7: python2 2.7.2-2 > > Actually, my default Python is python 3.2.2-1, but as Jepp has not > been ported to Python 3, before beginning the installation procedure I > do an "export PYTHON=/usr/bin/python2", so it uses the path to the > Python 2 binary (and libraries, as I can see on the logs). > > So, there is no problem when running autogen.sh (automake 1.11.1-2 > here), and ./configure also runs ok. When doing the "make", it stalls > with: > ... > Making all in jep > make[3]: Entering directory `/home/sergi/installs/jep-2.4/src/jep' > /bin/sh ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H > -I. -I../.. -I/usr/lib/jvm/java-6-openjdk/include > -I/usr/lib/jvm/java-6-openjdk/include/linux -I/usr/include/python2.7 > -g -O2 -MT jep_object.lo -MD -MP -MF .deps/jep_object.Tpo -c -o > jep_object.lo `test -f 'python/jep_object.c' || echo > './'`python/jep_object.c > mv -f .deps/jep_object.Tpo .deps/jep_object.Plo > mv: cannot stat `.deps/jep_object.Tpo': No such file or directory > make[3]: *** [jep_object.lo] Error 1 > make[3]: Leaving directory `/home/sergi/installs/jep-2.4/src/jep' > make[2]: *** [all-recursive] Error 1 > make[2]: Leaving directory `/home/sergi/installs/jep-2.4/src' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/home/sergi/installs/jep-2.4' > make: *** [all] Error 2 > > Apart from that, I cannot glance any problem, missing dependency or > warning before, so no clue of why it's not building correctly. Any > help? > > Regards, > Sergi > > > ------------------------------------------------------------------------------ > The demand for IT networking professionals continues to grow, and the > demand for specialized networking skills is growing even more rapidly. > Take a complimentary Learning@Cisco Self-Assessment and learn > about Cisco certifications, training, and career opportunities. > http://p.sf.net/sfu/cisco-dev2dev > _______________________________________________ > Jepp-users mailing list > Jep...@li... > https://lists.sourceforge.net/lists/listinfo/jepp-users > |
From: Sergi P. F. <spo...@gm...> - 2011-10-25 14:46:53
|
Hi Mike, On Tue, Oct 25, 2011 at 4:36 PM, Mike Johnson <mi...@pu...> wrote: > > What version of gcc do you have? (gcc --version). You might try and older > version of the compiler, too. I have gcc 4.6.1 20110819 (prerelease). I'm gonna try with 4.5.3-2 later. |
From: Sergi P. F. <spo...@gm...> - 2011-10-25 09:43:59
|
Hi All, I'm having some difficulties trying to build Jepp, and I cannot find what I'm doing wrong. My machine is an Arch Linux: Linux 3.0-ARCH #1 SMP PREEMPT x86_64 Intel(R) Core(TM) i5-2500 CPU @ 3.30GHz GenuineIntel GNU/Linux Using openjdk for java: openjdk6 6.b22_1.10.4-1 And Python 2.7: python2 2.7.2-2 Actually, my default Python is python 3.2.2-1, but as Jepp has not been ported to Python 3, before beginning the installation procedure I do an "export PYTHON=/usr/bin/python2", so it uses the path to the Python 2 binary (and libraries, as I can see on the logs). So, there is no problem when running autogen.sh (automake 1.11.1-2 here), and ./configure also runs ok. When doing the "make", it stalls with: ... Making all in jep make[3]: Entering directory `/home/sergi/installs/jep-2.4/src/jep' /bin/sh ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/lib/jvm/java-6-openjdk/include -I/usr/lib/jvm/java-6-openjdk/include/linux -I/usr/include/python2.7 -g -O2 -MT jep_object.lo -MD -MP -MF .deps/jep_object.Tpo -c -o jep_object.lo `test -f 'python/jep_object.c' || echo './'`python/jep_object.c mv -f .deps/jep_object.Tpo .deps/jep_object.Plo mv: cannot stat `.deps/jep_object.Tpo': No such file or directory make[3]: *** [jep_object.lo] Error 1 make[3]: Leaving directory `/home/sergi/installs/jep-2.4/src/jep' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/sergi/installs/jep-2.4/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/sergi/installs/jep-2.4' make: *** [all] Error 2 Apart from that, I cannot glance any problem, missing dependency or warning before, so no clue of why it's not building correctly. Any help? Regards, Sergi |
From: Tobias W. <wa...@tz...> - 2011-10-18 21:36:26
|
Hi everybody. I managed to compile and run the Jepp 2.4 on Mac OS X Lion (with Python 2.7) and was able to invoke some of my own Python functions* from within Java-based JADE [1] agents. I was also able to receive return values. Thus, it seems that JEPP works in principle (LD_PRELOAD and LD_LIBRARY_PATH are supposedly set correctly (see below)). However, problems occur when I try to import some modules from the Orange machine learning toolkit [2]. Since only some modules cannot be imported, I'd like to ask for help on narrowing down the possible sources of the problem. <log_excerpt> $ cd <jepp_dir> $ python --version Python 2.7.2 $env ... LD_PRELOAD=/usr/lib/libpython2.7.dylib D_LIBRARY_PATH=/Users/horst/Plasma/scenarios/scenario_knowledge_transfer/lib (contains libjep.dylib) ... $ $ java -Djava.library.path=/Users/horst/Plasma/scenarios/scenario_knowledge_transfer/lib/ -classpath jep.jar jep.Run console.py Traceback (most recent call last): File "console.py", line 19, in <module> readline.read_history_file(HISTFILE) IOError: [Errno 2] No such file or directory <-- I assume, that I can live with this problem for the moment. >>> import numpy <-- works! ... >>> import Orange >>> import Orange.data >>> import Orange.data.sample >>> import Orange.misc Traceback (most recent call last): File "console.py", line 48, in prompt ran = jep.eval(line) RuntimeError: jep.JepException: jep.JepException: <type 'exceptions.TypeError'>: unsupported operand type(s) for +=: 'NoneType' and 'str' >>> ... </log_excerpt> Does anyone have ideas how I can proceed to get a better understanding for the root of this problem? Best regards. Tobias *) e.g.: a.) jep.eval("from tw.pythonBridge import initialize_learner, load_data"); b.) int res = (Integer) jep.invoke("initialize_learner"); c.) jep.invoke("load_data"); [1] http://jade.tilab.com/ [2] http://orange.biolab.si/ ------------------------------------------------------------ Dipl.-Inf. Tobias Warden TZI - Center for Computing and Communication Technologies Intelligent Systems Department Universität Bremen Am Fallturm 1, TAB (Entrance E), Room 2.61, D-28359 Bremen phone: ++49+421-218-64026 fax : ++49+421-218-64047 mail : wa...@tz... www : is.tzi.de/~warden ------------------------------------------------------------ |
From: Yang Z. <yan...@gm...> - 2011-09-29 04:55:37
|
Hi, I posted this problem to StackOverflow, and was wondering if anyone here might have some clues. This has been driving me up the wall - thanks in advance for any help: http://stackoverflow.com/questions/7592565/when-embedding-cpython-in-java-why-does-this-hang -- Yang Zhang http://yz.mit.edu/ |
From: John P <joh...@gm...> - 2011-07-20 02:39:06
|
That fixed my problem! One thing that wasn't clear to me from the usage guide ( http://jepp.sourceforge.net/usage.html) was _which_ library LD_PRELOAD needed to point to. I wasn't sure if I needed to find all the *.so files for every compiled python library (numpy, scipy, etc.) that I would need access to, and if I needed to find all the libraries that those libraries pointed to, etc etc. Thanks Mike! On Sat, Jul 16, 2011 at 1:33 AM, Mike Johnson <mrj...@gm...> wrote: > Here, try to run this from the jep directory (the one that has configure in > it): > > ldd src/jep/.libs/libjep.so | grep libpython | awk '{ print "export > LD_PRELOAD="$3}' > > That should print out a shell command that you can add to your java > startup script and should fix your problem. > > There doesn't seem to be a better way to do that. You've got to make > sure to preload the same library version that jep is built with, which > this command will do. > > Also, make sure you check out the usage docs which includes this step > (might say it better): > > http://jepp.sourceforge.net/usage.html > > Mike > > On Fri, Jul 15, 2011 at 11:11 AM, John P <joh...@gm...> wrote: > > Ok, gotcha. > > > > I haven't worked with shared libraries before, and am a novice to Java. I > > get that shared libraries need to be "*.so" and seem to be linked at > > execution time, but I don't know how they're found (what paths are > checked > > in what order) and how they are managed. > > > > So, for LD_PRELOAD, > > > > - How do I determine the paths to set it to? Is there a way to do this > > programmatically? For instance, I think I'm having a problem with > > /usr/lib/python2.6/dist-packages/numpy/core/multiarray.so. Do I need > > something that descends through its shared library "dependency tree", > finds > > needed libraries, (somehow) finds their locations, and returns all the > > paths? > > > > - Can I set LD_PRELOAD from a java command line parameter (like java > > -Djava.preload=/usr/bin) or something like that? > > > > - If it can be set programmatically, can this be done in java code that > > instantiates the Jep() object? > > > > - "normal lib folder indexed by ld" ... I'm sorry I don't know what > "normal > > lib folders" are ... or how/what indexes them ... or how to determine an > Id > > for them. I started digging around in > > http://lca2009.linux.org.au/slides/172.pdf but got lost. I'll look at it > > some more and hopefully I can find out some more information (possibly > the > > answers to my own questions!) there. > > > > I appreciated your quick response! > > > > Thanks! > > > > > > On Fri, Jul 15, 2011 at 12:39 PM, Mike Johnson <mrj...@gm...> > wrote: > >> > >> Hi, > >> > >> I'm going to be out until Tuesday, but it looks like you do need to set > >> the LD_PRELOAD variable to make sure the native libraries are loaded > >> correctly from Python. LD_LIBRARY_PATH is only really needed if you > install > >> outside of a normal lib folder indexed by ld. > >> > >> With hadoop, you probably just need to add export to the start script. > >> > >> Thanks, > >> Mike > >> > >> Sent from my mobile > >> > >> On Jul 15, 2011 8:51 AM, "John P" <joh...@gm...> wrote: > >> > I know this sort of problem has been addressed in other threads but > >> > can't > >> > quite figure out how to get around it for my case. > >> > > >> > I can use jep to open a python module and run functions in that > module. > >> > However, the entire reason that I'm using jep is to have access to > numpy > >> > and > >> > scipy. When I try to import numpy or scipy from my python module I get > >> > this > >> > error: > >> > > >> > java -Djava.library.path=. -jar jeptest.jar > >> > Exception in thread "main" jep.JepException: <type > >> > 'exceptions.ImportError'>: > >> > /usr/lib/python2.6/dist-packages/numpy/core/multiarray.so: undefined > >> > symbol: > >> > _Py_ZeroStruct > >> > at jep.Jep.run(Native Method) > >> > at jep.Jep.runScript(Jep.java:191) > >> > at jep.Jep.runScript(Jep.java:167) > >> > at jeptest.runme$.main(jeptest.scala:17) > >> > at jeptest.runme.main(jeptest.scala) > >> > > >> > Here are the steps I've taken: > >> > fresh install of Ubuntu 11.04 > >> > installed (using apt-get install python-numpy python-scipy) both numpy > >> > and > >> > scipy (python2.6 was already loaded on the instance) > >> > apt-get install sun-java6-jdk > >> > export JAVA_HOME=/usr/lib/jvm/java-6-sun > >> > sudo apt-get install python2.6-dev > >> > downloaded jep-2.4.tar.gz > >> > ran autoconf/configure/make/make install > >> > copied my libjeb.so to the folder I was running the jar from > >> > > >> > Please note the " -Djava.library.path=." in my command-line call to > >> > java. > >> > > >> > As explained in http://jepp.sourceforge.net/usage.html#tomcat, I > think I > >> > somehow also have to set LD_PRELOAD and LD_LIBRARY_PATH. But I have no > >> > clue > >> > what to set them to. In addition, I will be running this jar on a > hadoop > >> > cluster, so I will have to programmatically set both those > environmental > >> > variables. > >> > > >> > So my questions are: > >> > 1. Will setting LD_PRELOAD and LD_LIBRARY_PATH allow my python script > to > >> > successfully import & use numpy and scipy? > >> > 2. How do I determine the correct values for and set LD_PRELOAD and > >> > LD_LIBRARY_PATH programmatically from inside the jar that is going to > >> > instantiate jep? > >> > 3. If (2) isn't possible, what is my alternative? > >> > 4. I'm using " -Djava.library.path=." in my command-line java call. > This > >> > seems wrong to me, since I would think the current directory would be > >> > included in the java library path to begin with. (I realize that this > is > >> > more of java question than a jep question, but I figured that anyone > >> > answering the previous questions could shed some light on why/why > >> > not/how I > >> > should be using java.library.path correctly). > >> > > >> > Thanks in advance for your help! > > > > > > > > > > > > -- > Open source monitoring done right: http://www.leemba.com > |
From: Mike J. <mrj...@gm...> - 2011-07-16 06:34:07
|
Here, try to run this from the jep directory (the one that has configure in it): ldd src/jep/.libs/libjep.so | grep libpython | awk '{ print "export LD_PRELOAD="$3}' That should print out a shell command that you can add to your java startup script and should fix your problem. There doesn't seem to be a better way to do that. You've got to make sure to preload the same library version that jep is built with, which this command will do. Also, make sure you check out the usage docs which includes this step (might say it better): http://jepp.sourceforge.net/usage.html Mike On Fri, Jul 15, 2011 at 11:11 AM, John P <joh...@gm...> wrote: > Ok, gotcha. > > I haven't worked with shared libraries before, and am a novice to Java. I > get that shared libraries need to be "*.so" and seem to be linked at > execution time, but I don't know how they're found (what paths are checked > in what order) and how they are managed. > > So, for LD_PRELOAD, > > - How do I determine the paths to set it to? Is there a way to do this > programmatically? For instance, I think I'm having a problem with > /usr/lib/python2.6/dist-packages/numpy/core/multiarray.so. Do I need > something that descends through its shared library "dependency tree", finds > needed libraries, (somehow) finds their locations, and returns all the > paths? > > - Can I set LD_PRELOAD from a java command line parameter (like java > -Djava.preload=/usr/bin) or something like that? > > - If it can be set programmatically, can this be done in java code that > instantiates the Jep() object? > > - "normal lib folder indexed by ld" ... I'm sorry I don't know what "normal > lib folders" are ... or how/what indexes them ... or how to determine an Id > for them. I started digging around in > http://lca2009.linux.org.au/slides/172.pdf but got lost. I'll look at it > some more and hopefully I can find out some more information (possibly the > answers to my own questions!) there. > > I appreciated your quick response! > > Thanks! > > > On Fri, Jul 15, 2011 at 12:39 PM, Mike Johnson <mrj...@gm...> wrote: >> >> Hi, >> >> I'm going to be out until Tuesday, but it looks like you do need to set >> the LD_PRELOAD variable to make sure the native libraries are loaded >> correctly from Python. LD_LIBRARY_PATH is only really needed if you install >> outside of a normal lib folder indexed by ld. >> >> With hadoop, you probably just need to add export to the start script. >> >> Thanks, >> Mike >> >> Sent from my mobile >> >> On Jul 15, 2011 8:51 AM, "John P" <joh...@gm...> wrote: >> > I know this sort of problem has been addressed in other threads but >> > can't >> > quite figure out how to get around it for my case. >> > >> > I can use jep to open a python module and run functions in that module. >> > However, the entire reason that I'm using jep is to have access to numpy >> > and >> > scipy. When I try to import numpy or scipy from my python module I get >> > this >> > error: >> > >> > java -Djava.library.path=. -jar jeptest.jar >> > Exception in thread "main" jep.JepException: <type >> > 'exceptions.ImportError'>: >> > /usr/lib/python2.6/dist-packages/numpy/core/multiarray.so: undefined >> > symbol: >> > _Py_ZeroStruct >> > at jep.Jep.run(Native Method) >> > at jep.Jep.runScript(Jep.java:191) >> > at jep.Jep.runScript(Jep.java:167) >> > at jeptest.runme$.main(jeptest.scala:17) >> > at jeptest.runme.main(jeptest.scala) >> > >> > Here are the steps I've taken: >> > fresh install of Ubuntu 11.04 >> > installed (using apt-get install python-numpy python-scipy) both numpy >> > and >> > scipy (python2.6 was already loaded on the instance) >> > apt-get install sun-java6-jdk >> > export JAVA_HOME=/usr/lib/jvm/java-6-sun >> > sudo apt-get install python2.6-dev >> > downloaded jep-2.4.tar.gz >> > ran autoconf/configure/make/make install >> > copied my libjeb.so to the folder I was running the jar from >> > >> > Please note the " -Djava.library.path=." in my command-line call to >> > java. >> > >> > As explained in http://jepp.sourceforge.net/usage.html#tomcat, I think I >> > somehow also have to set LD_PRELOAD and LD_LIBRARY_PATH. But I have no >> > clue >> > what to set them to. In addition, I will be running this jar on a hadoop >> > cluster, so I will have to programmatically set both those environmental >> > variables. >> > >> > So my questions are: >> > 1. Will setting LD_PRELOAD and LD_LIBRARY_PATH allow my python script to >> > successfully import & use numpy and scipy? >> > 2. How do I determine the correct values for and set LD_PRELOAD and >> > LD_LIBRARY_PATH programmatically from inside the jar that is going to >> > instantiate jep? >> > 3. If (2) isn't possible, what is my alternative? >> > 4. I'm using " -Djava.library.path=." in my command-line java call. This >> > seems wrong to me, since I would think the current directory would be >> > included in the java library path to begin with. (I realize that this is >> > more of java question than a jep question, but I figured that anyone >> > answering the previous questions could shed some light on why/why >> > not/how I >> > should be using java.library.path correctly). >> > >> > Thanks in advance for your help! > > > > -- Open source monitoring done right: http://www.leemba.com |
From: John P <joh...@gm...> - 2011-07-15 18:12:01
|
Ok, gotcha. I haven't worked with shared libraries before, and am a novice to Java. I get that shared libraries need to be "*.so" and seem to be linked at execution time, but I don't know how they're found (what paths are checked in what order) and how they are managed. So, for LD_PRELOAD, - How do I determine the paths to set it to? Is there a way to do this programmatically? For instance, I think I'm having a problem with /usr/lib/python2.6/dist-packages/numpy/core/multiarray.so. Do I need something that descends through its shared library "dependency tree", finds needed libraries, (somehow) finds their locations, and returns all the paths? - Can I set LD_PRELOAD from a java command line parameter (like java -Djava.preload=/usr/bin) or something like that? - If it can be set programmatically, can this be done in java code that instantiates the Jep() object? - "normal lib folder indexed by ld" ... I'm sorry I don't know what "normal lib folders" are ... or how/what indexes them ... or how to determine an Id for them. I started digging around in http://lca2009.linux.org.au/slides/172.pdf but got lost. I'll look at it some more and hopefully I can find out some more information (possibly the answers to my own questions!) there. I appreciated your quick response! Thanks! On Fri, Jul 15, 2011 at 12:39 PM, Mike Johnson <mrj...@gm...> wrote: > > Hi, > > I'm going to be out until Tuesday, but it looks like you do need to set the LD_PRELOAD variable to make sure the native libraries are loaded correctly from Python. LD_LIBRARY_PATH is only really needed if you install outside of a normal lib folder indexed by ld. > > With hadoop, you probably just need to add export to the start script. > > Thanks, > Mike > > Sent from my mobile > > On Jul 15, 2011 8:51 AM, "John P" <joh...@gm...> wrote: > > I know this sort of problem has been addressed in other threads but can't > > quite figure out how to get around it for my case. > > > > I can use jep to open a python module and run functions in that module. > > However, the entire reason that I'm using jep is to have access to numpy and > > scipy. When I try to import numpy or scipy from my python module I get this > > error: > > > > java -Djava.library.path=. -jar jeptest.jar > > Exception in thread "main" jep.JepException: <type > > 'exceptions.ImportError'>: > > /usr/lib/python2.6/dist-packages/numpy/core/multiarray.so: undefined symbol: > > _Py_ZeroStruct > > at jep.Jep.run(Native Method) > > at jep.Jep.runScript(Jep.java:191) > > at jep.Jep.runScript(Jep.java:167) > > at jeptest.runme$.main(jeptest.scala:17) > > at jeptest.runme.main(jeptest.scala) > > > > Here are the steps I've taken: > > fresh install of Ubuntu 11.04 > > installed (using apt-get install python-numpy python-scipy) both numpy and > > scipy (python2.6 was already loaded on the instance) > > apt-get install sun-java6-jdk > > export JAVA_HOME=/usr/lib/jvm/java-6-sun > > sudo apt-get install python2.6-dev > > downloaded jep-2.4.tar.gz > > ran autoconf/configure/make/make install > > copied my libjeb.so to the folder I was running the jar from > > > > Please note the " -Djava.library.path=." in my command-line call to java. > > > > As explained in http://jepp.sourceforge.net/usage.html#tomcat, I think I > > somehow also have to set LD_PRELOAD and LD_LIBRARY_PATH. But I have no clue > > what to set them to. In addition, I will be running this jar on a hadoop > > cluster, so I will have to programmatically set both those environmental > > variables. > > > > So my questions are: > > 1. Will setting LD_PRELOAD and LD_LIBRARY_PATH allow my python script to > > successfully import & use numpy and scipy? > > 2. How do I determine the correct values for and set LD_PRELOAD and > > LD_LIBRARY_PATH programmatically from inside the jar that is going to > > instantiate jep? > > 3. If (2) isn't possible, what is my alternative? > > 4. I'm using " -Djava.library.path=." in my command-line java call. This > > seems wrong to me, since I would think the current directory would be > > included in the java library path to begin with. (I realize that this is > > more of java question than a jep question, but I figured that anyone > > answering the previous questions could shed some light on why/why not/how I > > should be using java.library.path correctly). > > > > Thanks in advance for your help! |
From: Mike J. <mrj...@gm...> - 2011-07-15 18:02:06
|
Hi, I'm going to be out until Tuesday, but it looks like you do need to set the LD_PRELOAD variable to make sure the native libraries are loaded correctly from Python. LD_LIBRARY_PATH is only really needed if you install outside of a normal lib folder indexed by ld. With hadoop, you probably just need to add export to the start script. Thanks, Mike Sent from my mobile On Jul 15, 2011 8:51 AM, "John P" <joh...@gm...> wrote: > I know this sort of problem has been addressed in other threads but can't > quite figure out how to get around it for my case. > > I can use jep to open a python module and run functions in that module. > However, the entire reason that I'm using jep is to have access to numpy and > scipy. When I try to import numpy or scipy from my python module I get this > error: > > java -Djava.library.path=. -jar jeptest.jar > Exception in thread "main" jep.JepException: <type > 'exceptions.ImportError'>: > /usr/lib/python2.6/dist-packages/numpy/core/multiarray.so: undefined symbol: > _Py_ZeroStruct > at jep.Jep.run(Native Method) > at jep.Jep.runScript(Jep.java:191) > at jep.Jep.runScript(Jep.java:167) > at jeptest.runme$.main(jeptest.scala:17) > at jeptest.runme.main(jeptest.scala) > > Here are the steps I've taken: > fresh install of Ubuntu 11.04 > installed (using apt-get install python-numpy python-scipy) both numpy and > scipy (python2.6 was already loaded on the instance) > apt-get install sun-java6-jdk > export JAVA_HOME=/usr/lib/jvm/java-6-sun > sudo apt-get install python2.6-dev > downloaded jep-2.4.tar.gz > ran autoconf/configure/make/make install > copied my libjeb.so to the folder I was running the jar from > > Please note the " -Djava.library.path=." in my command-line call to java. > > As explained in http://jepp.sourceforge.net/usage.html#tomcat, I think I > somehow also have to set LD_PRELOAD and LD_LIBRARY_PATH. But I have no clue > what to set them to. In addition, I will be running this jar on a hadoop > cluster, so I will have to programmatically set both those environmental > variables. > > So my questions are: > 1. Will setting LD_PRELOAD and LD_LIBRARY_PATH allow my python script to > successfully import & use numpy and scipy? > 2. How do I determine the correct values for and set LD_PRELOAD and > LD_LIBRARY_PATH programmatically from inside the jar that is going to > instantiate jep? > 3. If (2) isn't possible, what is my alternative? > 4. I'm using " -Djava.library.path=." in my command-line java call. This > seems wrong to me, since I would think the current directory would be > included in the java library path to begin with. (I realize that this is > more of java question than a jep question, but I figured that anyone > answering the previous questions could shed some light on why/why not/how I > should be using java.library.path correctly). > > Thanks in advance for your help! |
From: John P <joh...@gm...> - 2011-07-15 15:51:23
|
I know this sort of problem has been addressed in other threads but can't quite figure out how to get around it for my case. I can use jep to open a python module and run functions in that module. However, the entire reason that I'm using jep is to have access to numpy and scipy. When I try to import numpy or scipy from my python module I get this error: java -Djava.library.path=. -jar jeptest.jar Exception in thread "main" jep.JepException: <type 'exceptions.ImportError'>: /usr/lib/python2.6/dist-packages/numpy/core/multiarray.so: undefined symbol: _Py_ZeroStruct at jep.Jep.run(Native Method) at jep.Jep.runScript(Jep.java:191) at jep.Jep.runScript(Jep.java:167) at jeptest.runme$.main(jeptest.scala:17) at jeptest.runme.main(jeptest.scala) Here are the steps I've taken: fresh install of Ubuntu 11.04 installed (using apt-get install python-numpy python-scipy) both numpy and scipy (python2.6 was already loaded on the instance) apt-get install sun-java6-jdk export JAVA_HOME=/usr/lib/jvm/java-6-sun sudo apt-get install python2.6-dev downloaded jep-2.4.tar.gz ran autoconf/configure/make/make install copied my libjeb.so to the folder I was running the jar from Please note the " -Djava.library.path=." in my command-line call to java. As explained in http://jepp.sourceforge.net/usage.html#tomcat, I think I somehow also have to set LD_PRELOAD and LD_LIBRARY_PATH. But I have no clue what to set them to. In addition, I will be running this jar on a hadoop cluster, so I will have to programmatically set both those environmental variables. So my questions are: 1. Will setting LD_PRELOAD and LD_LIBRARY_PATH allow my python script to successfully import & use numpy and scipy? 2. How do I determine the correct values for and set LD_PRELOAD and LD_LIBRARY_PATH programmatically from inside the jar that is going to instantiate jep? 3. If (2) isn't possible, what is my alternative? 4. I'm using " -Djava.library.path=." in my command-line java call. This seems wrong to me, since I would think the current directory would be included in the java library path to begin with. (I realize that this is more of java question than a jep question, but I figured that anyone answering the previous questions could shed some light on why/why not/how I should be using java.library.path correctly). Thanks in advance for your help! |
From: Jonathan W. <wr...@es...> - 2011-01-18 10:59:38
|
Hi Andy, I'm fairly sure I'm using one I built today from the .tar.gz in the sf downloads. I check with strace and it seems to be picking up the right one. There is a difference that on windows I get an hs_err_pid.log file but on unix I just get test failures. It might also be related to the crusty compiler on redhate4. Can you check it on an ubuntu machine? Should be just: export JAVA_HOME=/path/to/jdk ./configure make Thanks Jon On 18/01/2011 11:34, Andrew Goetz wrote: > Hi Jon, > > I think we have a slightly modified version of Jepp in FABLE. I remember > turning off OPTIMISATION at one point. We should do a diff on the Jepp > source code in our repository and the one on the Jepp download sight to > be sure. > > Any changes to the source code might explain why we have a memory leak > and Mike does not see one. > > Andy > |
From: Andrew G. <and...@es...> - 2011-01-18 10:35:06
|
Hi Jon, I think we have a slightly modified version of Jepp in FABLE. I remember turning off OPTIMISATION at one point. We should do a diff on the Jepp source code in our repository and the one on the Jepp download sight to be sure. Any changes to the source code might explain why we have a memory leak and Mike does not see one. Andy Quoting Jonathan WRIGHT <wr...@es...>: > Hi Matthew, > > I am able to reproduce the leak using jepp2.4 compiled on redhat > enterprise 4 x86_64 with python2.5.1 and this java: > Java(TM) SE Runtime Environment (build 1.6.0_10-rc-b28) > Java HotSpot(TM) 64-Bit Server VM (build 11.0-b15, mixed mode) > > I also see a problem using the windows version of jepp from the > sourceforge pages (jep-2.5-Java6-python25.exe). Java is up to date > (1.6.0_23) in this case. Full details are below. > > If Mike is not seeing the leak, I'm wondering what we're doing wrong? It > took me a while to figure out how to run the unit test - I hope that > doesn't have an effect. > > Cheers > > Jon > === > > > > Versions: > > C:\Program Files (x86)\Jepp>"c:\Program Files > (x86)\Java\jre6\bin\java.exe" -cp jep.jar jep.Run console.py > > No readline available. > You may want to set the LD_PRELOAD environment variable, see the > README file for details. > > > i.e.: export LD_PRELOAD=/usr/lib/libpython2.3.so.1.0 > > If your platform really doesn't have readline, try this: > http://newcenturycomputers.net/projects/readline.html > >>> import sys > >>> sys.executable > 'c:\\Program Files (x86)\\Java\\jre6\\bin\\java.exe' > >>> sys.version > '2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)]' > >>> > > > C:\Users\wright\Programming\builds\jepp\Gerring>"c:\Program Files > (x86)\Java\jre6\bin\java.exe" -cp junit-4.8.1.jar;jep.jar;. > org.junit.runner.JUnitCore JepTest > > > # > # A fatal error has been detected by the Java Runtime Environment: > # > # java.lang.OutOfMemoryError: requested 16777216 bytes for jint in > C:\BUILD_AREA > \jdk6_23\hotspot\src\share\vm\prims\jni.cpp. Out of swap space? > # > # Internal Error (allocation.inline.hpp:39), pid=2056, tid=4028 > # Error: jint in C:\BUILD_AREA\jdk6_23\hotspot\src\share\vm\prims\jni.cpp > # > # JRE version: 6.0_23-b05 > # Java VM: Java HotSpot(TM) Client VM (19.0-b09 mixed mode, sharing > windows-x86 > ) > # An error report file with more information is saved as: > # C:\Users\wright\Programming\builds\jepp\Gerring\hs_err_pid2056.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > > > > > > # > # A fatal error has been detected by the Java Runtime Environment: > # > # java.lang.OutOfMemoryError: requested 16777216 bytes for jint in > C:\BUILD_AREA\jdk6_23\hotspot\src\share\vm\prims\jni.cpp. Out of swap space? > # > # Internal Error (allocation.inline.hpp:39), pid=2056, tid=4028 > # Error: jint in C:\BUILD_AREA\jdk6_23\hotspot\src\share\vm\prims\jni.cpp > # > # JRE version: 6.0_23-b05 > # Java VM: Java HotSpot(TM) Client VM (19.0-b09 mixed mode, sharing > windows-x86 ) > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > > --------------- T H R E A D --------------- > > Current thread (0x004fec00): JavaThread "main" [_thread_in_vm, id=4028, > stack(0x00430000,0x00480000)] > > Stack: [0x00430000,0x00480000], sp=0x0047efd0, free space=315k > Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, > C=native code) > V [jvm.dll+0x200a27] > V [jvm.dll+0xa53fc] > V [jvm.dll+0x107e10] > > Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) > j jep.Jep.eval(JLjava/lang/String;)V+0 > j jep.Jep.eval(Ljava/lang/String;)Z+123 > J JepTest.testSendingMemoryWithPythonCallingData()V > v ~StubRoutines::call_stub > j > sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+0 > j > sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+87 > j > sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6 > j > java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+161 > j > org.junit.runners.model.FrameworkMethod$1.runReflectiveCall()Ljava/lang/Object;+15 > j > org.junit.internal.runners.model.ReflectiveCallable.run()Ljava/lang/Object;+1 > j > org.junit.runners.model.FrameworkMethod.invokeExplosively(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+10 > j org.junit.internal.runners.statements.InvokeMethod.evaluate()V+12 > j > org.junit.runners.BlockJUnit4ClassRunner.runChild(Lorg/junit/runners/model/FrameworkMethod;Lorg/junit/runner/notification/RunNotifier;)V+31 > j > org.junit.runners.BlockJUnit4ClassRunner.runChild(Ljava/lang/Object;Lorg/junit/runner/notification/RunNotifier;)V+6 > j org.junit.runners.ParentRunner$3.run()V+12 > j org.junit.runners.ParentRunner$1.schedule(Ljava/lang/Runnable;)V+1 > j > org.junit.runners.ParentRunner.runChildren(Lorg/junit/runner/notification/RunNotifier;)V+40 > j > org.junit.runners.ParentRunner.access$000(Lorg/junit/runners/ParentRunner;Lorg/junit/runner/notification/RunNotifier;)V+2 > j org.junit.runners.ParentRunner$2.evaluate()V+8 > j > org.junit.runners.ParentRunner.run(Lorg/junit/runner/notification/RunNotifier;)V+20 > j > org.junit.runners.Suite.runChild(Lorg/junit/runner/Runner;Lorg/junit/runner/notification/RunNotifier;)V+2 > j > org.junit.runners.Suite.runChild(Ljava/lang/Object;Lorg/junit/runner/notification/RunNotifier;)V+6 > j org.junit.runners.ParentRunner$3.run()V+12 > j org.junit.runners.ParentRunner$1.schedule(Ljava/lang/Runnable;)V+1 > j > org.junit.runners.ParentRunner.runChildren(Lorg/junit/runner/notification/RunNotifier;)V+40 > j > org.junit.runners.ParentRunner.access$000(Lorg/junit/runners/ParentRunner;Lorg/junit/runner/notification/RunNotifier;)V+2 > j org.junit.runners.ParentRunner$2.evaluate()V+8 > j > org.junit.runners.ParentRunner.run(Lorg/junit/runner/notification/RunNotifier;)V+20 > j > org.junit.runner.JUnitCore.run(Lorg/junit/runner/Runner;)Lorg/junit/runner/Result;+37 > j > org.junit.runner.JUnitCore.run(Lorg/junit/runner/Request;)Lorg/junit/runner/Result;+5 > j > org.junit.runner.JUnitCore.run([Ljava/lang/Class;)Lorg/junit/runner/Result;+8 > j > org.junit.runner.JUnitCore.runMain(Lorg/junit/internal/JUnitSystem;[Ljava/lang/String;)Lorg/junit/runner/Result;+188 > j > org.junit.runner.JUnitCore.runMainAndExit(Lorg/junit/internal/JUnitSystem;[Ljava/lang/String;)V+9 > j org.junit.runner.JUnitCore.main([Ljava/lang/String;)V+8 > v ~StubRoutines::call_stub > > --------------- P R O C E S S --------------- > > Java Threads: ( => current thread ) > 0x0052d000 JavaThread "Low Memory Detector" daemon [_thread_blocked, > id=2912, stack(0x049f0000,0x04a40000)] > 0x0052b800 JavaThread "CompilerThread0" daemon [_thread_blocked, > id=4164, stack(0x04960000,0x049b0000)] > 0x0052a800 JavaThread "Attach Listener" daemon [_thread_blocked, > id=3432, stack(0x048d0000,0x04920000)] > 0x00527000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > id=4628, stack(0x04840000,0x04890000)] > 0x00520800 JavaThread "Finalizer" daemon [_thread_blocked, id=5032, > stack(0x047b0000,0x04800000)] > 0x0051f000 JavaThread "Reference Handler" daemon [_thread_blocked, > id=2012, stack(0x04720000,0x04770000)] > =>0x004fec00 JavaThread "main" [_thread_in_vm, id=4028, > stack(0x00430000,0x00480000)] > > Other Threads: > 0x0051e000 VMThread [stack: 0x04690000,0x046e0000] [id=4860] > 0x0052e800 WatcherThread [stack: 0x04a80000,0x04ad0000] [id=3552] > > VM state:not at safepoint (normal execution) > > VM Mutex/Monitor currently owned by a thread: None > > Heap > def new generation total 4992K, used 89K [0x24170000, 0x246d0000, > 0x296c0000) > eden space 4480K, 2% used [0x24170000, 0x241866c0, 0x245d0000) > from space 512K, 0% used [0x245d0000, 0x245d0000, 0x24650000) > to space 512K, 0% used [0x24650000, 0x24650000, 0x246d0000) > tenured generation total 27336K, used 16554K [0x296c0000, > 0x2b172000, 0x34170000) > the space 27336K, 60% used [0x296c0000, 0x2a6ea990, 0x2a6eaa00, > 0x2b172000) > compacting perm gen total 12288K, used 503K [0x34170000, 0x34d70000, > 0x38170000) > the space 12288K, 4% used [0x34170000, 0x341ede80, 0x341ee000, > 0x34d70000) > ro space 10240K, 51% used [0x38170000, 0x3869bd20, 0x3869be00, > 0x38b70000) > rw space 12288K, 54% used [0x38b70000, 0x39207d58, 0x39207e00, > 0x39770000) > > Dynamic libraries: > 0x00400000 - 0x00424000 c:\Program Files (x86)\Java\jre6\bin\java.exe > 0x774b0000 - 0x77630000 C:\Windows\SysWOW64\ntdll.dll > 0x761a0000 - 0x762a0000 C:\Windows\syswow64\kernel32.dll > 0x758b0000 - 0x758f6000 C:\Windows\syswow64\KERNELBASE.dll > 0x75710000 - 0x757b0000 C:\Windows\syswow64\ADVAPI32.dll > 0x754f0000 - 0x7559c000 C:\Windows\syswow64\msvcrt.dll > 0x76080000 - 0x76099000 C:\Windows\SysWOW64\sechost.dll > 0x753f0000 - 0x754e0000 C:\Windows\syswow64\RPCRT4.dll > 0x75020000 - 0x75080000 C:\Windows\syswow64\SspiCli.dll > 0x75010000 - 0x7501c000 C:\Windows\syswow64\CRYPTBASE.dll > 0x7c340000 - 0x7c396000 c:\Program Files (x86)\Java\jre6\bin\msvcr71.dll > 0x6d7f0000 - 0x6da9c000 c:\Program Files (x86)\Java\jre6\bin\client\jvm.dll > 0x75f80000 - 0x76080000 C:\Windows\syswow64\USER32.dll > 0x75ee0000 - 0x75f70000 C:\Windows\syswow64\GDI32.dll > 0x754e0000 - 0x754ea000 C:\Windows\syswow64\LPK.dll > 0x75d70000 - 0x75e0d000 C:\Windows\syswow64\USP10.dll > 0x6f380000 - 0x6f3b2000 C:\Windows\system32\WINMM.dll > 0x75d10000 - 0x75d70000 C:\Windows\system32\IMM32.DLL > 0x75a50000 - 0x75b1c000 C:\Windows\syswow64\MSCTF.dll > 0x74050000 - 0x7409b000 C:\Windows\system32\apphelp.dll > 0x6d7a0000 - 0x6d7ac000 c:\Program Files (x86)\Java\jre6\bin\verify.dll > 0x6d320000 - 0x6d33f000 c:\Program Files (x86)\Java\jre6\bin\java.dll > 0x6d280000 - 0x6d288000 c:\Program Files (x86)\Java\jre6\bin\hpi.dll > 0x77480000 - 0x77485000 C:\Windows\syswow64\PSAPI.DLL > 0x6d7e0000 - 0x6d7ef000 c:\Program Files (x86)\Java\jre6\bin\zip.dll > 0x10000000 - 0x10011000 C:\Windows\System32\jep.dll > 0x1e000000 - 0x1e208000 C:\Windows\system32\python25.dll > 0x76460000 - 0x770a9000 C:\Windows\syswow64\SHELL32.dll > 0x75630000 - 0x75687000 C:\Windows\syswow64\SHLWAPI.dll > > VM Arguments: > java_command: org.junit.runner.JUnitCore JepTest > Launcher Type: SUN_STANDARD > > Environment Variables: > JAVA_HOME="c:\Program Files\Java\jdk1.6.0_23" > PATH=C:\python27\;C:\python27\scripts;C:\Program Files (x86)\Microsoft > Visual Studio 9.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual > Studio 9.0\VC\BIN\x86_amd64;C:\Program Files (x86)\Microsoft Visual > Studio 9.0\VC\BIN;C:\Program Files (x86)\Microsoft Visual Studio > 9.0\Common7\Tools;C:\Program Files (x86)\Microsoft Visual Studio > 9.0\Common7\Tools\bin;Framework32\;Framework32\\Microsoft .NET Framework > 3.5 (Pre-Release Version);Framework32\v2.0.50727;C:\Program Files > (x86)\Microsoft Visual Studio 9.0\VC\VCPackages;C:\Program > Files\Microsoft > SDKs\Windows\v6.1\bin;C:\python27\;C:\python27\scripts;C:\users\wright\software;C:\Tcl\bin;C:\Program > Files\NVIDIA GPU Computing > Toolkit\CUDA\v3.2\bin\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program > Files\Intel\DMIX;C:\Program Files (x86)\NTRU Cryptosystems\NTRU TCG > Software Stack\bin\;C:\Program Files\NTRU Cryptosystems\NTRU TCG > Software Stack\bin\;C:\Program Files\Wave Systems Corp\Gemalto\Access > Client\v5\;C:\Program Files (x86)\Common Files\Roxio > Shared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio > Shared\10.0\DLLShared\;C:\ProgramData\NVIDIA Corporation\NVIDIA GPU > Computing SDK 3.2\C\common\bin;C:\Program > Files\SlikSvn\bin\;C:\Windows\System32 > USERNAME=WRIGHT > OS=Windows_NT > PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 37 Stepping 5, GenuineIntel > > > > --------------- S Y S T E M --------------- > > OS: Windows 7 Build 7600 > > CPU:total 4 (2 cores per cpu, 2 threads per core) family 6 model 37 > stepping 5, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, > sse4.2, popcnt, ht > > Memory: 4k page, physical 4053388k(634312k free), swap 8104876k(4291604k > free) > > vm_info: Java HotSpot(TM) Client VM (19.0-b09) for windows-x86 JRE > (1.6.0_23-b05), built on Nov 12 2010 15:00:43 by "java_re" with MS VC++ > 7.1 (VS2003) > > time: Tue Jan 18 11:05:51 2011 > elapsed time: 6 seconds > > > > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > Jepp-users mailing list > Jep...@li... > https://lists.sourceforge.net/lists/listinfo/jepp-users > |
From: Jonathan W. <wr...@es...> - 2011-01-18 10:23:48
|
Hi Matthew, I am able to reproduce the leak using jepp2.4 compiled on redhat enterprise 4 x86_64 with python2.5.1 and this java: Java(TM) SE Runtime Environment (build 1.6.0_10-rc-b28) Java HotSpot(TM) 64-Bit Server VM (build 11.0-b15, mixed mode) I also see a problem using the windows version of jepp from the sourceforge pages (jep-2.5-Java6-python25.exe). Java is up to date (1.6.0_23) in this case. Full details are below. If Mike is not seeing the leak, I'm wondering what we're doing wrong? It took me a while to figure out how to run the unit test - I hope that doesn't have an effect. Cheers Jon === Versions: C:\Program Files (x86)\Jepp>"c:\Program Files (x86)\Java\jre6\bin\java.exe" -cp jep.jar jep.Run console.py No readline available. You may want to set the LD_PRELOAD environment variable, see the README file for details. i.e.: export LD_PRELOAD=/usr/lib/libpython2.3.so.1.0 If your platform really doesn't have readline, try this: http://newcenturycomputers.net/projects/readline.html >>> import sys >>> sys.executable 'c:\\Program Files (x86)\\Java\\jre6\\bin\\java.exe' >>> sys.version '2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)]' >>> C:\Users\wright\Programming\builds\jepp\Gerring>"c:\Program Files (x86)\Java\jre6\bin\java.exe" -cp junit-4.8.1.jar;jep.jar;. org.junit.runner.JUnitCore JepTest # # A fatal error has been detected by the Java Runtime Environment: # # java.lang.OutOfMemoryError: requested 16777216 bytes for jint in C:\BUILD_AREA \jdk6_23\hotspot\src\share\vm\prims\jni.cpp. Out of swap space? # # Internal Error (allocation.inline.hpp:39), pid=2056, tid=4028 # Error: jint in C:\BUILD_AREA\jdk6_23\hotspot\src\share\vm\prims\jni.cpp # # JRE version: 6.0_23-b05 # Java VM: Java HotSpot(TM) Client VM (19.0-b09 mixed mode, sharing windows-x86 ) # An error report file with more information is saved as: # C:\Users\wright\Programming\builds\jepp\Gerring\hs_err_pid2056.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # # # A fatal error has been detected by the Java Runtime Environment: # # java.lang.OutOfMemoryError: requested 16777216 bytes for jint in C:\BUILD_AREA\jdk6_23\hotspot\src\share\vm\prims\jni.cpp. Out of swap space? # # Internal Error (allocation.inline.hpp:39), pid=2056, tid=4028 # Error: jint in C:\BUILD_AREA\jdk6_23\hotspot\src\share\vm\prims\jni.cpp # # JRE version: 6.0_23-b05 # Java VM: Java HotSpot(TM) Client VM (19.0-b09 mixed mode, sharing windows-x86 ) # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # --------------- T H R E A D --------------- Current thread (0x004fec00): JavaThread "main" [_thread_in_vm, id=4028, stack(0x00430000,0x00480000)] Stack: [0x00430000,0x00480000], sp=0x0047efd0, free space=315k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [jvm.dll+0x200a27] V [jvm.dll+0xa53fc] V [jvm.dll+0x107e10] Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j jep.Jep.eval(JLjava/lang/String;)V+0 j jep.Jep.eval(Ljava/lang/String;)Z+123 J JepTest.testSendingMemoryWithPythonCallingData()V v ~StubRoutines::call_stub j sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+0 j sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+87 j sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6 j java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+161 j org.junit.runners.model.FrameworkMethod$1.runReflectiveCall()Ljava/lang/Object;+15 j org.junit.internal.runners.model.ReflectiveCallable.run()Ljava/lang/Object;+1 j org.junit.runners.model.FrameworkMethod.invokeExplosively(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+10 j org.junit.internal.runners.statements.InvokeMethod.evaluate()V+12 j org.junit.runners.BlockJUnit4ClassRunner.runChild(Lorg/junit/runners/model/FrameworkMethod;Lorg/junit/runner/notification/RunNotifier;)V+31 j org.junit.runners.BlockJUnit4ClassRunner.runChild(Ljava/lang/Object;Lorg/junit/runner/notification/RunNotifier;)V+6 j org.junit.runners.ParentRunner$3.run()V+12 j org.junit.runners.ParentRunner$1.schedule(Ljava/lang/Runnable;)V+1 j org.junit.runners.ParentRunner.runChildren(Lorg/junit/runner/notification/RunNotifier;)V+40 j org.junit.runners.ParentRunner.access$000(Lorg/junit/runners/ParentRunner;Lorg/junit/runner/notification/RunNotifier;)V+2 j org.junit.runners.ParentRunner$2.evaluate()V+8 j org.junit.runners.ParentRunner.run(Lorg/junit/runner/notification/RunNotifier;)V+20 j org.junit.runners.Suite.runChild(Lorg/junit/runner/Runner;Lorg/junit/runner/notification/RunNotifier;)V+2 j org.junit.runners.Suite.runChild(Ljava/lang/Object;Lorg/junit/runner/notification/RunNotifier;)V+6 j org.junit.runners.ParentRunner$3.run()V+12 j org.junit.runners.ParentRunner$1.schedule(Ljava/lang/Runnable;)V+1 j org.junit.runners.ParentRunner.runChildren(Lorg/junit/runner/notification/RunNotifier;)V+40 j org.junit.runners.ParentRunner.access$000(Lorg/junit/runners/ParentRunner;Lorg/junit/runner/notification/RunNotifier;)V+2 j org.junit.runners.ParentRunner$2.evaluate()V+8 j org.junit.runners.ParentRunner.run(Lorg/junit/runner/notification/RunNotifier;)V+20 j org.junit.runner.JUnitCore.run(Lorg/junit/runner/Runner;)Lorg/junit/runner/Result;+37 j org.junit.runner.JUnitCore.run(Lorg/junit/runner/Request;)Lorg/junit/runner/Result;+5 j org.junit.runner.JUnitCore.run([Ljava/lang/Class;)Lorg/junit/runner/Result;+8 j org.junit.runner.JUnitCore.runMain(Lorg/junit/internal/JUnitSystem;[Ljava/lang/String;)Lorg/junit/runner/Result;+188 j org.junit.runner.JUnitCore.runMainAndExit(Lorg/junit/internal/JUnitSystem;[Ljava/lang/String;)V+9 j org.junit.runner.JUnitCore.main([Ljava/lang/String;)V+8 v ~StubRoutines::call_stub --------------- P R O C E S S --------------- Java Threads: ( => current thread ) 0x0052d000 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=2912, stack(0x049f0000,0x04a40000)] 0x0052b800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=4164, stack(0x04960000,0x049b0000)] 0x0052a800 JavaThread "Attach Listener" daemon [_thread_blocked, id=3432, stack(0x048d0000,0x04920000)] 0x00527000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=4628, stack(0x04840000,0x04890000)] 0x00520800 JavaThread "Finalizer" daemon [_thread_blocked, id=5032, stack(0x047b0000,0x04800000)] 0x0051f000 JavaThread "Reference Handler" daemon [_thread_blocked, id=2012, stack(0x04720000,0x04770000)] =>0x004fec00 JavaThread "main" [_thread_in_vm, id=4028, stack(0x00430000,0x00480000)] Other Threads: 0x0051e000 VMThread [stack: 0x04690000,0x046e0000] [id=4860] 0x0052e800 WatcherThread [stack: 0x04a80000,0x04ad0000] [id=3552] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap def new generation total 4992K, used 89K [0x24170000, 0x246d0000, 0x296c0000) eden space 4480K, 2% used [0x24170000, 0x241866c0, 0x245d0000) from space 512K, 0% used [0x245d0000, 0x245d0000, 0x24650000) to space 512K, 0% used [0x24650000, 0x24650000, 0x246d0000) tenured generation total 27336K, used 16554K [0x296c0000, 0x2b172000, 0x34170000) the space 27336K, 60% used [0x296c0000, 0x2a6ea990, 0x2a6eaa00, 0x2b172000) compacting perm gen total 12288K, used 503K [0x34170000, 0x34d70000, 0x38170000) the space 12288K, 4% used [0x34170000, 0x341ede80, 0x341ee000, 0x34d70000) ro space 10240K, 51% used [0x38170000, 0x3869bd20, 0x3869be00, 0x38b70000) rw space 12288K, 54% used [0x38b70000, 0x39207d58, 0x39207e00, 0x39770000) Dynamic libraries: 0x00400000 - 0x00424000 c:\Program Files (x86)\Java\jre6\bin\java.exe 0x774b0000 - 0x77630000 C:\Windows\SysWOW64\ntdll.dll 0x761a0000 - 0x762a0000 C:\Windows\syswow64\kernel32.dll 0x758b0000 - 0x758f6000 C:\Windows\syswow64\KERNELBASE.dll 0x75710000 - 0x757b0000 C:\Windows\syswow64\ADVAPI32.dll 0x754f0000 - 0x7559c000 C:\Windows\syswow64\msvcrt.dll 0x76080000 - 0x76099000 C:\Windows\SysWOW64\sechost.dll 0x753f0000 - 0x754e0000 C:\Windows\syswow64\RPCRT4.dll 0x75020000 - 0x75080000 C:\Windows\syswow64\SspiCli.dll 0x75010000 - 0x7501c000 C:\Windows\syswow64\CRYPTBASE.dll 0x7c340000 - 0x7c396000 c:\Program Files (x86)\Java\jre6\bin\msvcr71.dll 0x6d7f0000 - 0x6da9c000 c:\Program Files (x86)\Java\jre6\bin\client\jvm.dll 0x75f80000 - 0x76080000 C:\Windows\syswow64\USER32.dll 0x75ee0000 - 0x75f70000 C:\Windows\syswow64\GDI32.dll 0x754e0000 - 0x754ea000 C:\Windows\syswow64\LPK.dll 0x75d70000 - 0x75e0d000 C:\Windows\syswow64\USP10.dll 0x6f380000 - 0x6f3b2000 C:\Windows\system32\WINMM.dll 0x75d10000 - 0x75d70000 C:\Windows\system32\IMM32.DLL 0x75a50000 - 0x75b1c000 C:\Windows\syswow64\MSCTF.dll 0x74050000 - 0x7409b000 C:\Windows\system32\apphelp.dll 0x6d7a0000 - 0x6d7ac000 c:\Program Files (x86)\Java\jre6\bin\verify.dll 0x6d320000 - 0x6d33f000 c:\Program Files (x86)\Java\jre6\bin\java.dll 0x6d280000 - 0x6d288000 c:\Program Files (x86)\Java\jre6\bin\hpi.dll 0x77480000 - 0x77485000 C:\Windows\syswow64\PSAPI.DLL 0x6d7e0000 - 0x6d7ef000 c:\Program Files (x86)\Java\jre6\bin\zip.dll 0x10000000 - 0x10011000 C:\Windows\System32\jep.dll 0x1e000000 - 0x1e208000 C:\Windows\system32\python25.dll 0x76460000 - 0x770a9000 C:\Windows\syswow64\SHELL32.dll 0x75630000 - 0x75687000 C:\Windows\syswow64\SHLWAPI.dll VM Arguments: java_command: org.junit.runner.JUnitCore JepTest Launcher Type: SUN_STANDARD Environment Variables: JAVA_HOME="c:\Program Files\Java\jdk1.6.0_23" PATH=C:\python27\;C:\python27\scripts;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\x86_amd64;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\bin;Framework32\;Framework32\\Microsoft .NET Framework 3.5 (Pre-Release Version);Framework32\v2.0.50727;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\VCPackages;C:\Program Files\Microsoft SDKs\Windows\v6.1\bin;C:\python27\;C:\python27\scripts;C:\users\wright\software;C:\Tcl\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v3.2\bin\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\DMIX;C:\Program Files (x86)\NTRU Cryptosystems\NTRU TCG Software Stack\bin\;C:\Program Files\NTRU Cryptosystems\NTRU TCG Software Stack\bin\;C:\Program Files\Wave Systems Corp\Gemalto\Access Client\v5\;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\10.0\DLLShared\;C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 3.2\C\common\bin;C:\Program Files\SlikSvn\bin\;C:\Windows\System32 USERNAME=WRIGHT OS=Windows_NT PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 37 Stepping 5, GenuineIntel --------------- S Y S T E M --------------- OS: Windows 7 Build 7600 CPU:total 4 (2 cores per cpu, 2 threads per core) family 6 model 37 stepping 5, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, ht Memory: 4k page, physical 4053388k(634312k free), swap 8104876k(4291604k free) vm_info: Java HotSpot(TM) Client VM (19.0-b09) for windows-x86 JRE (1.6.0_23-b05), built on Nov 12 2010 15:00:43 by "java_re" with MS VC++ 7.1 (VS2003) time: Tue Jan 18 11:05:51 2011 elapsed time: 6 seconds |
From: Matthew G. <mat...@es...> - 2011-01-17 13:42:18
|
Mike, Any news on the memory leak? For us this simple test shows the leak quite well. Can you send evidence that it does not please and I will check further. See below message... Best Regards, Matt On 10/01/2011 08:43, Matthew GERRING wrote: > Mike, > > Thanks for checking this. For me I get out of memory error on the 40th > iteration. > > I am linux x64 and Java 1.6.0_21 which is essentially the same. > Therefore perhaps the compiled Jepp is different. Mine is here: > https://fable.svn.sf.net/svnroot/fable/gui/trunk/jep* > > *Could you send me your libjep.so or try with the one in the > repository above? > > Thanks, > > Matt > > PS Great news that it works for you, I really need this bridge to work > without a leak. > > On 09/01/2011 19:50, Mike Johnson wrote: >> Hi, >> >> Sorry for the delayed response. >> >> So, I didn't see a memory leak when I ran it on x64 Linux with >> Java6u18. Which JVM and Python are you using? >> >> I see: >> Total data in memory after closing = 0 >> >> Thanks, >> Mike >> >> On Fri, Jan 7, 2011 at 5:33 AM, Matthew GERRING >> <mat...@es... <mailto:mat...@es...>> wrote: >> >> Hello jepp-users, >> >> There is a simple test here: >> http://www.edna-site.org/svn/trunk/dawb/org.dawb.common.util/test/org/edna/common/util/test/JepTest.java >> >> Which shows memory leaks when using Jepp. The test >> >> testMemoryLeakJep >> >> is the main one, it is using the set(String, Object) method from >> Java to python. >> >> I wondered if it is possible to release the jarray object in the >> JNI as it seems that Java cannot release the array once passed >> into Python jepp using set(...). >> >> Has anyone seen this too? Is there already a workaround or do I >> have to recompile the JNI some how? >> >> Thanks, >> >> Matt >> >> On 07/01/2011 11:31, Jon Wright wrote: >>> Hi Matt, >>> >>> The best person is probably Mike Johnson who is the author of >>> Jepp. He was usually very helpful with queries in the past when >>> we posted on the jepp users mailing list >>> (jep...@li... >>> <mailto:jep...@li...>). The C code is >>> relatively straightforward in case he doesn't come up with a >>> quick fix, even I've modified it in the past... >>> >>> Cheers >>> >>> Jon >>> >>> On 07/01/2011 11:15, Matthew GERRING wrote: >>>> Jon, >>>> >>>> I need to check this further but I think that it is possible to >>>> release >>>> the jarray in the JNI, thus removing the leak. Whom should I >>>> talk to >>>> about doing this? I am not an expert in C/JNI. >>>> >>>> Best Regards, >>>> >>>> Matt >>>> >>>> On 07/01/2011 09:45, Jon Wright wrote: >>>>> Hi Matthew, >>>>> >>>>> Prior to jepp we tried using xmlrpc to connect python with >>>>> java, but >>>>> this had a lot of disadvantages too. Shared memory was previously >>>>> ruled out. Is there some other option nowadays? >>>>> >>>>> The tests look great for tracking down and fixing the leak :-) >>>>> >>>>> See you later >>>>> >>>>> Jon >>>>> >>>>> >>>>> On 07/01/2011 09:10, Matthew GERRING wrote: >>>>>> Hi, >>>>>> >>>>>> Recently I found a memory leak with Jepp. The very specific >>>>>> way that >>>>>> fabio uses Jepp is probably ok (based on some fable GUI tests >>>>>> I wrote >>>>>> comparing diamond with fable plotting) but some of the other >>>>>> method >>>>>> calls which I need for the workflow have a memory leak. >>>>>> >>>>>> Also did some thread testing and testing with Numpy. Due to >>>>>> the memory >>>>>> leak I did not get as far as checking the threading more fully. >>>>>> >>>>>> All the tests are here: >>>>>> http://www.edna-site.org/svn/trunk/dawb/org.dawb.common.util/test/org/edna/common/util/test >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> You can check out >>>>>> http://www.edna-site.org/svn/trunk/dawb/org.dawb.common.util >>>>>> as a >>>>>> project. >>>>>> >>>>>> I have yet to draw firm conclusions on these tests but at the >>>>>> moment it >>>>>> looks as if the memory leak will mean that jepp is not reliable. >>>>>> >>>>>> Best Regards, >>>>>> >>>>>> >>>>>> Matthew Gerring >>>>>> >>>>>> >>>>>> On 06/01/2011 17:35, Jon Wright wrote: >>>>>>> Hi Andy, Matthew, >>>>>>> >>>>>>> Here's where things were last time I looked at Jepp and >>>>>>> windows 64 bit: >>>>>>> >>>>>>> http://sourceforge.net/mailarchive/forum.php?forum_name=jepp-users&max_rows=25&style=nested&viewmonth=200907 >>>>>>> <http://sourceforge.net/mailarchive/forum.php?forum_name=jepp-users&max_rows=25&style=nested&viewmonth=200907> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> It might turn out to be resolved now, but there was some >>>>>>> hairy stuff >>>>>>> going on related to threading and multiple interpreter >>>>>>> instances. >>>>>>> >>>>>>> See you tomorrow, >>>>>>> >>>>>>> Jon >>>>>>> >>>>>> >>>>> >>>> >>> >> >> ------------------------------------------------------------------------------ >> Gaining the trust of online customers is vital for the success of >> any company >> that requires sensitive data to be transmitted over the Web. >> Learn how to >> best implement a security strategy that keeps consumers' >> information secure >> and instills the confidence they need to proceed with transactions. >> http://p.sf.net/sfu/oracle-sfdevnl >> _______________________________________________ >> Jepp-users mailing list >> Jep...@li... >> <mailto:Jep...@li...> >> https://lists.sourceforge.net/lists/listinfo/jepp-users >> >> |
From: Matthew G. <mat...@es...> - 2011-01-10 07:43:57
|
Mike, Thanks for checking this. For me I get out of memory error on the 40th iteration. I am linux x64 and Java 1.6.0_21 which is essentially the same. Therefore perhaps the compiled Jepp is different. Mine is here: https://fable.svn.sf.net/svnroot/fable/gui/trunk/jep* *Could you send me your libjep.so or try with the one in the repository above? Thanks, Matt PS Great news that it works for you, I really need this bridge to work without a leak. On 09/01/2011 19:50, Mike Johnson wrote: > Hi, > > Sorry for the delayed response. > > So, I didn't see a memory leak when I ran it on x64 Linux with > Java6u18. Which JVM and Python are you using? > > I see: > Total data in memory after closing = 0 > > Thanks, > Mike > > On Fri, Jan 7, 2011 at 5:33 AM, Matthew GERRING > <mat...@es... <mailto:mat...@es...>> wrote: > > Hello jepp-users, > > There is a simple test here: > http://www.edna-site.org/svn/trunk/dawb/org.dawb.common.util/test/org/edna/common/util/test/JepTest.java > > Which shows memory leaks when using Jepp. The test > > testMemoryLeakJep > > is the main one, it is using the set(String, Object) method from > Java to python. > > I wondered if it is possible to release the jarray object in the > JNI as it seems that Java cannot release the array once passed > into Python jepp using set(...). > > Has anyone seen this too? Is there already a workaround or do I > have to recompile the JNI some how? > > Thanks, > > Matt > > On 07/01/2011 11:31, Jon Wright wrote: >> Hi Matt, >> >> The best person is probably Mike Johnson who is the author of >> Jepp. He was usually very helpful with queries in the past when >> we posted on the jepp users mailing list >> (jep...@li... >> <mailto:jep...@li...>). The C code is >> relatively straightforward in case he doesn't come up with a >> quick fix, even I've modified it in the past... >> >> Cheers >> >> Jon >> >> On 07/01/2011 11:15, Matthew GERRING wrote: >>> Jon, >>> >>> I need to check this further but I think that it is possible to >>> release >>> the jarray in the JNI, thus removing the leak. Whom should I >>> talk to >>> about doing this? I am not an expert in C/JNI. >>> >>> Best Regards, >>> >>> Matt >>> >>> On 07/01/2011 09:45, Jon Wright wrote: >>>> Hi Matthew, >>>> >>>> Prior to jepp we tried using xmlrpc to connect python with >>>> java, but >>>> this had a lot of disadvantages too. Shared memory was previously >>>> ruled out. Is there some other option nowadays? >>>> >>>> The tests look great for tracking down and fixing the leak :-) >>>> >>>> See you later >>>> >>>> Jon >>>> >>>> >>>> On 07/01/2011 09:10, Matthew GERRING wrote: >>>>> Hi, >>>>> >>>>> Recently I found a memory leak with Jepp. The very specific >>>>> way that >>>>> fabio uses Jepp is probably ok (based on some fable GUI tests >>>>> I wrote >>>>> comparing diamond with fable plotting) but some of the other >>>>> method >>>>> calls which I need for the workflow have a memory leak. >>>>> >>>>> Also did some thread testing and testing with Numpy. Due to >>>>> the memory >>>>> leak I did not get as far as checking the threading more fully. >>>>> >>>>> All the tests are here: >>>>> http://www.edna-site.org/svn/trunk/dawb/org.dawb.common.util/test/org/edna/common/util/test >>>>> >>>>> >>>>> >>>>> >>>>> You can check out >>>>> http://www.edna-site.org/svn/trunk/dawb/org.dawb.common.util as a >>>>> project. >>>>> >>>>> I have yet to draw firm conclusions on these tests but at the >>>>> moment it >>>>> looks as if the memory leak will mean that jepp is not reliable. >>>>> >>>>> Best Regards, >>>>> >>>>> >>>>> Matthew Gerring >>>>> >>>>> >>>>> On 06/01/2011 17:35, Jon Wright wrote: >>>>>> Hi Andy, Matthew, >>>>>> >>>>>> Here's where things were last time I looked at Jepp and >>>>>> windows 64 bit: >>>>>> >>>>>> http://sourceforge.net/mailarchive/forum.php?forum_name=jepp-users&max_rows=25&style=nested&viewmonth=200907 >>>>>> <http://sourceforge.net/mailarchive/forum.php?forum_name=jepp-users&max_rows=25&style=nested&viewmonth=200907> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> It might turn out to be resolved now, but there was some >>>>>> hairy stuff >>>>>> going on related to threading and multiple interpreter >>>>>> instances. >>>>>> >>>>>> See you tomorrow, >>>>>> >>>>>> Jon >>>>>> >>>>> >>>> >>> >> > > ------------------------------------------------------------------------------ > Gaining the trust of online customers is vital for the success of > any company > that requires sensitive data to be transmitted over the Web. > Learn how to > best implement a security strategy that keeps consumers' > information secure > and instills the confidence they need to proceed with transactions. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > Jepp-users mailing list > Jep...@li... > <mailto:Jep...@li...> > https://lists.sourceforge.net/lists/listinfo/jepp-users > > |
From: Mike J. <mi...@pu...> - 2011-01-09 18:50:47
|
Hi, Sorry for the delayed response. So, I didn't see a memory leak when I ran it on x64 Linux with Java6u18. Which JVM and Python are you using? I see: Total data in memory after closing = 0 Thanks, Mike On Fri, Jan 7, 2011 at 5:33 AM, Matthew GERRING <mat...@es...>wrote: > Hello jepp-users, > > There is a simple test here: > http://www.edna-site.org/svn/trunk/dawb/org.dawb.common.util/test/org/edna/common/util/test/JepTest.java > > Which shows memory leaks when using Jepp. The test > > testMemoryLeakJep > > is the main one, it is using the set(String, Object) method from Java to > python. > > I wondered if it is possible to release the jarray object in the JNI as it > seems that Java cannot release the array once passed into Python jepp using > set(...). > > Has anyone seen this too? Is there already a workaround or do I have to > recompile the JNI some how? > > Thanks, > > Matt > > On 07/01/2011 11:31, Jon Wright wrote: > > Hi Matt, > > The best person is probably Mike Johnson who is the author of Jepp. He was > usually very helpful with queries in the past when we posted on the jepp > users mailing list (jep...@li...). The C code is > relatively straightforward in case he doesn't come up with a quick fix, even > I've modified it in the past... > > Cheers > > Jon > > On 07/01/2011 11:15, Matthew GERRING wrote: > > Jon, > > I need to check this further but I think that it is possible to release > the jarray in the JNI, thus removing the leak. Whom should I talk to > about doing this? I am not an expert in C/JNI. > > Best Regards, > > Matt > > On 07/01/2011 09:45, Jon Wright wrote: > > Hi Matthew, > > Prior to jepp we tried using xmlrpc to connect python with java, but > this had a lot of disadvantages too. Shared memory was previously > ruled out. Is there some other option nowadays? > > The tests look great for tracking down and fixing the leak :-) > > See you later > > Jon > > > On 07/01/2011 09:10, Matthew GERRING wrote: > > Hi, > > Recently I found a memory leak with Jepp. The very specific way that > fabio uses Jepp is probably ok (based on some fable GUI tests I wrote > comparing diamond with fable plotting) but some of the other method > calls which I need for the workflow have a memory leak. > > Also did some thread testing and testing with Numpy. Due to the memory > leak I did not get as far as checking the threading more fully. > > All the tests are here: > > http://www.edna-site.org/svn/trunk/dawb/org.dawb.common.util/test/org/edna/common/util/test > > > > You can check out > http://www.edna-site.org/svn/trunk/dawb/org.dawb.common.util as a > project. > > I have yet to draw firm conclusions on these tests but at the moment it > looks as if the memory leak will mean that jepp is not reliable. > > Best Regards, > > > Matthew Gerring > > > On 06/01/2011 17:35, Jon Wright wrote: > > Hi Andy, Matthew, > > Here's where things were last time I looked at Jepp and windows 64 bit: > > > http://sourceforge.net/mailarchive/forum.php?forum_name=jepp-users&max_rows=25&style=nested&viewmonth=200907 > > > > It might turn out to be resolved now, but there was some hairy stuff > going on related to threading and multiple interpreter instances. > > See you tomorrow, > > Jon > > > > > > > > ------------------------------------------------------------------------------ > Gaining the trust of online customers is vital for the success of any > company > that requires sensitive data to be transmitted over the Web. Learn how to > best implement a security strategy that keeps consumers' information secure > and instills the confidence they need to proceed with transactions. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > Jepp-users mailing list > Jep...@li... > https://lists.sourceforge.net/lists/listinfo/jepp-users > > |
From: Matthew G. <mat...@es...> - 2011-01-07 13:33:32
|
Hello jepp-users, There is a simple test here: http://www.edna-site.org/svn/trunk/dawb/org.dawb.common.util/test/org/edna/common/util/test/JepTest.java Which shows memory leaks when using Jepp. The test testMemoryLeakJep is the main one, it is using the set(String, Object) method from Java to python. I wondered if it is possible to release the jarray object in the JNI as it seems that Java cannot release the array once passed into Python jepp using set(...). Has anyone seen this too? Is there already a workaround or do I have to recompile the JNI some how? Thanks, Matt On 07/01/2011 11:31, Jon Wright wrote: > Hi Matt, > > The best person is probably Mike Johnson who is the author of Jepp. He > was usually very helpful with queries in the past when we posted on > the jepp users mailing list (jep...@li...). The C > code is relatively straightforward in case he doesn't come up with a > quick fix, even I've modified it in the past... > > Cheers > > Jon > > On 07/01/2011 11:15, Matthew GERRING wrote: >> Jon, >> >> I need to check this further but I think that it is possible to release >> the jarray in the JNI, thus removing the leak. Whom should I talk to >> about doing this? I am not an expert in C/JNI. >> >> Best Regards, >> >> Matt >> >> On 07/01/2011 09:45, Jon Wright wrote: >>> Hi Matthew, >>> >>> Prior to jepp we tried using xmlrpc to connect python with java, but >>> this had a lot of disadvantages too. Shared memory was previously >>> ruled out. Is there some other option nowadays? >>> >>> The tests look great for tracking down and fixing the leak :-) >>> >>> See you later >>> >>> Jon >>> >>> >>> On 07/01/2011 09:10, Matthew GERRING wrote: >>>> Hi, >>>> >>>> Recently I found a memory leak with Jepp. The very specific way that >>>> fabio uses Jepp is probably ok (based on some fable GUI tests I wrote >>>> comparing diamond with fable plotting) but some of the other method >>>> calls which I need for the workflow have a memory leak. >>>> >>>> Also did some thread testing and testing with Numpy. Due to the memory >>>> leak I did not get as far as checking the threading more fully. >>>> >>>> All the tests are here: >>>> http://www.edna-site.org/svn/trunk/dawb/org.dawb.common.util/test/org/edna/common/util/test >>>> >>>> >>>> >>>> >>>> You can check out >>>> http://www.edna-site.org/svn/trunk/dawb/org.dawb.common.util as a >>>> project. >>>> >>>> I have yet to draw firm conclusions on these tests but at the >>>> moment it >>>> looks as if the memory leak will mean that jepp is not reliable. >>>> >>>> Best Regards, >>>> >>>> >>>> Matthew Gerring >>>> >>>> >>>> On 06/01/2011 17:35, Jon Wright wrote: >>>>> Hi Andy, Matthew, >>>>> >>>>> Here's where things were last time I looked at Jepp and windows 64 >>>>> bit: >>>>> >>>>> http://sourceforge.net/mailarchive/forum.php?forum_name=jepp-users&max_rows=25&style=nested&viewmonth=200907 >>>>> >>>>> >>>>> >>>>> >>>>> It might turn out to be resolved now, but there was some hairy stuff >>>>> going on related to threading and multiple interpreter instances. >>>>> >>>>> See you tomorrow, >>>>> >>>>> Jon >>>>> >>>> >>> >> > |
From: Guido W. <gu...@hu...> - 2010-04-13 13:51:40
|
Hi ! I try to install jepp 2.4 on OSX 10.6 and got stuck: I followed the instructions in README and got no error messages. I use Python 2.6.5 compiled from source. If I try to run the test.py script, python can not find the "jep" module. Unfortunately I have no clue what file I have to look for (to set the Python search path). Could you please give me directions ? Thanks, Guido |
From: Mike J. <mi...@pu...> - 2010-03-15 13:12:15
|
Hi, Well, this isn't a good test because you're only calling System.gc() but Python has it's own garbage collection. There's python objects holding on to Java references. The method instances are probably the Context instances set with the ScriptEngine, which might not get cleaned up immediately. You might try calling python's finalization, too. And why are you calling sys.exit()? What's that even do? :-) You should remove that call, it doesn't make sense with Python sub-interpreters. I really don't know what it does in that case. Also, javax.scripting.ScriptEngine is a really stupid interface. I'd avoid it. Python is much more efficient with actual files (not streams, like almost every other scripting engine ever made). In fact, jep just writes out a temp file for some things. It's really not awesome. In Python's case it's a little more difficult because there's no telling where the line ends without running it through the parser... On Mon, Mar 8, 2010 at 7:23 AM, Mike <mc...@gm...> wrote: > Hi > > I'm encountering a memory leak when setting JepScriptEngine context > Please see the attached zip file for a sandboxed example. > Any help would be greatly appreciated... > Thanks, > Mike > > -- Open source monitoring done right: http://www.leemba.com |