Hello:

I have a small snippet program that attempts to launch a Java vm (JDK.6.0 on FreeBSD 7.0) with native c++ calls using jni.

The pertinent line of code to launch the vm:

...
//
// Create VM
//
JNI_CreateJavaVM(&jvm,(void **)&env, &vm_args);
...


When the test program is executed with truss, the resulting crash is shown to be related to non-existent sys call:

gettimeofday({1223561385.433876},0x0) = 0 (0x0)
stat("/usr/local/jdk1.6.0/java",{mode=drwxr-xr-x ,inode=2500507,size=2048,blksize=4096}) = 0 (0x0)
gettimeofday({1223561385.435170},0x0) = 0 (0x0)
gettimeofday({1223561385.435451},0x0) = 0 (0x0)
lseek(3,0x2b0d74c,SEEK_SET) = 45143884 (0x2b0d74c)
read(3,"PK\^C\^D\n\0\0\0\0\0\M^U\M^Q\f9"...,30) = 30 (0x1e)
lseek(3,0x2b0d791,SEEK_SET) = 45143953 (0x2b0d791)
read(3,"\M-J\M-~\M-:\M->\0\0\0001\0<\b\0"...,1134) = 1134 (0x46e)
gettimeofday({1223561385.436426},0x0) = 0 (0x0)
gettimeofday({1223561385.436553},0x0) = 0 (0x0)
gettimeofday({1223561385.436811},0x0) = 0 (0x0)
gettimeofday({1223561385.436972},0x0) = 0 (0x0)
gettimeofday({1223561385.437336},0x0) = 0 (0x0)
gettimeofday({1223561385.437588},0x0) = 0 (0x0)
gettimeofday({1223561385.437729},0x0) = 0 (0x0)
gettimeofday({1223561385.437879},0x0) = 0 (0x0)
gettimeofday({1223561385.438150},0x0) = 0 (0x0)
gettimeofday({1223561385.537357},0x0) = 0 (0x0)
gettimeofday({1223561385.537543},0x0) = 0 (0x0)
ksem_init(0xbfbfe87c,0x0,0x2804a419,0x28077200,0x5 10,0x0) ERR#78 'Function not implemented'
SIGNAL 12 (SIGSYS)

Subsequent culling of internet mailing lists indicates that indeed the GENERIC kernel for FreeBSD 7.0 does not enable the P1003_1B_SEMAPHORES option, and so the "Function not implemented" message is reasonable.

Before I rebuild the kernel with the P1003_1B_SEMAPHORES option, are there any issues/caveats involved with doing so, especiall in light of the fact that the intended application must make heavy use of pthreads?

- Regards,

Ron
..
_______________________________________________
freebsd-java@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org"