• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P1 P1
    • 6
    • 6
    • hotspot
    • None
    • b77
    • x86
    • linux_suse_sles_8.2

      run most recent mustang fastdebug on SuSe Linux 8 or 9:
      java -XX:+PrintMallocFree -version will result in:
      Heap malloc 0x000000004010f4b8 64 C_Heap: ResourceOBJ
      Warning: Cannot open log file: hotspot.log
      Warning: Forcing option -XX:LogFile=/tmp//hs_pid21738.log
      Heap free 0x000000004010f4b8
      Heap malloc 0x000000004010f4b8 64 C_Heap: ResourceOBJ
      Heap malloc 0x000000004010f788 168 C_Heap: ResourceOBJ
      Heap malloc 0x000000004010f868 100 char in /BUILD_AREA/jdk6.0/hotspot/src/share/vm/utilities/xmlstream.cpp
      Heap malloc 0x000000004010f468 18 add_property
      VM option '+PrintMallocFree'
      Heap malloc 0x000000004010f908 13 add_property
      Heap free 0x000000004010f468
      Heap free 0x000000004010f908
      Heap malloc 0x000000004010f468 22 add_property
      Heap malloc 0x000000004010f908 6 add_property
      Heap free 0x000000004010f468
      Heap free 0x000000004010f908
      Heap malloc 0x000000004010f908 88 CHeapObj-new
      Heap malloc 0x000000004010f998 128 CHeapObj-new
      Heap malloc 0x0000000040110558 128000 Event in /BUILD_AREA/jdk6.0/hotspot/src/share/vm/utilities/events.cpp
      ......
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-beta2-fastdebug-b72)
      Java HotSpot(TM) 64-Bit Server VM (build 1.6.0-beta2-fastdebug-b72-debug, mixed mode)
      ......
      pure virtual method called
      Aborted

      If PrintMallocFree not on, it goes smoothly.
      See more details on comments.

          [JDK-6391258] pure virtual method called

          BT2:EVALUATION

          Please re-test, appears another putback caused this to fail in b77.. Please
          retest with b79. I would hope its addressed in this build.. Tony, can you let us know when the assert issue will be fixed?

          Gary Collins (Inactive) added a comment - BT2:EVALUATION Please re-test, appears another putback caused this to fail in b77.. Please retest with b79. I would hope its addressed in this build.. Tony, can you let us know when the assert issue will be fixed?

          BT2:EVALUATION

          We used tty, via global variable, in operator delete, after its destructor was called, to print out allocation. This way of using objects is wrong, and lead to mentioned behavior.

          Nikolay Igotti (Inactive) added a comment - BT2:EVALUATION We used tty, via global variable, in operator delete, after its destructor was called, to print out allocation. This way of using objects is wrong, and lead to mentioned behavior.

          BT2:EVALUATION

          Pure virtual method is called becuase tty instance is deleted BEFORE
          delete defaultStream::instance; is called from ostream.cc:598
          Destructor calls FREE_C_HEAP_ARRAY (xmlstream.cpp:37) that calls FreeHeap (allocation.inline.hpp:38) that contains code
            #ifdef ASSERT
            if (PrintMallocFree) trace_heap_free(p);
            #endif
          And allocation.cpp:58 contains
          void trace_heap_free(void* p) {
            // A lock is not needed here - tty uses a lock internally
            tty->print_cr("Heap free " INTPTR_FORMAT, p);
          }

          What I do not understand yet is why do we get this VM crash only on Opteron/SuSe machins and not on other linux machines?

          A dummy solution is to remove
          delete defaultStream::instance; from ostream.cc:598
          I tried and it works.

          Ivan Krylov (Inactive) added a comment - BT2:EVALUATION Pure virtual method is called becuase tty instance is deleted BEFORE delete defaultStream::instance; is called from ostream.cc:598 Destructor calls FREE_C_HEAP_ARRAY (xmlstream.cpp:37) that calls FreeHeap (allocation.inline.hpp:38) that contains code   #ifdef ASSERT   if (PrintMallocFree) trace_heap_free(p);   #endif And allocation.cpp:58 contains void trace_heap_free(void* p) {   // A lock is not needed here - tty uses a lock internally   tty->print_cr("Heap free " INTPTR_FORMAT, p); } What I do not understand yet is why do we get this VM crash only on Opteron/SuSe machins and not on other linux machines? A dummy solution is to remove delete defaultStream::instance; from ostream.cc:598 I tried and it works.

            nigottiorcl Nikolay Igotti (Inactive)
            minqi Yumin Qi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: