public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug corefiles/9825] New: gdb 6.8 cannot show backtrace from core file that it had generated on Linux
@ 2009-02-06 19:47 fiazhossain at yahoo dot com
  2009-03-17  2:26 ` [Bug corefiles/9825] " fiazhossain at yahoo dot com
  0 siblings, 1 reply; 2+ messages in thread
From: fiazhossain at yahoo dot com @ 2009-02-06 19:47 UTC (permalink / raw)
  To: gdb-prs

Attach to a running java process with gdb. Use the command generate-core-file to
generate the core file. Then detach from the process and use gdb to attach to
the core file. At this stage gdb is not able to show any backtrace from the
core. I typically use gcore to get the core instead of generating from gdb and
they both seem to have the same problem when I use gdb to attach to it later. 

Here is the OS version:
% uname -a
Linux fiazh 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:32:02 EDT 2006 x86_64 x86_64
x86_64 GNU/Linux
% cat /etc/redhat-release 
Red Hat Enterprise Linux ES release 4 (Nahant Update 4)

Here the Java version (however problem exists with 1.5 too):
% java -version
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Server VM (build 10.0-b23, mixed mode)


Here is a sample run.

% javac GCCoreTest.java
% java GCCoreTest &
% gdb -p 26586
(gdb) backtrace
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xf7ef0775 in pthread_join () from /lib32/libpthread.so.0
#2  0x0804dce8 in ContinueInNewThread ()
#3  0x080497f6 in main ()
(gdb) generate-core-file
Saved corefile core.26586
(gdb) detach
Detaching from program: /home/fiaz/dev/tools/Linux/jdk/jdk1.6.0_07/bin/java,
process 26586
(gdb) quit

% gdb `which java` core.26586

warning: Couldn't recognize general-purpose registers in core file.

(no debugging symbols found)
Core was generated by `/home/fiaz/dev/tools/Linux/jdk/jdk1.6.0_07/bin/java'.
[New process 26587]
[New process 26588]
[New process 26589]
[New process 26590]
[New process 26591]
[New process 26592]
[New process 26593]
[New process 26594]
[New process 26595]
[New process 26596]
[New process 26597]
[New process 26598]
[New process 26599]
[New process 26586]

warning: Couldn't recognize general-purpose registers in core file.
#0  0x00000000 in ?? ()
(gdb) backtrace
#0  0x00000000 in ?? ()
(gdb) quit


Here is the java code -

public class GCoreTest {

    /**
     * @param args
     */
    public static void main(String[] args) {
    // TODO Auto-generated method stub
        try {
            Thread.sleep(1000000);
        } catch (InterruptedException ie) {}
        
        System.exit(0);
    }
}

-- 
           Summary: gdb 6.8 cannot show backtrace from core file that it had
                    generated on Linux
           Product: gdb
           Version: 6.8
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: corefiles
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: fiazhossain at yahoo dot com
                CC: gdb-prs at sourceware dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=9825

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

* [Bug corefiles/9825] gdb 6.8 cannot show backtrace from core file that it had generated on Linux
  2009-02-06 19:47 [Bug corefiles/9825] New: gdb 6.8 cannot show backtrace from core file that it had generated on Linux fiazhossain at yahoo dot com
@ 2009-03-17  2:26 ` fiazhossain at yahoo dot com
  0 siblings, 0 replies; 2+ messages in thread
From: fiazhossain at yahoo dot com @ 2009-03-17  2:26 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From fiazhossain at yahoo dot com  2009-03-17 02:26 -------
It turns out that the problem was related to using a 32-Bit VM on a 64 bit 
machine. To generate the proper core file I had to to install and use a 32-Bit 
gdb instead of the default 64-Bit gdb.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://sourceware.org/bugzilla/show_bug.cgi?id=9825

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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

end of thread, other threads:[~2009-03-17  2:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-06 19:47 [Bug corefiles/9825] New: gdb 6.8 cannot show backtrace from core file that it had generated on Linux fiazhossain at yahoo dot com
2009-03-17  2:26 ` [Bug corefiles/9825] " fiazhossain at yahoo dot com

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).