public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* why is "gdb /home/gat/JAVA/JDK16/jdk1.6.0/bin/java" so broken?
@ 2006-02-18 18:39 U. George
  2006-02-18 19:09 ` Daniel Jacobowitz
  2006-06-21  2:33 ` Neo
  0 siblings, 2 replies; 6+ messages in thread
From: U. George @ 2006-02-18 18:39 UTC (permalink / raw)
  To: gdb

After some 60min of running javasoft's java, the program finally dies of 
a segfault. I have been trying, and apparently for several years now, 
according to the gdb bug base, to get GDB to work with java & threads.
Version 6.4 does not work any better.
there is something wrong in libthread_db.so. I'm not yet willing to just 
replace the libs, as this may affect the 'heap' bug that shows itself 
randomly.

So whats goin on with gdb?


> [gat@MyLaptop ~]$ gdb /home/gat/JAVA/JDK16/jdk1.6.0/bin/java
> GNU gdb Red Hat Linux (6.3.0.0-1.84rh)
> Copyright 2004 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-gnu"...(no debugging symbols found)
> Using host libthread_db library "/lib/tls/i686/libthread_db.so.1".
> 
> (gdb) r
> Starting program: /home/gat/JAVA/JDK16/jdk1.6.0/bin/java
> Reading symbols from shared object read from target memory...(no debugging symbols found)...done.
> Loaded system supplied DSO at 0xd46000
> (no debugging symbols found)
> [Thread debugging using libthread_db enabled]
> [New Thread 2251072 (LWP 2428)]
> (no debugging symbols found)
> (no debugging symbols found)
> (no debugging symbols found)
> (no debugging symbols found)
> Cannot find user-level thread for LWP 2428: generic error
> (gdb)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: why is "gdb /home/gat/JAVA/JDK16/jdk1.6.0/bin/java" so broken?
  2006-02-18 18:39 why is "gdb /home/gat/JAVA/JDK16/jdk1.6.0/bin/java" so broken? U. George
@ 2006-02-18 19:09 ` Daniel Jacobowitz
  2006-02-18 19:37   ` U. George
  2006-06-21  2:33 ` Neo
  1 sibling, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2006-02-18 19:09 UTC (permalink / raw)
  To: U. George; +Cc: gdb

On Sat, Feb 18, 2006 at 01:27:44PM -0500, U. George wrote:
> After some 60min of running javasoft's java, the program finally dies of 
> a segfault. I have been trying, and apparently for several years now, 
> according to the gdb bug base, to get GDB to work with java & threads.
> Version 6.4 does not work any better.
> there is something wrong in libthread_db.so. I'm not yet willing to just 
> replace the libs, as this may affect the 'heap' bug that shows itself 
> randomly.
> 
> So whats goin on with gdb?

Probably the JDK does something funny with threads that bypasses
libthread_db.

-- 
Daniel Jacobowitz
CodeSourcery

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: why is "gdb /home/gat/JAVA/JDK16/jdk1.6.0/bin/java" so broken?
  2006-02-18 19:09 ` Daniel Jacobowitz
@ 2006-02-18 19:37   ` U. George
  2006-02-19 18:08     ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: U. George @ 2006-02-18 19:37 UTC (permalink / raw)
  Cc: gdb

Show me the 'funny'. It would be real neat to understand why 
libthread_db fails before surmising.

Daniel Jacobowitz wrote:
> On Sat, Feb 18, 2006 at 01:27:44PM -0500, U. George wrote:
> 
>>After some 60min of running javasoft's java, the program finally dies of 
>>a segfault. I have been trying, and apparently for several years now, 
>>according to the gdb bug base, to get GDB to work with java & threads.
>>Version 6.4 does not work any better.
>>there is something wrong in libthread_db.so. I'm not yet willing to just 
>>replace the libs, as this may affect the 'heap' bug that shows itself 
>>randomly.
>>
>>So whats goin on with gdb?
> 
> 
> Probably the JDK does something funny with threads that bypasses
> libthread_db.
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: why is "gdb /home/gat/JAVA/JDK16/jdk1.6.0/bin/java" so broken?
  2006-02-18 19:37   ` U. George
@ 2006-02-19 18:08     ` Daniel Jacobowitz
  2006-02-19 18:13       ` U. George
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2006-02-19 18:08 UTC (permalink / raw)
  To: U. George; +Cc: gdb

On Sat, Feb 18, 2006 at 01:39:39PM -0500, U. George wrote:
> Show me the 'funny'. It would be real neat to understand why 
> libthread_db fails before surmising.

Then I suggest that you debug GDB and find out what's gone wrong, since
you have a way to reproduce this problem.

-- 
Daniel Jacobowitz
CodeSourcery

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: why is "gdb /home/gat/JAVA/JDK16/jdk1.6.0/bin/java" so broken?
  2006-02-19 18:08     ` Daniel Jacobowitz
@ 2006-02-19 18:13       ` U. George
  0 siblings, 0 replies; 6+ messages in thread
From: U. George @ 2006-02-19 18:13 UTC (permalink / raw)
  Cc: gdb

And so do you!

Daniel Jacobowitz wrote:
> On Sat, Feb 18, 2006 at 01:39:39PM -0500, U. George wrote:
> 
>>Show me the 'funny'. It would be real neat to understand why 
>>libthread_db fails before surmising.
> 
> 
> Then I suggest that you debug GDB and find out what's gone wrong, since
> you have a way to reproduce this problem.
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: why is "gdb /home/gat/JAVA/JDK16/jdk1.6.0/bin/java" so broken?
  2006-02-18 18:39 why is "gdb /home/gat/JAVA/JDK16/jdk1.6.0/bin/java" so broken? U. George
  2006-02-18 19:09 ` Daniel Jacobowitz
@ 2006-06-21  2:33 ` Neo
  1 sibling, 0 replies; 6+ messages in thread
From: Neo @ 2006-06-21  2:33 UTC (permalink / raw)
  To: U. George; +Cc: gdb

hi,

I haven't check the source code for JDK1.6.0 yet. But I think it 
probably is the same as the code of JDK1.5. In JDK1.5, file java_md.c, 
itself will check if the LD_LIBRARY_PATH is set correct. If yes, it will 
continue execution. Otherwise, it will call execve() that will bring 
troubles to GDB. My workaround is to just set LD_LIBRARY_PATH correct, 
if you really are interested in debugging java_g.

These days, I am debugging jdk 1.4.2. Although this trick will still 
work, I got a seg. fault later. Is there anybody else working on that 
problem?

Thanks,
Neo

U. George wrote:
> After some 60min of running javasoft's java, the program finally dies 
> of a segfault. I have been trying, and apparently for several years 
> now, according to the gdb bug base, to get GDB to work with java & 
> threads.
> Version 6.4 does not work any better.
> there is something wrong in libthread_db.so. I'm not yet willing to 
> just replace the libs, as this may affect the 'heap' bug that shows 
> itself randomly.
>
> So whats goin on with gdb?
>
>
>> [gat@MyLaptop ~]$ gdb /home/gat/JAVA/JDK16/jdk1.6.0/bin/java
>> GNU gdb Red Hat Linux (6.3.0.0-1.84rh)
>> Copyright 2004 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-gnu"...(no debugging 
>> symbols found)
>> Using host libthread_db library "/lib/tls/i686/libthread_db.so.1".
>>
>> (gdb) r
>> Starting program: /home/gat/JAVA/JDK16/jdk1.6.0/bin/java
>> Reading symbols from shared object read from target memory...(no 
>> debugging symbols found)...done.
>> Loaded system supplied DSO at 0xd46000
>> (no debugging symbols found)
>> [Thread debugging using libthread_db enabled]
>> [New Thread 2251072 (LWP 2428)]
>> (no debugging symbols found)
>> (no debugging symbols found)
>> (no debugging symbols found)
>> (no debugging symbols found)
>> Cannot find user-level thread for LWP 2428: generic error
>> (gdb)
>

-- 
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-06-21  2:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-18 18:39 why is "gdb /home/gat/JAVA/JDK16/jdk1.6.0/bin/java" so broken? U. George
2006-02-18 19:09 ` Daniel Jacobowitz
2006-02-18 19:37   ` U. George
2006-02-19 18:08     ` Daniel Jacobowitz
2006-02-19 18:13       ` U. George
2006-06-21  2:33 ` Neo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).