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

Destroyed monitor passed to some functions causes java crash

XMLWordPrintable

    • sol-beta
    • x86, sparc
    • solaris_7, windows_nt
    • Not verified



      Name: icC57033 Date: 01/28/2000


      Raw monitor functions RawMonitorNotify(), RawMonitorNotifyAll(),
      RawMonitorWait()
      and RawMonitorExit() do not verify their actual arguments.
      This leads to VM crash when the functions are invoked for destroyed monitor..
      Due to this, HotSpot VM 1.3.0rc1-S fails tests
        nsk/jvmdi/RawMonitorNotify/rawmnntfy003
        nsk/jvmdi/RawMonitorNotifyAll/rawmnntfyall003
        nsk/jvmdi/RawMonitorWait/rawmnwait003
        nsk/jvmdi/RawMonitorExit/rawmonexit003
      from
        testbase_nsk

      To reproduce the bug run Korn shell script
        doit.ksh <jdk_root_directory>
      in
        /net/sqesvr/vsn/GammaBase/Bugs/<this bug number>

      Running on HS 1.3.0rc1-S the script outputs:
      ################################ doit1.ksh #######################
      Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86
      Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

      rawmnntfy003.c
      Microsoft (R) Incremental Linker Version 6.00.8168
      Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

      /DEFAULTLIB:ws2_32.lib
      /dll
      /implib:rawmnntfy003.lib
      /out:rawmnntfy003.dll
      rawmnntfy003.obj
         Creating library rawmnntfy003.lib and object rawmnntfy003.exp
      java version "1.3.0rc1"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc1-S)
      Java HotSpot(TM) Client VM (build 1.3.0rc1-S, mixed mode)
      -------------------------- java ---------------------------------
      Setting rawmnntfy003_EventHook as event hook.
      ######## JVMDI_EVENT_VM_INIT ########
      Try RawMonitorNotify for 10240 raw monitors
      Wrong results from RawMonitorNotify(rawmnntfy003_bad)
              error: JVMDI_ERROR_INTERNAL
      ######## JVMDI_EVENT_VM_DEATH ########
      exit 97
      -------------------------- java_g -------------------------------
      Setting rawmnntfy003_EventHook as event hook.
      ######## JVMDI_EVENT_VM_INIT ########
      Try RawMonitorNotify for 10240 raw monitors
      #
      # HotSpot Virtual Machine Error, assertion failure
      #
      # assert(raw_result == ObjectMonitor::OM_OK, "raw_result == OM_OK")
      #
      # Error ID: C:/hotspot1.3\src\share\vm\prims\jvmdi.cpp, 2219
      #
      exit 1
      -------------------------- java -classic ------------------------
      Setting rawmnntfy003_EventHook as event hook.
      ######## JVMDI_EVENT_VM_INIT ########
      Try RawMonitorNotify for 10240 raw monitors
      Wrong results from RawMonitorNotify(rawmnntfy003_bad)
              error: JVMDI_ERROR_NOT_MONITOR_OWNER
      ######## JVMDI_EVENT_VM_DEATH ########
      exit 97

      ################################ doit2.ksh #######################
      Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86
      Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

      rawmnntfyall003.c
      Microsoft (R) Incremental Linker Version 6.00.8168
      Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

      /DEFAULTLIB:ws2_32.lib
      /dll
      /implib:rawmnntfyall003.lib
      /out:rawmnntfyall003.dll
      rawmnntfyall003.obj
         Creating library rawmnntfyall003.lib and object rawmnntfyall003.exp
      java version "1.3.0rc1"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc1-S)
      Java HotSpot(TM) Client VM (build 1.3.0rc1-S, mixed mode)
      -------------------------- java ---------------------------------
      Setting rawmnntfyall003_EventHook as event hook.
      ######## JVMDI_EVENT_VM_INIT ########
      Try RawMonitorNotifyAll for 10240 raw monitors
      Wrong result from RawMonitorNotifyAll(rawmnntfyall003_bad)
              error: JVMDI_ERROR_INTERNAL
      ######## JVMDI_EVENT_VM_DEATH ########
      exit 97
      -------------------------- java_g -------------------------------
      Setting rawmnntfyall003_EventHook as event hook.
      ######## JVMDI_EVENT_VM_INIT ########
      Try RawMonitorNotifyAll for 10240 raw monitors
      #
      # HotSpot Virtual Machine Error, assertion failure
      #
      # assert(raw_result == ObjectMonitor::OM_OK, "raw_result == OM_OK")
      #
      # Error ID: C:/hotspot1.3\src\share\vm\prims\jvmdi.cpp, 2219
      #
      exit 1
      -------------------------- java -classic ------------------------
      Setting rawmnntfyall003_EventHook as event hook.
      ######## JVMDI_EVENT_VM_INIT ########
      Try RawMonitorNotifyAll for 10240 raw monitors
      Wrong result from RawMonitorNotifyAll(rawmnntfyall003_bad)
              error: JVMDI_ERROR_NOT_MONITOR_OWNER
      ######## JVMDI_EVENT_VM_DEATH ########
      exit 97

      ################################ doit3.ksh #######################
      Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86
      Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

      rawmnwait003.c
      Microsoft (R) Incremental Linker Version 6.00.8168
      Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

      /DEFAULTLIB:ws2_32.lib
      /dll
      /implib:rawmnwait003.lib
      /out:rawmnwait003.dll
      rawmnwait003.obj
         Creating library rawmnwait003.lib and object rawmnwait003.exp
      java version "1.3.0rc1"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc1-S)
      Java HotSpot(TM) Client VM (build 1.3.0rc1-S, mixed mode)
      -------------------------- java ---------------------------------
      Setting rawmnwait003_EventHook as event hook.
      ######## JVMDI_EVENT_VM_INIT ########
      Try RawMonitorWait(NULL) for 10240 raw monitors
      Wrong results from RawMonitorWait(rawmnwait003_bad, 100)
              error: JVMDI_ERROR_INTERNAL
      ######## JVMDI_EVENT_VM_DEATH ########
      exit 97
      -------------------------- java_g -------------------------------
      Setting rawmnwait003_EventHook as event hook.
      ######## JVMDI_EVENT_VM_INIT ########
      Try RawMonitorWait(NULL) for 10240 raw monitors
      #
      # HotSpot Virtual Machine Error, assertion failure
      #
      # assert(raw_result == ObjectMonitor::OM_OK, "raw_result == OM_OK")
      #
      # Error ID: C:/hotspot1.3\src\share\vm\prims\jvmdi.cpp, 2219
      #
      exit 1
      -------------------------- java -classic ------------------------
      Setting rawmnwait003_EventHook as event hook.
      ######## JVMDI_EVENT_VM_INIT ########
      Try RawMonitorWait(NULL) for 10240 raw monitors
      Wrong results from RawMonitorWait(rawmnwait003_bad, 100)
              error: JVMDI_ERROR_NOT_MONITOR_OWNER
      ######## JVMDI_EVENT_VM_DEATH ########
      exit 97

      ################################ doit4.ksh #######################
      Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86
      Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

      rawmonexit003.c
      Microsoft (R) Incremental Linker Version 6.00.8168
      Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

      /DEFAULTLIB:ws2_32.lib
      /dll
      /implib:rawmonexit003.lib
      /out:rawmonexit003.dll
      rawmonexit003.obj
         Creating library rawmonexit003.lib and object rawmonexit003.exp
      java version "1.3.0rc1"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc1-S)
      Java HotSpot(TM) Client VM (build 1.3.0rc1-S, mixed mode)
      -------------------------- java ---------------------------------
      Setting rawmonexit003_EventHook as event hook.
      ######## JVMDI_EVENT_VM_INIT ########
      Try RawMonitorExit for 10240 raw monitors
      ######## JVMDI_EVENT_VM_DEATH ########
      exit 95
      -------------------------- java_g -------------------------------
      Setting rawmonexit003_EventHook as event hook.
      ######## JVMDI_EVENT_VM_INIT ########
      Try RawMonitorExit for 10240 raw monitors
      #
      # HotSpot Virtual Machine Error, assertion failure
      #
      # assert(raw_result == ObjectMonitor::OM_OK, "raw_result == OM_OK")
      #
      # Error ID: C:/hotspot1.3\src\share\vm\prims\jvmdi.cpp, 2219
      #
      exit 1
      -------------------------- java -classic ------------------------
      Setting rawmonexit003_EventHook as event hook.
      ######## JVMDI_EVENT_VM_INIT ########
      Try RawMonitorExit for 10240 raw monitors
      ######## JVMDI_EVENT_VM_DEATH ########
      exit 95

      ======================================================================

            dcubed Daniel Daugherty
            ichebykisunw Igor Chebykin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: