You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Adam Megacz <ad...@megacz.com> on 2003/01/28 21:56:35 UTC

mod_jk2 jni connector: segfault in CreateJavaVM with Sun VM; IBM VM works fine

Hey, I'm using mod_jk2 with Apache2 (prefork) on Linux, and the Sun
JVM (1.4 and 1.3) segfaults somewhere deep within libjvm.so's
CreateJavaVM call, yet IBM's JVM (1.4) works fine.

Has anybody else experienced this?  Any idea what causes it?

If this isn't enough info, I'll make a much more detailed post later
on.  I'm just hoping that somebody's seen this before.

Also, has anybody gotten the JNI connector to work with an MPM other
than prefork?  Or is that currently not supported?

Thanks!!

  - a



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: mod_jk2 jni connector: segfault in CreateJavaVM with Sun VM; IBM VM works fine

Posted by Adam Megacz <ad...@megacz.com>.
Hrm, I get this over and over with the IBM JVM:

[Tue Jan 28 23:04:31 2003] [notice] channel_jni.open():  
[Tue Jan 28 23:04:31 2003] [error] channel_jni.open() Can't create java context
[Tue Jan 28 23:04:31 2003] [error] channel_jni.send() no java context
[Tue Jan 28 23:04:31 2003] [notice] vm.detach() ok
[Tue Jan 28 23:04:31 2003] [notice] channel_jni.close() ok
[Tue Jan 28 23:04:31 2003] [error] ajp13.service() Error  forwarding ajp13:jni 1 0

And this over and over with Sun's:

[Tue Jan 28 23:13:28 2003] [notice] vm.openJvm2() Option: -Xbootclasspath:/usr/lib/j2sdk1.4/jre/lib/core.jar:/usr/lib/j2sdk1.4/lib/dt.jar:/usr/lib/j2sdk1.4/jre/lib/security.jar:/usr/lib/j2sdk1.4/jre/lib/xml.jar:/usr/lib/j2sdk1.4/jre/lib/server.jar:/usr/lib/j2sdk1.4/jre/lib/graphics.jar:/usr/lib/j2sdk1.4/lib/tools.jar:/usr/share/tomcat/bin/tomcat-jni.jar:/usr/share/tomcat/bin/bootstrap.jar:/usr/share/tomcat/server/lib/commons-logging.jar:/usr/lib/j2sdk1.4/jre/lib/ext/ibmjceprovider.jar
[Tue Jan 28 23:13:28 2003] [notice] vm.openJvm2() Option: -Djava.class.path=/usr/share/tomcat/bin/tomcat-jni.jar:/usr/share/tomcat/server/lib/commons-logging.jar:/usr/share/tomcat/bin/bootstrap.jar
[Tue Jan 28 23:13:28 2003] [notice] vm.openJvm2() Option: -Dtomcat.home=/usr/share/tomcat
[Tue Jan 28 23:13:28 2003] [notice] vm.openJvm2() Option: -Dcatalina.home=/usr/share/tomcat
[Tue Jan 28 23:13:28 2003] [notice] vm.openJvm2() Option: -Xbootclasspath:/usr/lib/j2sdk1.4/jre/lib/core.jar:/usr/lib/j2sdk1.4/lib/dt.jar:/usr/lib/j2sdk1.4/jre/lib/security.jar:/usr/lib/j2sdk1.4/jre/lib/xml.jar:/usr/lib/j2sdk1.4/jre/lib/server.jar:/usr/lib/j2sdk1.4/jre/lib/graphics.jar:/usr/lib/j2sdk1.4/lib/tools.jar:/usr/share/tomcat/bin/tomcat-jni.jar:/usr/share/tomcat/bin/bootstrap.jar:/usr/share/tomcat/server/lib/commons-logging.jar:/usr/lib/j2sdk1.4/jre/lib/ext/ibmjceprovider.jar
[Tue Jan 28 23:13:28 2003] [notice] vm.openJvm2() Option: -Djava.class.path=/usr/share/tomcat/bin/tomcat-jni.jar:/usr/share/tomcat/server/lib/commons-logging.jar:/usr/share/tomcat/bin/bootstrap.jar
[Tue Jan 28 23:13:28 2003] [notice] vm.openJvm2() Option: -Dtomcat.home=/usr/share/tomcat
[Tue Jan 28 23:13:28 2003] [notice] vm.openJvm2() Option: -Dcatalina.home=/usr/share/tomcat
Create config for virtual host
Create config for virtual host
Create config for virtual host
Merging workerEnv 
Merging workerEnv 
Merging workerEnv 
Create config for virtual host
Create config for virtual host
Create config for virtual host
Merging workerEnv 
Merging workerEnv 
Merging workerEnv 
[Tue Jan 28 23:13:29 2003] [notice] jni.guessJvmDll() failed /usr/lib/j2sdk1.4/jre/bin/classic/libjvm.so
[Tue Jan 28 23:13:29 2003] [notice] jni.guessJvmDll() failed /usr/lib/j2sdk1.4/jre/bin/client/jvm.so
[Tue Jan 28 23:13:29 2003] [notice] jni.guessJvmDll() failed /usr/lib/j2sdk1.4/jre/lib/i386/classic/libjvm.so
[Tue Jan 28 23:13:29 2003] [notice] jni.guessJvmDll() /usr/lib/j2sdk1.4/jre/lib/i386/client/libjvm.so
[Tue Jan 28 23:13:29 2003] [notice] vm.init(): Jni lib: /usr/lib/j2sdk1.4/jre/lib/i386/client/libjvm.so
[Tue Jan 28 23:13:29 2003] [notice] jni.guessJvmDll() failed /usr/lib/j2sdk1.4/jre/bin/classic/libjvm.so
[Tue Jan 28 23:13:29 2003] [notice] jni.guessJvmDll() failed /usr/lib/j2sdk1.4/jre/bin/client/jvm.so
[Tue Jan 28 23:13:29 2003] [notice] jni.guessJvmDll() failed /usr/lib/j2sdk1.4/jre/lib/i386/classic/libjvm.so
[Tue Jan 28 23:13:29 2003] [notice] jni.guessJvmDll() /usr/lib/j2sdk1.4/jre/lib/i386/client/libjvm.so
[Tue Jan 28 23:13:29 2003] [notice] vm.init(): Jni lib: /usr/lib/j2sdk1.4/jre/lib/i386/client/libjvm.so


  - a

