gdb gets SIGSEGV from JVM when running Tomcat 4.0 (Redhat 6.2, JDK 1.3.1_01)

2001-11-02 Thread Eddie Ruvinsky

Hi all,

Would anyone happen to know the fix to this?  This may
or may not be directly related to Tomcat, but I
noticed a somewhat relevant thread about segfaults
occuring when invoking a JVM via JNI in the tomcat-dev
mailing list archives.

Any advice would be appreciated on how to address this
issue on JDK 1.3.1_01.

Thanks very much,
Eddie

 
OVERVIEW:

When running Tomcat 4.0 via the Java launcher in a gdb
debugging session (Red Hat Linux 6.2, JDK 1.3.1_01), I
get a SIGSEGV signal (Segmentation fault) when I
execute some of the example JSPs/servlets.  Since
Tomcat is pure Java, I'm assuming the problem is most
likely with the JVM and the way it handles signals, or
possibly with gdb since I only see this behavior with
gdb.  The problem is fairly reproducible;  I usually
get it when I execute the "ErrorPage" JSP sample in
Tomcat's "examples" webapp.

Note that I don't see these signals when running the
JVM standalone (outside of gdb).  What's also weird is
that I successfully tell gdb to "continue" after the
segfault, and the app continues to work like nothing
ever happend.

As an aside, the reason why I did this test was
because I was experiencing very similar problems in my
own application that embeds a JVM via JNI.


DESCRIPTION:

Here is what I did to see the problem.

First, I set the debugger in the environment, so that
the jdk/bin/java script can run the java launcher in
gdb:

export DEBUG_PROG=gdb

Next, I run the jdk/bin/java script:

cd jdk1.3.1_01/bin
java

This brings up the Java launcher within gdb, and I run
it as I specify the necessary arguments to startup
Tomcat:

GNU gdb 19991004
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General
Public License, and you are
welcome to change it and/or distribute copies of it
under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show
warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(gdb) set args -classpath
/u0/ruvinsky/tomcat4.bin/bin/bootstrap.jar:/u0/ruvinsky/src-java-launcher/jdk1.3.1_01/lib/tools.jar
-Dcatalina.base=/u0/ruvinsky/tomcat4.bin
-Dcatalina.home=/u0/ruvinsky/tomcat4.bin
org.apache.catalina.startup.Bootstrap start
(gdb) run
Starting program:
/u0/ruvinsky/src-java-launcher/jdk1.3.1_01/bin/i386/native_threads/java
-classpath
/u0/ruvinsky/tomcat4.bin/bin/bootstrap.jar:/u0/ruvinsky/src-java-launcher/jdk1.3.1_01/lib/tools.jar
-Dcatalina.base=/u0/ruvinsky/tomcat4.bin
-Dcatalina.home=/u0/ruvinsky/tomcat4.bin
org.apache.catalina.startup.Bootstrap start
[New Thread 1710 (manager thread)]
[New Thread 1709 (initial thread)]
[New Thread 1711]
[New Thread 1712]
[New Thread 1713]
[New Thread 1714]
[New Thread 1715]
[New Thread 1716]
[New Thread 1717]
Starting service Tomcat-Standalone
Apache Tomcat/4.0
[New Thread 1720]
[New Thread 1721]
[New Thread 1722]
[New Thread 1723]
[New Thread 1724]
[New Thread 1725]
[New Thread 1726]
[New Thread 1727]
[New Thread 1728]
[New Thread 1729]
[New Thread 1730]
[New Thread 1731]
Starting service Tomcat-Apache
Apache Tomcat/4.0
[New Thread 1732]
[Switching to Thread 1730]

Program received signal SIGSEGV, Segmentation fault.
0x2bfee3f4 in ?? ()
(gdb) continue 
Continuing.

I even tried building a debug version of the java
launcher by hand in hope of finding a more detailed
stack trace, but all I got was the following:

(gdb) bt
#0  0x806973d in ?? ()
#1  0x8060891 in ?? ()
#2  0x8060891 in ?? ()
#3  0x8060963 in ?? ()
#4  0x8060891 in ?? ()
#5  0x8060891 in ?? ()
#6  0x8060891 in ?? ()
#7  0x8060963 in ?? ()
#8  0x8060891 in ?? ()
#9  0x8060891 in ?? ()
#10 0x8060963 in ?? ()
#11 0x8060891 in ?? ()
#12 0x8060963 in ?? ()
#13 0x8060963 in ?? ()
#14 0x8060963 in ?? ()
#15 0x8060963 in ?? ()
#16 0x8060963 in ?? ()
#17 0x8060891 in ?? ()
#18 0x8060963 in ?? ()
#19 0x8060891 in ?? ()
#20 0x8060963 in ?? ()
#21 0x8060963 in ?? ()
#22 0x8060963 in ?? ()
#23 0x8060963 in ?? ()
#24 0x8060891 in ?? ()
#25 0x8060963 in ?? ()
#26 0x8060963 in ?? ()
#27 0x8060963 in ?? ()
#28 0x8060891 in ?? ()
#29 0x8060963 in ?? ()
#30 0x8060963 in ?? ()
#31 0x8060891 in ?? ()
#32 0x8060963 in ?? ()
#33 0x2add3d70 in StubRoutines::_code1 ()
   from
/u0/ruvinsky/src-java-launcher/jdk1.3.1_01/jre/lib/i386/client/libjvm.so
#34 0x2abcb604 in JavaCalls::call_helper ()
   from
/u0/ruvinsky/src-java-launcher/jdk1.3.1_01/jre/lib/i386/client/libjvm.so
#35 0x2ac2948d in os::os_exception_wrapper ()
   from
/u0/ruvinsky/src-java-launcher/jdk1.3.1_01/jre/lib/i386/client/libjvm.so
#36 0x2abcb840 in JavaCalls::call ()
   from
/u0/ruvinsky/src-java-launcher/jdk1.3.1_01/jre/lib/i386/client/libjvm.so
#37 0x2abcb1bb in JavaCalls::call_virtual ()
   from
/u0/ruvinsky/src-java-launcher/jdk1.3.1_01/jre/lib/i386/client/libjvm.so
#38 0x2abcbccb in JavaCalls::call_virtual ()
   from
/u0/ruvinsky/src-java-launcher/jdk1.3.1_01/jre/lib/i386/client/libjvm.so
#39 0x2abede80 in thread_entry ()
   from
/u0/ruvinsky/src-java-launcher/jdk

Re: gdb gets SIGSEGV from JVM when running Tomcat 4.0 (Redhat 6.2, JDK 1.3.1_01)

2001-11-02 Thread Bojan Smojver

I have been trying to convince Sun people that 1.3.1 and 1.3.1_01 
HotSpot has problems on Linux, but they wouldn't buy it.

My suggestion is: use IBM's JDK 1.3.0. It is faster and more stable then 
Sun's.

Bojan

Eddie Ruvinsky wrote:

> Hi all,
> 
> Would anyone happen to know the fix to this?  This may
> or may not be directly related to Tomcat, but I
> noticed a somewhat relevant thread about segfaults
> occuring when invoking a JVM via JNI in the tomcat-dev
> mailing list archives.
> 
> Any advice would be appreciated on how to address this
> issue on JDK 1.3.1_01.
> 
> Thanks very much,
> Eddie
> 
>  
> OVERVIEW:
> 
> When running Tomcat 4.0 via the Java launcher in a gdb
> debugging session (Red Hat Linux 6.2, JDK 1.3.1_01), I
> get a SIGSEGV signal (Segmentation fault) when I
> execute some of the example JSPs/servlets.  Since
> Tomcat is pure Java, I'm assuming the problem is most
> likely with the JVM and the way it handles signals, or
> possibly with gdb since I only see this behavior with
> gdb.  The problem is fairly reproducible;  I usually
> get it when I execute the "ErrorPage" JSP sample in
> Tomcat's "examples" webapp.
> 
> Note that I don't see these signals when running the
> JVM standalone (outside of gdb).  What's also weird is
> that I successfully tell gdb to "continue" after the
> segfault, and the app continues to work like nothing
> ever happend.
> 
> As an aside, the reason why I did this test was
> because I was experiencing very similar problems in my
> own application that embeds a JVM via JNI.
> 
> 
> DESCRIPTION:
> 
> Here is what I did to see the problem.
> 
> First, I set the debugger in the environment, so that
> the jdk/bin/java script can run the java launcher in
> gdb:
> 
> export DEBUG_PROG=gdb
> 
> Next, I run the jdk/bin/java script:
> 
> cd jdk1.3.1_01/bin
> java
> 
> This brings up the Java launcher within gdb, and I run
> it as I specify the necessary arguments to startup
> Tomcat:
> 
> GNU gdb 19991004
> Copyright 1998 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General
> Public License, and you are
> welcome to change it and/or distribute copies of it
> under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show
> warranty" for details.
> This GDB was configured as "i386-redhat-linux"...
> (gdb) set args -classpath
> 
>/u0/ruvinsky/tomcat4.bin/bin/bootstrap.jar:/u0/ruvinsky/src-java-launcher/jdk1.3.1_01/lib/tools.jar
> -Dcatalina.base=/u0/ruvinsky/tomcat4.bin
> -Dcatalina.home=/u0/ruvinsky/tomcat4.bin
> org.apache.catalina.startup.Bootstrap start
> (gdb) run
> Starting program:
> /u0/ruvinsky/src-java-launcher/jdk1.3.1_01/bin/i386/native_threads/java
> -classpath
> 
>/u0/ruvinsky/tomcat4.bin/bin/bootstrap.jar:/u0/ruvinsky/src-java-launcher/jdk1.3.1_01/lib/tools.jar
> -Dcatalina.base=/u0/ruvinsky/tomcat4.bin
> -Dcatalina.home=/u0/ruvinsky/tomcat4.bin
> org.apache.catalina.startup.Bootstrap start
> [New Thread 1710 (manager thread)]
> [New Thread 1709 (initial thread)]
> [New Thread 1711]
> [New Thread 1712]
> [New Thread 1713]
> [New Thread 1714]
> [New Thread 1715]
> [New Thread 1716]
> [New Thread 1717]
> Starting service Tomcat-Standalone
> Apache Tomcat/4.0
> [New Thread 1720]
> [New Thread 1721]
> [New Thread 1722]
> [New Thread 1723]
> [New Thread 1724]
> [New Thread 1725]
> [New Thread 1726]
> [New Thread 1727]
> [New Thread 1728]
> [New Thread 1729]
> [New Thread 1730]
> [New Thread 1731]
> Starting service Tomcat-Apache
> Apache Tomcat/4.0
> [New Thread 1732]
> [Switching to Thread 1730]
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x2bfee3f4 in ?? ()
> (gdb) continue 
> Continuing.
> 
> I even tried building a debug version of the java
> launcher by hand in hope of finding a more detailed
> stack trace, but all I got was the following:
> 
> (gdb) bt
> #0  0x806973d in ?? ()
> #1  0x8060891 in ?? ()
> #2  0x8060891 in ?? ()
> #3  0x8060963 in ?? ()
> #4  0x8060891 in ?? ()
> #5  0x8060891 in ?? ()
> #6  0x8060891 in ?? ()
> #7  0x8060963 in ?? ()
> #8  0x8060891 in ?? ()
> #9  0x8060891 in ?? ()
> #10 0x8060963 in ?? ()
> #11 0x8060891 in ?? ()
> #12 0x8060963 in ?? ()
> #13 0x8060963 in ?? ()
> #14 0x8060963 in ?? ()
> #15 0x8060963 in ?? ()
> #16 0x8060963 in ?? ()
> #17 0x8060891 in ?? ()
> #18 0x8060963 in ?? ()
> #19 0x8060891 in ?? ()
> #20 0x8060963 in ?? ()
> #21 0x8060963 in ?? ()
> #22 0x8060963 in ?? ()
> #23 0x8060963 in ?? ()
> #24 0x8060891 in ?? ()
> #25 0x8060963 in ?? ()
> #26 0x8060963 in ?? ()
> #27 0x8060963 in ?? ()
> #28 0x8060891 in ?? ()
> #29 0x8060963 in ?? ()
> #30 0x8060963 in ?? ()
> #31 0x8060891 in ?? ()
> #32 0x8060963 in ?? ()
> #33 0x2add3d70 in StubRoutines::_code1 ()
>from
> /u0/ruvinsky/src-java-launcher/jdk1.3.1_01/jre/lib/i386/client/libjvm.so
> #34 0x2abcb604 in JavaCalls::call_helper ()
>from
> /u0/ruvinsky/src-java-launcher/jdk1.3.1_01/jre/lib/i386/client/libjvm.so
> #35 0x2ac2948d

Re: gdb gets SIGSEGV from JVM when running Tomcat 4.0 (Redhat 6.2, JDK 1.3.1_01)

2001-11-02 Thread Bojan Smojver

Pier Fumagalli wrote:

> Bojan Smojver at [EMAIL PROTECTED] wrote:
> 
> 
>>I have been trying to convince Sun people that 1.3.1 and 1.3.1_01
>>HotSpot has problems on Linux, but they wouldn't buy it.
>>
>>My suggestion is: use IBM's JDK 1.3.0. It is faster and more stable then
>>Sun's.
>>
> 
> My suggestion is: drop Linux and use a decent operating system :) :) :)


Now I know why you end up in flame wars ;-)

Bojan


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: gdb gets SIGSEGV from JVM when running Tomcat 4.0 (Redhat 6.2, JDK 1.3.1_01)

2001-11-02 Thread Weiqi Gao

Pier Fumagalli wrote:
 >

> Bojan Smojver at [EMAIL PROTECTED] wrote:
> 
> > I have been trying to convince Sun people that 1.3.1 and 1.3.1_01
> > HotSpot has problems on Linux, but they wouldn't buy it.
> >
> > My suggestion is: use IBM's JDK 1.3.0. It is faster and more stable then
> > Sun's.
> 
> My suggestion is: drop Linux and use a decent operating system :) :) :)


:) :) :) like Windows NT.

-- 
Weiqi Gao
[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: gdb gets SIGSEGV from JVM when running Tomcat 4.0 (Redhat 6.2, JDK 1.3.1_01)

2001-11-02 Thread Bojan Smojver

Weiqi Gao wrote:

> Pier Fumagalli wrote:
>  >
> 
>> Bojan Smojver at [EMAIL PROTECTED] wrote:
>>
>> > I have been trying to convince Sun people that 1.3.1 and 1.3.1_01
>> > HotSpot has problems on Linux, but they wouldn't buy it.
>> >
>> > My suggestion is: use IBM's JDK 1.3.0. It is faster and more stable 
>> then
>> > Sun's.
>>
>> My suggestion is: drop Linux and use a decent operating system :) :) :)
> 
> 
> 
> :) :) :) like Windows NT.


I really like Windows NT. The CD makes a truly wonderful coaster ;-)


Bojan




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: gdb gets SIGSEGV from JVM when running Tomcat 4.0 (Redhat 6.2, JDK 1.3.1_01)

2001-11-02 Thread Bill Barker

Wot?, you passed up your chance to experiance an W2K and XP coaster?
- Original Message -
From: "Bojan Smojver" <[EMAIL PROTECTED]>
To: "Tomcat Developers List" <[EMAIL PROTECTED]>
Sent: Friday, November 02, 2001 10:00 PM
Subject: Re: gdb gets SIGSEGV from JVM when running Tomcat 4.0 (Redhat 6.2,
JDK 1.3.1_01)


> Weiqi Gao wrote:
>
> > Pier Fumagalli wrote:
> >  >
> >
> >> Bojan Smojver at [EMAIL PROTECTED] wrote:
> >>
> >> > I have been trying to convince Sun people that 1.3.1 and 1.3.1_01
> >> > HotSpot has problems on Linux, but they wouldn't buy it.
> >> >
> >> > My suggestion is: use IBM's JDK 1.3.0. It is faster and more stable
> >> then
> >> > Sun's.
> >>
> >> My suggestion is: drop Linux and use a decent operating system :) :) :)
> >
> >
> >
> > :) :) :) like Windows NT.
>
>
> I really like Windows NT. The CD makes a truly wonderful coaster ;-)
>
>
> Bojan
>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


**

This message is intended only for the use of the person(s) listed above 
as the intended recipient(s), and may contain information that is 
PRIVILEGED and CONFIDENTIAL.  If you are not an intended recipient, 
you may not read, copy, or distribute this message or any attachment.  
If you received this communication in error, please notify us immediately 
by e-mail and then delete all copies of this message and any attachments.


In addition you should be aware that ordinary (unencrypted) e-mail sent 
through the Internet is not secure. Do not send confidential or sensitive 
information, such as social security numbers, account numbers, personal 
identification numbers and passwords, to us via ordinary (unencrypted) 
e-mail. 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>