JDK-6391258 : pure virtual method called
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 6
  • Priority: P1
  • Status: Closed
  • Resolution: Fixed
  • OS: linux_suse_sles_8.2
  • CPU: x86
  • Submitted: 2006-02-27
  • Updated: 2012-10-08
  • Resolved: 2006-04-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b77Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
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.

Comments
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?
10-04-2006

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.
25-03-2006

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.
02-03-2006