Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7165611

implement Full Debug Symbols on MacOS X hotspot

    Details

    • Subcomponent:
    • Resolved In Build:
      b55
    • CPU:
      generic
    • OS:
      os_x

      Backports

        Description

        The Full Debug Symbols (FDS) feature needs to be implemented
        on MacOS X in order to achieve parity with Linux, Solaris and
        Windows.

        This bug covers the 'hotspot' repo portion along with minimal supporting
        changes in other repos.

          Issue Links

            Activity

            Hide
            dcubed Daniel Daugherty added a comment -
            Quick sanity check of my latest forest build bits.

            Crash the VM to generate a core file:

            $ jdk/fastdebug/bin/java -XX:ErrorHandlerTest=12
            #
            # A fatal error has been detected by the Java Runtime Environment:
            #
            # SIGILL (0x4) at pc=0x0000000101ae5a08, pid=25387, tid=6659
            #
            # JRE version: Java(TM) SE Runtime Environment (8.0) (build 1.8.0-internal-fastdebug-jprtadm_2013_09_21_00_15-b00)
            # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.0-b51-fastdebug mixed mode bsd-amd64 compressed oops)
            # Problematic frame:
            # V [libjvm.dylib+0x2e5a08] test_error_handler()+0x2e2
            #
            # Core dump written. Default location: /cores/core or core.25387
            #
            # An error report file with more information is saved as:
            # /work/shared/bug_hunt/7165611_exp/2013-09-20-223213.ddaugher.7165611_jdk8_b108_hsx25_b51_exp/hs_err_pid25387.log
            #
            # If you would like to submit a bug report, please visit:
            # http://bugreport.sun.com/bugreport/crash.jsp
            #
            Current thread is 6659
            Dumping core ...
            Abort trap (core dumped)

            Of course, this is MacOS X so the core file is not in the current working dir...

            $ gdb jdk/fastdebug/bin/java /cores/core.25387
            GNU gdb 6.3.50-20050815 (Apple version gdb-1515) (Sat Jan 15 08:33:48 UTC 2011)
            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 "x86_64-apple-darwin"...Reading symbols for shared libraries ......... done

            warning: Could not find object file "/opt/jprt/T/P1/223213.ddaugher/s/build/macosx-x86_64-normal-server-fastdebug/jdk/objs/java_objs/main.o" - no debug information available for "main.c".

            <snip> Lots and lots of these "no debug information" mesgs...

            warning: Could not find object file "/opt/jprt/T/P1/223213.ddaugher/s/build/macosx-x86_64-normal-server-fastdebug/jdk/objs/libzip/zip_util.o" - no debug information available for "zip_util.c".

            .............. done

            Here's our crashing thread:

            (gdb) thread 3
            [Switching to thread 3 (core thread 2)]
            0x00007fff809519ce in __semwait_signal_nocancel ()
            (gdb) bt
            #0 0x00007fff809519ce in __semwait_signal_nocancel ()
            #1 0x00007fff809518d0 in nanosleep$NOCANCEL ()
            #2 0x00007fff809ae3ce in usleep$NOCANCEL ()
            #3 0x00007fff809cda00 in abort ()
            #4 0x0000000101e7a960 in os::abort ()
            #5 0x0000000102008c63 in VMError::report_and_die ()
            #6 0x0000000101e7c863 in JVM_handle_bsd_signal ()
            #7 0x0000000101e77a63 in signalHandler ()
            #8 <signal handler called>
            #9 0x0000000101ae5a08 in test_error_handler ()
            #10 0x0000000101ca6e4a in JNI_CreateJavaVM ()
            #11 0x00000001f2326405 in ?? ()
            #12 0x00007fff80917fd6 in _pthread_start ()
            #13 0x00007fff80917e89 in thread_start ()


            Here again after unzip'ing the libjvm.diz file:

            gdb jdk/fastdebug/bin/java /cores/core.25387
            GNU gdb 6.3.50-20050815 (Apple version gdb-1515) (Sat Jan 15 08:33:48 UTC 2011)
            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 "x86_64-apple-darwin"...Reading symbols for shared libraries ......... done

            warning: Could not find object file "/opt/jprt/T/P1/223213.ddaugher/s/build/macosx-x86_64-normal-server-fastdebug/jdk/objs/java_objs/main.o" - no debug information available for "main.c".

            <snip>

            Something new, but it doesn't tell us which library... but libjvm would be a good guess...

            warning: Could not find object file "/opt/jprt/T/P1/223213.ddaugher/s/build/macosx-x86_64-normal-server-fastdebug/jdk/objs/libjli_static/wildcard.o" - no debug information available for "wildcard.c".


            Reading symbols for shared libraries . done
            Reading symbols for shared libraries ...........................................................................................
            warning: Could not find object file "/opt/jprt/T/P1/223213.ddaugher/s/build/macosx-x86_64-normal-server-fastdebug/jdk/objs/libverify/check_code.o" - no debug information available for "check_code.c".

            <snip>

            .............. done
            #0 0x00007fff808ded7a in mach_msg_trap ()
            (gdb) info threads
              15 0x00007fff80919a6a in __semwait_signal ()
              14 0x00007fff80919a6a in __semwait_signal ()
              13 0x00007fff80919a6a in __semwait_signal ()
              12 indOffset32Oper::in_RegMask (this=0x101034518, index=0) at ad_x86_64.cpp:9102
              11 0x00007fff808dedb6 in semaphore_wait_trap ()
              10 0x00007fff808f8a2a in __workq_kernreturn ()
               9 0x00007fff808f7c0a in kevent ()
               8 0x00007fff80919a6a in __semwait_signal ()
               7 0x00007fff80919a6a in __semwait_signal ()
               6 0x00007fff80919a6a in __semwait_signal ()
               5 0x00007fff80919a6a in __semwait_signal ()
               4 0x00007fff80919a6a in __semwait_signal ()
               3 0x00007fff809519ce in __semwait_signal_nocancel ()
               2 0x00007fff80919a6a in __semwait_signal ()
            * 1 0x00007fff808ded7a in mach_msg_trap ()
            Current language: auto; currently c++
            (gdb) thread 3
            [Switching to thread 3 (core thread 2)]
            0x00007fff809519ce in __semwait_signal_nocancel ()
            (gdb) bt
            #0 0x00007fff809519ce in __semwait_signal_nocancel ()
            #1 0x00007fff809518d0 in nanosleep$NOCANCEL ()
            #2 0x00007fff809ae3ce in usleep$NOCANCEL ()
            #3 0x00007fff809cda00 in abort ()
            #4 0x0000000101e7a960 in os::abort (dump_core=112) at os_bsd.cpp:1095
            #5 0x0000000102008c63 in VMError::report_and_die (this=0x100400250) at vmError.cpp:1078
            #6 0x0000000101e7c863 in JVM_handle_bsd_signal (sig=4, info=0x100400370, ucVoid=0x100400370, abort_if_unrecognized=4195184) at os_bsd_x86.cpp:715
            #7 0x0000000101e77a63 in signalHandler (sig=4, info=0x1004007e0, uc=0x100400848) at os_bsd.cpp:3054
            #8 <signal handler called>
            #9 test_error_handler () at debug.cpp:251
            #10 0x0000000101ca6e4a in JNI_CreateJavaVM (vm=0x101000a20, penv=0x1024e2460, args=0x101000800) at jni.cpp:5178
            #11 0x00000001f2326405 in ?? ()
            #12 0x00007fff80917fd6 in _pthread_start ()
            #13 0x00007fff80917e89 in thread_start ()
            (gdb) frame 9
            #9 test_error_handler () at debug.cpp:251
            251 debug.cpp: No such file or directory.
            in debug.cpp
            (gdb) info locals
            test_num = 4096
            num = 4096

            So quick and dirty verification that libjvm.diz gives us more useful info.
            Show
            dcubed Daniel Daugherty added a comment - Quick sanity check of my latest forest build bits. Crash the VM to generate a core file: $ jdk/fastdebug/bin/java -XX:ErrorHandlerTest=12 # # A fatal error has been detected by the Java Runtime Environment: # # SIGILL (0x4) at pc=0x0000000101ae5a08, pid=25387, tid=6659 # # JRE version: Java(TM) SE Runtime Environment (8.0) (build 1.8.0-internal-fastdebug-jprtadm_2013_09_21_00_15-b00) # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.0-b51-fastdebug mixed mode bsd-amd64 compressed oops) # Problematic frame: # V [libjvm.dylib+0x2e5a08] test_error_handler()+0x2e2 # # Core dump written. Default location: /cores/core or core.25387 # # An error report file with more information is saved as: # /work/shared/bug_hunt/7165611_exp/2013-09-20-223213.ddaugher.7165611_jdk8_b108_hsx25_b51_exp/hs_err_pid25387.log # # If you would like to submit a bug report, please visit: # http://bugreport.sun.com/bugreport/crash.jsp # Current thread is 6659 Dumping core ... Abort trap (core dumped) Of course, this is MacOS X so the core file is not in the current working dir... $ gdb jdk/fastdebug/bin/java /cores/core.25387 GNU gdb 6.3.50-20050815 (Apple version gdb-1515) (Sat Jan 15 08:33:48 UTC 2011) 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 "x86_64-apple-darwin"...Reading symbols for shared libraries ......... done warning: Could not find object file "/opt/jprt/T/P1/223213.ddaugher/s/build/macosx-x86_64-normal-server-fastdebug/jdk/objs/java_objs/main.o" - no debug information available for "main.c". <snip> Lots and lots of these "no debug information" mesgs... warning: Could not find object file "/opt/jprt/T/P1/223213.ddaugher/s/build/macosx-x86_64-normal-server-fastdebug/jdk/objs/libzip/zip_util.o" - no debug information available for "zip_util.c". .............. done Here's our crashing thread: (gdb) thread 3 [Switching to thread 3 (core thread 2)] 0x00007fff809519ce in __semwait_signal_nocancel () (gdb) bt #0 0x00007fff809519ce in __semwait_signal_nocancel () #1 0x00007fff809518d0 in nanosleep$NOCANCEL () #2 0x00007fff809ae3ce in usleep$NOCANCEL () #3 0x00007fff809cda00 in abort () #4 0x0000000101e7a960 in os::abort () #5 0x0000000102008c63 in VMError::report_and_die () #6 0x0000000101e7c863 in JVM_handle_bsd_signal () #7 0x0000000101e77a63 in signalHandler () #8 <signal handler called> #9 0x0000000101ae5a08 in test_error_handler () #10 0x0000000101ca6e4a in JNI_CreateJavaVM () #11 0x00000001f2326405 in ?? () #12 0x00007fff80917fd6 in _pthread_start () #13 0x00007fff80917e89 in thread_start () Here again after unzip'ing the libjvm.diz file: gdb jdk/fastdebug/bin/java /cores/core.25387 GNU gdb 6.3.50-20050815 (Apple version gdb-1515) (Sat Jan 15 08:33:48 UTC 2011) 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 "x86_64-apple-darwin"...Reading symbols for shared libraries ......... done warning: Could not find object file "/opt/jprt/T/P1/223213.ddaugher/s/build/macosx-x86_64-normal-server-fastdebug/jdk/objs/java_objs/main.o" - no debug information available for "main.c". <snip> Something new, but it doesn't tell us which library... but libjvm would be a good guess... warning: Could not find object file "/opt/jprt/T/P1/223213.ddaugher/s/build/macosx-x86_64-normal-server-fastdebug/jdk/objs/libjli_static/wildcard.o" - no debug information available for "wildcard.c". Reading symbols for shared libraries . done Reading symbols for shared libraries ........................................................................................... warning: Could not find object file "/opt/jprt/T/P1/223213.ddaugher/s/build/macosx-x86_64-normal-server-fastdebug/jdk/objs/libverify/check_code.o" - no debug information available for "check_code.c". <snip> .............. done #0 0x00007fff808ded7a in mach_msg_trap () (gdb) info threads   15 0x00007fff80919a6a in __semwait_signal ()   14 0x00007fff80919a6a in __semwait_signal ()   13 0x00007fff80919a6a in __semwait_signal ()   12 indOffset32Oper::in_RegMask (this=0x101034518, index=0) at ad_x86_64.cpp:9102   11 0x00007fff808dedb6 in semaphore_wait_trap ()   10 0x00007fff808f8a2a in __workq_kernreturn ()    9 0x00007fff808f7c0a in kevent ()    8 0x00007fff80919a6a in __semwait_signal ()    7 0x00007fff80919a6a in __semwait_signal ()    6 0x00007fff80919a6a in __semwait_signal ()    5 0x00007fff80919a6a in __semwait_signal ()    4 0x00007fff80919a6a in __semwait_signal ()    3 0x00007fff809519ce in __semwait_signal_nocancel ()    2 0x00007fff80919a6a in __semwait_signal () * 1 0x00007fff808ded7a in mach_msg_trap () Current language: auto; currently c++ (gdb) thread 3 [Switching to thread 3 (core thread 2)] 0x00007fff809519ce in __semwait_signal_nocancel () (gdb) bt #0 0x00007fff809519ce in __semwait_signal_nocancel () #1 0x00007fff809518d0 in nanosleep$NOCANCEL () #2 0x00007fff809ae3ce in usleep$NOCANCEL () #3 0x00007fff809cda00 in abort () #4 0x0000000101e7a960 in os::abort (dump_core=112) at os_bsd.cpp:1095 #5 0x0000000102008c63 in VMError::report_and_die (this=0x100400250) at vmError.cpp:1078 #6 0x0000000101e7c863 in JVM_handle_bsd_signal (sig=4, info=0x100400370, ucVoid=0x100400370, abort_if_unrecognized=4195184) at os_bsd_x86.cpp:715 #7 0x0000000101e77a63 in signalHandler (sig=4, info=0x1004007e0, uc=0x100400848) at os_bsd.cpp:3054 #8 <signal handler called> #9 test_error_handler () at debug.cpp:251 #10 0x0000000101ca6e4a in JNI_CreateJavaVM (vm=0x101000a20, penv=0x1024e2460, args=0x101000800) at jni.cpp:5178 #11 0x00000001f2326405 in ?? () #12 0x00007fff80917fd6 in _pthread_start () #13 0x00007fff80917e89 in thread_start () (gdb) frame 9 #9 test_error_handler () at debug.cpp:251 251 debug.cpp: No such file or directory. in debug.cpp (gdb) info locals test_num = 4096 num = 4096 So quick and dirty verification that libjvm.diz gives us more useful info.
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/f509b8f4699b
            User: dcubed
            Date: 2013-10-15 22:09:25 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/f509b8f4699b User: dcubed Date: 2013-10-15 22:09:25 +0000
            Hide
            dcubed Daniel Daugherty added a comment -
            Author: dcubed
            Date: 2013-10-15 08:24 -0700
            URL: http://hg.openjdk.java.net/hsx/hotspot-rt/rev/22c6f0b7e2b5


            Author: dcubed
            Date: 2013-10-15 08:26 -0700
            URL: http://closedjdk.us.oracle.com/hsx/hotspot-rt/install/rev/542c26e29d44


            Author: dcubed
            Date: 2013-10-15 08:26 -0700
            URL: http://hg.openjdk.java.net/hsx/hotspot-rt/jdk/rev/01b81253f2d5


            Author: dcubed
            Date: 2013-10-15 08:27 -0700
            URL: http://closedjdk.us.oracle.com/hsx/hotspot-rt/jdk/make/closed/rev/9b84967a7e67
            Show
            dcubed Daniel Daugherty added a comment - Author: dcubed Date: 2013-10-15 08:24 -0700 URL: http://hg.openjdk.java.net/hsx/hotspot-rt/rev/22c6f0b7e2b5 Author: dcubed Date: 2013-10-15 08:26 -0700 URL: http://closedjdk.us.oracle.com/hsx/hotspot-rt/install/rev/542c26e29d44 Author: dcubed Date: 2013-10-15 08:26 -0700 URL: http://hg.openjdk.java.net/hsx/hotspot-rt/jdk/rev/01b81253f2d5 Author: dcubed Date: 2013-10-15 08:27 -0700 URL: http://closedjdk.us.oracle.com/hsx/hotspot-rt/jdk/make/closed/rev/9b84967a7e67
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/hsx/hsx25/hotspot/rev/f509b8f4699b
            User: amurillo
            Date: 2013-10-19 08:01:03 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/hsx/hsx25/hotspot/rev/f509b8f4699b User: amurillo Date: 2013-10-19 08:01:03 +0000
            Hide
            dcubed Daniel Daugherty added a comment -
            Debug info bundles for MacOS X are present in JDK8-B113:

            505 2013.10.24 09:15:48 $ unzip -l jdk-8-ea-bin-b113-macosx-x86_64-debuginfo-24_oct_2013.zip
            Archive: jdk-8-ea-bin-b113-macosx-x86_64-debuginfo-24_oct_2013.zip
              Length Date Time Name
            --------- ---------- ----- ----
                  642 10-24-2013 02:33 jdk1.8.0/jre/lib/libjsig.dylib.dSYM/Contents/Info.plist
                 8346 10-24-2013 02:33 jdk1.8.0/jre/lib/libjsig.dylib.dSYM/Contents/Resources/DWARF/libjsig.dylib
                  644 10-24-2013 02:33 jdk1.8.0/jre/lib/libsaproc.dylib.dSYM/Contents/Info.plist
                12442 10-24-2013 02:33 jdk1.8.0/jre/lib/libsaproc.dylib.dSYM/Contents/Resources/DWARF/libsaproc.dylib
                   15 10-24-2013 02:57 jdk1.8.0/jre/lib/server/libjsig.dSYM
                  641 10-24-2013 02:34 jdk1.8.0/jre/lib/server/libjvm.dylib.dSYM/Contents/Info.plist
            329818033 10-24-2013 02:34 jdk1.8.0/jre/lib/server/libjvm.dylib.dSYM/Contents/Resources/DWARF/libjvm.dylib
            --------- -------
            329840763 7 files

            506 2013.10.24 09:16:07 $ unzip -l jdk-8-ea-bin-b113-macosx-x86_64-fastdebuginfo-24_oct_2013.zip
            Archive: jdk-8-ea-bin-b113-macosx-x86_64-fastdebuginfo-24_oct_2013.zip
              Length Date Time Name
            --------- ---------- ----- ----
                  642 10-24-2013 02:09 jdk1.8.0/fastdebug/jre/lib/libjsig.dylib.dSYM/Contents/Info.plist
                 8346 10-24-2013 02:09 jdk1.8.0/fastdebug/jre/lib/libjsig.dylib.dSYM/Contents/Resources/DWARF/libjsig.dylib
                  644 10-24-2013 02:09 jdk1.8.0/fastdebug/jre/lib/libsaproc.dylib.dSYM/Contents/Info.plist
                12442 10-24-2013 02:09 jdk1.8.0/fastdebug/jre/lib/libsaproc.dylib.dSYM/Contents/Resources/DWARF/libsaproc.dylib
                   15 10-24-2013 02:29 jdk1.8.0/fastdebug/jre/lib/server/libjsig.dSYM
                  641 10-24-2013 02:10 jdk1.8.0/fastdebug/jre/lib/server/libjvm.dylib.dSYM/Contents/Info.plist
            418527154 10-24-2013 02:10 jdk1.8.0/fastdebug/jre/lib/server/libjvm.dylib.dSYM/Contents/Resources/DWARF/libjvm.dylib
            --------- -------
            418549884 7 files

            Show
            dcubed Daniel Daugherty added a comment - Debug info bundles for MacOS X are present in JDK8-B113: 505 2013.10.24 09:15:48 $ unzip -l jdk-8-ea-bin-b113-macosx-x86_64-debuginfo-24_oct_2013.zip Archive: jdk-8-ea-bin-b113-macosx-x86_64-debuginfo-24_oct_2013.zip   Length Date Time Name --------- ---------- ----- ----       642 10-24-2013 02:33 jdk1.8.0/jre/lib/libjsig.dylib.dSYM/Contents/Info.plist      8346 10-24-2013 02:33 jdk1.8.0/jre/lib/libjsig.dylib.dSYM/Contents/Resources/DWARF/libjsig.dylib       644 10-24-2013 02:33 jdk1.8.0/jre/lib/libsaproc.dylib.dSYM/Contents/Info.plist     12442 10-24-2013 02:33 jdk1.8.0/jre/lib/libsaproc.dylib.dSYM/Contents/Resources/DWARF/libsaproc.dylib        15 10-24-2013 02:57 jdk1.8.0/jre/lib/server/libjsig.dSYM       641 10-24-2013 02:34 jdk1.8.0/jre/lib/server/libjvm.dylib.dSYM/Contents/Info.plist 329818033 10-24-2013 02:34 jdk1.8.0/jre/lib/server/libjvm.dylib.dSYM/Contents/Resources/DWARF/libjvm.dylib --------- ------- 329840763 7 files 506 2013.10.24 09:16:07 $ unzip -l jdk-8-ea-bin-b113-macosx-x86_64-fastdebuginfo-24_oct_2013.zip Archive: jdk-8-ea-bin-b113-macosx-x86_64-fastdebuginfo-24_oct_2013.zip   Length Date Time Name --------- ---------- ----- ----       642 10-24-2013 02:09 jdk1.8.0/fastdebug/jre/lib/libjsig.dylib.dSYM/Contents/Info.plist      8346 10-24-2013 02:09 jdk1.8.0/fastdebug/jre/lib/libjsig.dylib.dSYM/Contents/Resources/DWARF/libjsig.dylib       644 10-24-2013 02:09 jdk1.8.0/fastdebug/jre/lib/libsaproc.dylib.dSYM/Contents/Info.plist     12442 10-24-2013 02:09 jdk1.8.0/fastdebug/jre/lib/libsaproc.dylib.dSYM/Contents/Resources/DWARF/libsaproc.dylib        15 10-24-2013 02:29 jdk1.8.0/fastdebug/jre/lib/server/libjsig.dSYM       641 10-24-2013 02:10 jdk1.8.0/fastdebug/jre/lib/server/libjvm.dylib.dSYM/Contents/Info.plist 418527154 10-24-2013 02:10 jdk1.8.0/fastdebug/jre/lib/server/libjvm.dylib.dSYM/Contents/Resources/DWARF/libjvm.dylib --------- ------- 418549884 7 files

              People

              • Assignee:
                dcubed Daniel Daugherty
                Reporter:
                dcubed Daniel Daugherty
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: