[Pkg-octave-devel] Bug#676800: Bug#676800: octave-java: completely breaks octave

Sébastien Villemot sebastien.villemot at ens.fr
Wed Jun 20 18:34:53 UTC 2012


"John W. Eaton" <jwe at octave.org> writes:

> On 20-Jun-2012, Sébastien Villemot wrote:
>
> | "John W. Eaton" <jwe at octave.org> writes:
> | 
> | > I'd like to help debug this problem but I need some help.
> | 
> | Thanks for volunteering!
> | 
> | > I need to be able to install a debug version of Octave (preferably the
> | > current development sources) and build the Java package also with
> | > debugging symbols.  I'm using Debian testing.  What packages do I need
> | > to install?  After doing
> | >
> | >   pkg install java-1.2.8.tar.gz
> | >
> | > apparently successfully, I'm seeing
> | >
> | >   octave> javaclasspath
> | >   warning: timestamp on file /usr/lib/jvm/default-java/jre/lib/amd64/client/libjvm.so is in the future
> | >   error: java_invoke: /usr/lib/jvm/default-java/jre/lib/amd64/client/libjvm.so: failed to load: /usr/lib/jvm/default-java/jre/lib/amd64/client/libjvm.so: cannot open shared object file: No such file or directory
> | >   error: called from:
> | >   error:   /home/jwe/octave/java-1.2.8/javaclasspath.m at line 49, column 14
> | 
> | You need this patch (incorporated in the octave-java package):
> | 
> |  http://anonscm.debian.org/gitweb/?p=pkg-octave/octave-java.git;a=blob;f=debian/patches/libjvm.patch;h=cc847293d00ae09ac74e8eca833dbafdd48918a2;hb=19a7fdc2264cb0166f5324677bf2615252fda8e3
> | 
> | Also, /usr/lib/jvm/default-java points to OpenJDK 6 on my Debian sid
> | system. If you want to select OpenJDK 7, you need to set the JAVA_HOME
> | variable to:
> | 
> |  export JAVA_HOME = /usr/lib/jvm/java-7-openjdk-amd64
> | 
> | (this is done in debian/rules of the octave-java package).
>
> Thanks.  With that, I'm able to build the java package.  Running
> Octave with valgrind and executing javaclasspath at the Octave prompt,
> I see a lot of messages, starting with:

[...]

> and many more.  These all seem to be coming from the JNI_CreateJavaVM
> function, but I don't see that we are calling it incorrectly.  I'm
> also not sure whether these messages indicate real problems or if they
> are false positives from valgrind.
>
> Even the following much simpler program generates a similar quantity
> of messages:
>
>   #include <jni.h>
>   int
>   main (void)
>   {
>     JavaVM *jvm;
>     JNIEnv *env;
>     JavaVMInitArgs vm_args;
>     vm_args.version = JNI_VERSION_1_6;
>     vm_args.nOptions = 0;
>     vm_args.options = 0;
>     vm_args.ignoreUnrecognized = false;
>     JNI_CreateJavaVM(&jvm, (void**)&env, &vm_args);
>     return 0;
>   }
>
> Is there some error in this program that could cause these messages?
>
> I compiled this simpler program with
>
>   g++ -I/usr/lib/jvm/java-7-openjdk-amd64/include -I/usr/lib/jvm/java-7-openjdk-amd64/include/linux foojvm.cc -L/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server -ljvm
>
> and ran it with
>
>   LD_LIBRARY_PATH=/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server
>   valgrind ./a.out
>
> I see similar messages if I compile and run with java-6-openjdk-amd64
> instead of java-7-openjdk-amd64.
>
> What is the correct way to compile the simple example program above
> with GCJ so I can see whether there is a difference?

Looks like these valgrind errors are generated by the JVM and not by the
java package. They are probably not a cause of concern.

I don't know how to generate a difference in the valgrind logs, and I
don't have one between OpenJDK 6 and 7.

The only clear manifestation of the problem is the crashes that I
experience with octave-java compiled against Octave, as reported
initially in this bug.

Are you able to replicate the crash? On sid, install both octave-io and
octave-java, and octave should crash at runtime.

Thanks,

-- 
Sébastien Villemot
Researcher in Economics & Debian Maintainer
http://www.dynare.org/sebastien
Phone: +33-1-40-77-84-04 - GPG Key: 4096R/381A7594
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-octave-devel/attachments/20120620/772bc49b/attachment.pgp>


More information about the Pkg-octave-devel mailing list