"Mladen Turk" <mt...@mappingsoft.com> writes:
> > Behalf Of Adam Megacz
> > 
> > Hey, I'm using mod_jk2 with Apache2 (prefork) on Linux, and 
> > the Sun JVM (1.4 and 1.3) segfaults somewhere deep within 
> > libjvm.so's CreateJavaVM call, yet IBM's JVM (1.4) works fine.
> > 
> > Has anybody else experienced this?  Any idea what causes it?
> > 
> > If this isn't enough info, I'll make a much more detailed 
> > post later on.  I'm just hoping that somebody's seen this before.
> > 
> > Also, has anybody gotten the JNI connector to work with an 
> > MPM other than prefork?  Or is that currently not supported?
> > 
> 
> Try using threaded mpm, and limit mpm's to 1. The second call to the
> CreateJavaVM will cause the JVM to shut down. I had the same behavior on
> RH 8.0 with Sun JVM 1.4 (didn't try the IBM's). But it works with
> threaded mpm. 
> 
> MT.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> 
> 

-- 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


RE: mod_jk2 jni connector: segfault in CreateJavaVM with Sun VM; IBM VM works fine

Posted by Mladen Turk <mt...@mappingsoft.com>.

> Behalf Of Adam Megacz
> 
> Hey, I'm using mod_jk2 with Apache2 (prefork) on Linux, and 
> the Sun JVM (1.4 and 1.3) segfaults somewhere deep within 
> libjvm.so's CreateJavaVM call, yet IBM's JVM (1.4) works fine.
> 
> Has anybody else experienced this?  Any idea what causes it?
> 
> If this isn't enough info, I'll make a much more detailed 
> post later on.  I'm just hoping that somebody's seen this before.
> 
> Also, has anybody gotten the JNI connector to work with an 
> MPM other than prefork?  Or is that currently not supported?
> 

Try using threaded mpm, and limit mpm's to 1. The second call to the
CreateJavaVM will cause the JVM to shut down. I had the same behavior on
RH 8.0 with Sun JVM 1.4 (didn't try the IBM's). But it works with
threaded mpm. 

MT.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org