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

NULL thread ID in MONITOR_DUMP

XMLWordPrintable

    • 03
    • x86, sparc
    • solaris_7, windows_nt, windows_2000



        Name: tb29552 Date: 02/23/2001


        For:

        java version "1.3.1-beta"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-beta-b16)
        Java HotSpot(TM) Client VM (build 1.3.1beta-b16, mixed mode)

        With -Xcomp mode, JVMPI_EVENT_MONITOR_DUMP sometimes shows a monitor
        with a non-zero "waiting to enter" count, but the thread ID waiting
        is 0 (NULL).

        Compile the attached JVMPI client, jvmpi_tool.cpp to make libjvmpi_tool.dll
        and compile the Java example Deadlock.java. Run java as:

        java -Xcomp -Xrunjvmpi_tool Deadlock

        The two threads will deadlock, and after several seconds you will see
        a monitor dump:

        Start 0x800fd4: "Monitor dumper"
        Start 0x800fd4: "Monitor dumper"
        Start 0x7fcd14: "Finalizer"
        Start 0x8990994: "Reference Handler"
        Start 0x23493c: "main"
        Start 0x802374: "Signal Dispatcher"
        Start 0x802e34: "CompileThread0"
        Start 0x8a0867c: "One"
        Start 0x23493c: "Thread-0"
        Start 0x8a10064: "Two"
        Thread One: lockA
        Thread Two: lockB

        Monitor Dump:
        Monitor 0x69ee1c0: Owner: 0x8a10064 Entry count: 1
          1 waiting to enter
            0
          0 awaiting notification
        Monitor 0x69ee190: Owner: 0x8a0867c Entry count: 1
          1 waiting to enter
            0
          0 awaiting notification
        Monitor 0x2930328: Owner: 0 Entry count: 1
          0 waiting to enter
          1 awaiting notification
            0x7fcd14
        Monitor 0x2930238: Owner: 0 Entry count: 1
          0 waiting to enter
          1 awaiting notification
            0x8990994

        Note the IDs for the threads waiting to enter monitors 0x69ee190 and
        0x69ee1c0 are 0, but should be 0x8a10064 and 0x8a0867c respectively.

        Tim B. attached an archive with the test program files along with
        a Makefile so I'm deleting the copies from the description.

        (Review ID: 117569)
        ======================================================================

        Name: elR10090 Date: 05/07/2001


        This bug affects the following testbase_nsk test:
            nsk/regression/b4311308
        ======================================================================

              chegar Chris Hegarty
              tbell Tim Bell
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: