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

cannot debug in synchronizer.o or objectMonitor.o on Solaris X86 debug/jvmg bits

    Details

    • Subcomponent:
    • Resolved In Build:
      b16
    • CPU:
      x86
    • OS:
      solaris_10

      Backports

        Description

        While developing the StressMonitorWait test for the following bug:

            JDK-8028073 race condition in ObjectMonitor implementation causing deadlocks

        I tried to debug the resulting hang on a Solaris 10 Update 11 machine using
        a local HotSpot debug/jvmg build. My local builds are automatically fired with
        ZIP_DEBUGINFO_FILES=0 set so this isn't an issue of forgetting to unzip
        the libjvm.diz file.

        Here is my debug session:

        $ dbx $JAVA_HOME/bin/java core.with-old-gobjcopy
        For information about new features see `help changes'
        To remove this message, put `dbxenv suppress_startup_message 7.7' in your .dbxrc
        Reading java
        dbx: internal warning: writable memory segment 0xfffffd7ffc7d0000[32768] of size 0 in core
        core file header read successfully
        Reading ld.so.1
        Reading libjli.so
        Reading libthread.so.1
        Reading libdl.so.1
        Reading libc.so.1
        Reading libjvm.so
        Reading libsocket.so.1
        Reading libsched.so.1
        Reading libm.so.1
        Reading libCrun.so.1
        Reading libdoor.so.1
        Reading libdemangle.so.1
        Reading libkstat.so.1
        Reading libnsl.so.1
        Reading libm.so.2
        Reading libmp.so.2
        Reading libmd.so.1
        Reading libscf.so.1
        Reading libuutil.so.1
        Reading libgen.so.1
        Reading libverify.so
        Reading libjava.so
        Reading libStressMonitorWait.so
        Reading libzip.so
        t@1 (l@1) terminated by signal 0 (UNKNOWN SIGNAL)
        0xfffffd7fff27354a: __lwp_wait+0x000a: jae __lwp_wait+0x18 [ 0xfffffd7fff273558, .+0xe ]
        (dbx) thread t@47
        Current function is JVM_MonitorWait
          522 ObjectSynchronizer::wait(obj, ms, CHECK);
        t@47 (l@47) stopped in ___lwp_cond_wait at 0xfffffd7fff2735ea
        0xfffffd7fff2735ea: ___lwp_cond_wait+0x000a: jae ___lwp_cond_wait+0x18 [ 0xfffffd7fff2735f8, .+0xe ]
        (dbx) where
        current thread: t@47
          [1] ___lwp_cond_wait(0x9b2f50, 0x9b2f38, 0x0, 0x0, 0xfffffd7fff258720, 0x9b2f00), at 0xfffffd7fff2735ea
          [2] __lwp_cond_wait(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff25873c
          [3] os::Solaris::cond_wait(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ffe28b7db
          [4] os::PlatformEvent::park(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ffe2885d6
          [5] ObjectMonitor::ReenterI(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ffe25597d
          [6] ObjectMonitor::wait(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ffe258492
          [7] ObjectSynchronizer::wait(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ffe4294c8
        =>[8] JVM_MonitorWait(env = 0x9b2228, handle = 0xfffffd7fc0231578, ms = 0), line 522 in "jvm.cpp"
          [9] 0xfffffd7fed62a07d(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fed62a07d
          [10] 0xfffffd7fed62a07d(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fed62a07d
          [11] 0xfffffd7fed607520(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fed607520
          [12] 0xfffffd7fed607520(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fed607520
          [13] 0xfffffd7fed600671(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fed600671
          [14] JavaCalls::call_helper(result = 0xfffffd7fc0231c58, m = 0xfffffd7fc0231a40, args = 0xfffffd7fc0231b68, __the_thread__ = 0x9b2000), line 393 in "javaCalls.cpp"
          [15] os::os_exception_wrapper(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ffe283638
          [16] JavaCalls::call(result = 0xfffffd7fc0231c58, method = CLASS, args = 0xfffffd7fc0231b68, __the_thread__ = 0x9b2000), line 307 in "javaCalls.cpp"
          [17] JavaCalls::call_virtual(result = 0xfffffd7fc0231c58, spec_klass = CLASS, name = 0x4b8c28, signature = 0x4ba3e8, args = 0xfffffd7fc0231b68, __the_thread__ = 0x9b2000), line 204 in "javaCalls.cpp"
          [18] JavaCalls::call_virtual(result = 0xfffffd7fc0231c58, receiver = CLASS, spec_klass = CLASS, name = 0x4b8c28, signature = 0x4ba3e8, __the_thread__ = 0x9b2000), line 210 in "javaCalls.cpp"
          [19] thread_entry(thread = 0x9b2000, __the_thread__ = 0x9b2000), line 2807 in "jvm.cpp"
          [20] JavaThread::thread_main_inner(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ffe475f03
          [21] JavaThread::run(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ffe475d35
          [22] java_start(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ffe277f48
          [23] _thr_setup(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff26d9db
          [24] _lwp_start(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff26dc10
        (dbx) list
          522 ObjectSynchronizer::wait(obj, ms, CHECK);
          523 JVM_END
          524
          525
          526 JVM_ENTRY(void, JVM_MonitorNotify(JNIEnv* env, jobject handle))
          527 JVMWrapper("JVM_MonitorNotify");
          528 Handle obj(THREAD, JNIHandles::resolve_non_null(handle));
          529 ObjectSynchronizer::notify(obj, CHECK);
          530 JVM_END
          531
        (dbx) module
        Read jvm.o
        (dbx) down
        0xfffffd7ffe4294c8: wait+0x0238: movq 0xffffffffffffffe8(%rbp),%rdx
        (dbx) list
        dbx: warning: No source file
        (dbx) module
        Can't find module '(unknown OF)'
        (dbx) module synchronizer.o
        No Info synchronizer.o
        (dbx) down
        0xfffffd7ffe258492: wait+0x0952: movq 0xfffffffffffffff8(%rbp),%rsi
        (dbx) list
        dbx: warning: No source file
        (dbx) module
        Can't find module '(unknown OF)'
        (dbx) module objectMonitor.o
        No Info objectMonitor.o
        (dbx) down
        0xfffffd7ffe25597d: ReenterI+0x037d: movq 0xffffffffffffffd0(%rbp),%rsi
        (dbx) list
        dbx: warning: No source file
        (dbx)

        The code in jvm.o is debuggable. However, the code in synchronizer.o
        and objectMonitor.o is not debuggable.

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: