JDK-8020675 : invalid jar file in the bootclasspath could lead to jvm fatal error
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 7u21
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-05-31
  • Updated: 2015-02-02
  • Resolved: 2013-08-27
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 7 JDK 8 Other
7u80Fixed 8Fixed hs25Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
FULL PRODUCT VERSION :
Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\Users\ernie>java -version
java version  " 1.7.0_21 " 
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) Client VM (build 23.21-b01, mixed mode, sharing)

C:\Users\ernie>

A DESCRIPTION OF THE PROBLEM :
I use PDFill PDF&Image Writer to  " print to PDF "  files.  (Create PDF files from text, browser pages, MS office documents, etc.)  Recently this process fails and I get an error message and the log file below.



ERROR MESSAGES/STACK TRACES THAT OCCUR :
hs_err_pid4736.log :

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (exceptions.cpp:390), pid=4736, tid=2936
#  fatal error: ExceptionMark destructor expects no pending exceptions
#
# JRE version: 7.0_21-b11
# Java VM: Java HotSpot(TM) Client VM (23.21-b01 mixed mode, sharing windows-x86 )
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
#

---------------  T H R E A D  ---------------

Current thread (0x01f6a800):  JavaThread  " main "  [_thread_in_vm, id=2936, stack(0x01eb0000,0x01f00000)]

Stack: [0x01eb0000,0x01f00000],  sp=0x01efe6c4,  free space=313k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [jvm.dll+0x170511]
V  [jvm.dll+0x16a6b6]
V  [jvm.dll+0x16ad7a]
V  [jvm.dll+0x1c564]
V  [jvm.dll+0x1c752]
V  [jvm.dll+0x1c7ca]
V  [jvm.dll+0x1bbf5]
V  [jvm.dll+0x2c8df]
V  [jvm.dll+0x2dcc8]
V  [jvm.dll+0x2e38b]
V  [jvm.dll+0x2e3b6]
V  [jvm.dll+0xd98f6]
C  [java.dll+0x184f]  Java_java_lang_ClassLoader_findBootstrapClass+0x68
j  java.lang.ClassLoader.findBootstrapClass(Ljava/lang/String;)Ljava/lang/Class;+0
j  java.lang.ClassLoader.findBootstrapClassOrNull(Ljava/lang/String;)Ljava/lang/Class;+12
j  java.lang.ClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;+48
j  java.lang.ClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;+38
j  sun.misc.Launcher$AppClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;+36
j  java.lang.ClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class;+3
j  sun.security.jca.ProviderConfig$2.run()Ljava/security/Provider;+50
j  sun.security.jca.ProviderConfig$2.run()Ljava/lang/Object;+1
v  ~StubRoutines::call_stub
V  [jvm.dll+0x12b41a]
V  [jvm.dll+0x1daa0e]
V  [jvm.dll+0x12b49d]
V  [jvm.dll+0xda35a]
C  [java.dll+0x1015]  Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0x15
j  sun.security.jca.ProviderConfig.doLoadProvider()Ljava/security/Provider;+8
j  sun.security.jca.ProviderConfig.getProvider()Ljava/security/Provider;+88
j  sun.security.jca.ProviderList.getProvider(I)Ljava/security/Provider;+6
j  sun.security.jca.ProviderList.getService(Ljava/lang/String;Ljava/lang/String;)Ljava/security/Provider$Service;+13
j  sun.security.jca.GetInstance.getInstance(Ljava/lang/String;Ljava/lang/Class;Ljava/lang/String;)Lsun/security/jca/GetInstance$Instance;+7
j  java.security.Security.getImpl(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/Object;+10
j  java.security.MessageDigest.getInstance(Ljava/lang/String;)Ljava/security/MessageDigest;+7
j  com.lowagie.text.pdf.PdfEncryption.createDocumentId()[B+2
j  com.lowagie.text.pdf.PdfWriter.close()V+322
j  com.lowagie.text.pdf.PdfDocument.close()V+122
j  com.lowagie.text.Document.close()V+39
j  plotsoft_pdf.FillPage.New_PDF()Ljava/lang/String;+270
j  plotsoft_pdf.FillPage.Action()Ljava/lang/String;+2157
j  Main.Class1.main([Ljava/lang/String;)V+618
v  ~StubRoutines::call_stub
V  [jvm.dll+0x12b41a]
V  [jvm.dll+0x1daa0e]
V  [jvm.dll+0x12b49d]
V  [jvm.dll+0xaf3f4]
V  [jvm.dll+0xb9777]
C  [java.exe+0x205f]
C  [java.exe+0xa5a1]
C  [java.exe+0xa62b]
C  [kernel32.dll+0x4d2e9]  BaseThreadInitThunk+0x12
C  [ntdll.dll+0x41603]  RtlInitializeExceptionChain+0x63
C  [ntdll.dll+0x415d6]  RtlInitializeExceptionChain+0x36

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  java.lang.ClassLoader.findBootstrapClass(Ljava/lang/String;)Ljava/lang/Class;+0
j  java.lang.ClassLoader.findBootstrapClassOrNull(Ljava/lang/String;)Ljava/lang/Class;+12
j  java.lang.ClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;+48
j  java.lang.ClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;+38
j  sun.misc.Launcher$AppClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;+36
j  java.lang.ClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class;+3
j  sun.security.jca.ProviderConfig$2.run()Ljava/security/Provider;+50
j  sun.security.jca.ProviderConfig$2.run()Ljava/lang/Object;+1
v  ~StubRoutines::call_stub
j  java.security.AccessController.doPrivileged(Ljava/security/PrivilegedAction;)Ljava/lang/Object;+0
j  sun.security.jca.ProviderConfig.doLoadProvider()Ljava/security/Provider;+8
j  sun.security.jca.ProviderConfig.getProvider()Ljava/security/Provider;+88
j  sun.security.jca.ProviderList.getProvider(I)Ljava/security/Provider;+6
j  sun.security.jca.ProviderList.getService(Ljava/lang/String;Ljava/lang/String;)Ljava/security/Provider$Service;+13
j  sun.security.jca.GetInstance.getInstance(Ljava/lang/String;Ljava/lang/Class;Ljava/lang/String;)Lsun/security/jca/GetInstance$Instance;+7
j  java.security.Security.getImpl(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/Object;+10
j  java.security.MessageDigest.getInstance(Ljava/lang/String;)Ljava/security/MessageDigest;+7
j  com.lowagie.text.pdf.PdfEncryption.createDocumentId()[B+2
j  com.lowagie.text.pdf.PdfWriter.close()V+322
j  com.lowagie.text.pdf.PdfDocument.close()V+122
j  com.lowagie.text.Document.close()V+39
j  plotsoft_pdf.FillPage.New_PDF()Ljava/lang/String;+270
j  plotsoft_pdf.FillPage.Action()Ljava/lang/String;+2157
j  Main.Class1.main([Ljava/lang/String;)V+618
v  ~StubRoutines::call_stub

---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )
  0x026c4400 JavaThread  " Service Thread "  daemon [_thread_blocked, id=4740, stack(0x04af0000,0x04b40000)]
  0x026bec00 JavaThread  " C1 CompilerThread0 "  daemon [_thread_blocked, id=4668, stack(0x00ac0000,0x00b10000)]
  0x026bd800 JavaThread  " Attach Listener "  daemon [_thread_blocked, id=4700, stack(0x01c30000,0x01c80000)]
  0x026ba400 JavaThread  " Signal Dispatcher "  daemon [_thread_blocked, id=4352, stack(0x04980000,0x049d0000)]
  0x026a9c00 JavaThread  " Finalizer "  daemon [_thread_blocked, id=6024, stack(0x01fb0000,0x02000000)]
  0x026a4c00 JavaThread  " Reference Handler "  daemon [_thread_blocked, id=4748, stack(0x00960000,0x009b0000)]
=>0x01f6a800 JavaThread  " main "  [_thread_in_vm, id=2936, stack(0x01eb0000,0x01f00000)]

Other Threads:
  0x026a3400 VMThread [stack: 0x048b0000,0x04900000] [id=3776]
  0x026de800 WatcherThread [stack: 0x04a30000,0x04a80000] [id=4780]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
 def new generation   total 4928K, used 4399K [0x24d60000, 0x252b0000, 0x2a2b0000)
  eden space 4416K,  99% used [0x24d60000, 0x251abf88, 0x251b0000)
  from space 512K,   0% used [0x251b0000, 0x251b0000, 0x25230000)
  to   space 512K,   0% used [0x25230000, 0x25230000, 0x252b0000)
 tenured generation   total 10944K, used 0K [0x2a2b0000, 0x2ad60000, 0x34d60000)
   the space 10944K,   0% used [0x2a2b0000, 0x2a2b0000, 0x2a2b0200, 0x2ad60000)
 compacting perm gen  total 12288K, used 1284K [0x34d60000, 0x35960000, 0x38d60000)
   the space 12288K,  10% used [0x34d60000, 0x34ea13b0, 0x34ea1400, 0x35960000)
    ro space 10240K,  42% used [0x38d60000, 0x391a22a0, 0x391a2400, 0x39760000)
    rw space 12288K,  54% used [0x39760000, 0x39de3250, 0x39de3400, 0x3a360000)

Card table byte_map: [0x04770000,0x04820000] byte_map_base: 0x04649500

Polling page: 0x002e0000

Code Cache  [0x02770000, 0x02820000, 0x04770000)
 total_blobs=237 nmethods=48 adapters=124 free_code_cache=32089Kb largest_free_block=32859392

Compilation events (10 events):
Event: 0.353 Thread 0x026bec00   43             java.util.HashMap::put (124 bytes)
Event: 0.353 Thread 0x026bec00 nmethod 43 0x02815088 code [0x028151d0, 0x028153bc]
Event: 0.370 Thread 0x026bec00   44             java.lang.String::getChars (62 bytes)
Event: 0.370 Thread 0x026bec00 nmethod 44 0x02815988 code [0x02815ac0, 0x02815d50]
Event: 0.382 Thread 0x026bec00   46             java.lang.AbstractStringBuilder::append (48 bytes)
Event: 0.383 Thread 0x026bec00 nmethod 46 0x028178c8 code [0x028179e0, 0x02817b08]
Event: 0.450 Thread 0x026bec00   47             java.util.Properties$LineReader::readLine (452 bytes)
Event: 0.451 Thread 0x026bec00 nmethod 47 0x02817fc8 code [0x02818160, 0x0281895c]
Event: 0.451 Thread 0x026bec00   48             java.util.Properties::loadConvert (505 bytes)
Event: 0.452 Thread 0x026bec00 nmethod 48 0x02819088 code [0x028191d0, 0x028195f8]

GC Heap History (0 events):
No events

Deoptimization events (0 events):
No events

Internal exceptions (10 events):
Event: 0.378 Thread 0x01f6a800 Threw 0x2516c530 at C:\jdk7u2_32P\jdk7u21\hotspot\src\share\vm\prims\jvm.cpp:1166
Event: 0.380 Thread 0x01f6a800 Threw 0x2516fb00 at C:\jdk7u2_32P\jdk7u21\hotspot\src\share\vm\prims\jvm.cpp:1166
Event: 0.381 Thread 0x01f6a800 Threw 0x25174c10 at C:\jdk7u2_32P\jdk7u21\hotspot\src\share\vm\prims\jvm.cpp:1166
Event: 0.381 Thread 0x01f6a800 Threw 0x251773c8 at C:\jdk7u2_32P\jdk7u21\hotspot\src\share\vm\prims\jvm.cpp:1166
Event: 0.382 Thread 0x01f6a800 Threw 0x25179d80 at C:\jdk7u2_32P\jdk7u21\hotspot\src\share\vm\prims\jvm.cpp:1166
Event: 0.385 Thread 0x01f6a800 Threw 0x25180b20 at C:\jdk7u2_32P\jdk7u21\hotspot\src\share\vm\prims\jvm.cpp:1166
Event: 0.386 Thread 0x01f6a800 Threw 0x25183e60 at C:\jdk7u2_32P\jdk7u21\hotspot\src\share\vm\prims\jvm.cpp:1166
Event: 0.424 Thread 0x01f6a800 Threw 0x25186760 at C:\jdk7u2_32P\jdk7u21\hotspot\src\share\vm\prims\jvm.cpp:1166
Event: 0.446 Thread 0x01f6a800 Threw 0x2518b7a0 at C:\jdk7u2_32P\jdk7u21\hotspot\src\share\vm\prims\jvm.cpp:1166
Event: 0.456 Thread 0x01f6a800 Threw 0x251a0048 at C:\jdk7u2_32P\jdk7u21\hotspot\src\share\vm\classfile\classLoader.cpp:508

Events (10 events):
Event: 0.445 loading class 0x3a397598 done
Event: 0.445 loading class 0x3a399050
Event: 0.445 loading class 0x3a399050 done
Event: 0.445 loading class 0x04c10cd8
Event: 0.445 loading class 0x04c10cd8 done
Event: 0.446 loading class 0x04bd5bc0
Event: 0.446 loading class 0x04bd5bc0 done
Event: 0.453 loading class 0x3a4e33d0
Event: 0.453 loading class 0x3a4e33d0 done
Event: 0.453 loading class 0x04c1fd80


Dynamic libraries:
0x00b20000 - 0x00b4f000 C:\Program Files\Java\jre7\bin\java.exe
0x77040000 - 0x77168000 C:\Windows\system32
tdll.dll
0x75bd0000 - 0x75cac000 C:\Windows\system32\kernel32.dll
0x75b00000 - 0x75bc6000 C:\Windows\system32\ADVAPI32.dll
0x76da0000 - 0x76e63000 C:\Windows\system32\RPCRT4.dll
0x758d0000 - 0x7596d000 C:\Windows\system32\USER32.dll
0x77170000 - 0x771bb000 C:\Windows\system32\GDI32.dll
0x74640000 - 0x747de000 C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.6002.18305_none_5cb72f2a088b0ed3\COMCTL32.dll
0x75710000 - 0x757ba000 C:\Windows\system32\msvcrt.dll
0x75d60000 - 0x75db9000 C:\Windows\system32\SHLWAPI.dll
0x75d40000 - 0x75d5e000 C:\Windows\system32\IMM32.DLL
0x75800000 - 0x758c8000 C:\Windows\system32\MSCTF.dll
0x757f0000 - 0x757f9000 C:\Windows\system32\LPK.DLL
0x76bd0000 - 0x76c4d000 C:\Windows\system32\USP10.dll
0x20cc0000 - 0x20d5d000 C:\Program Files\CheckPoint\ZAForceField\Plugins\ISWSHEX.dll
0x70840000 - 0x708db000 C:\Windows\WinSxS\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.6195_none_d09154e044272b9a\MSVCR80.dll
0x74830000 - 0x7485d000 C:\Windows\system32\WINTRUST.dll
0x75040000 - 0x75133000 C:\Windows\system32\CRYPT32.dll
0x751c0000 - 0x751d2000 C:\Windows\system32\MSASN1.dll
0x755b0000 - 0x755ce000 C:\Windows\system32\USERENV.dll
0x75590000 - 0x755a4000 C:\Windows\system32\Secur32.dll
0x75dc0000 - 0x75dea000 C:\Windows\system32\imagehlp.dll
0x707b0000 - 0x70837000 C:\Windows\WinSxS\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.6195_none_d09154e044272b9a\MSVCP80.dll
0x76c50000 - 0x76d95000 C:\Windows\system32\ole32.dll
0x68cd0000 - 0x68d8e000 C:\Program Files\Java\jre7\bin\msvcr100.dll
0x5f580000 - 0x5f8cf000 C:\Program Files\Java\jre7\bin\client\jvm.dll
0x717e0000 - 0x717e7000 C:\Windows\system32\WSOCK32.dll
0x757c0000 - 0x757ed000 C:\Windows\system32\WS2_32.dll
0x75700000 - 0x75706000 C:\Windows\system32\NSI.dll
0x74050000 - 0x74082000 C:\Windows\system32\WINMM.dll
0x771c0000 - 0x7724d000 C:\Windows\system32\OLEAUT32.dll
0x747f0000 - 0x7482e000 C:\Windows\system32\OLEACC.dll
0x75660000 - 0x75667000 C:\Windows\system32\PSAPI.DLL
0x73250000 - 0x7325c000 C:\Program Files\Java\jre7\bin\verify.dll
0x72f10000 - 0x72f30000 C:\Program Files\Java\jre7\bin\java.dll
0x72f30000 - 0x72f43000 C:\Program Files\Java\jre7\bin\zip.dll
0x68b80000 - 0x68cc2000 C:\Program Files\Java\jre7\bin\awt.dll
0x72ef0000 - 0x72f04000 C:\Program Files\Java\jre7\bin
et.dll
0x74d40000 - 0x74d7b000 C:\Windows\system32\mswsock.dll
0x74db0000 - 0x74db5000 C:\Windows\System32\wship6.dll
0x73160000 - 0x7316e000 C:\Program Files\Java\jre7\bin
io.dll
0x6f510000 - 0x6f5ec000 C:\Windows\system32\dbghelp.dll

VM Arguments:
java_command: C:\Program Files\PlotSoft\PDFill\PDFWriter\Driver\PSCRIPT5.jar C:\Users\ernie\AppData\Local\Temp\~Tmp_PDFill_1369987833.tmp
Launcher Type: SUN_STANDARD

Environment Variables:
PATH=C:\Program Files\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\GNU\GnuPG\pub;C:\Program Files\Common Files\Acronis\SnapAPI\;C:\Program Files\Smart Projects\IsoBuster
USERNAME=ernie
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 15 Model 107 Stepping 2, AuthenticAMD



---------------  S Y S T E M  ---------------

OS: Windows Vista Build 6002 Service Pack 2

CPU:total 2 (2 cores per cpu, 1 threads per core) family 15 model 107 stepping 2, cmov, cx8, fxsr, mmx, sse, sse2, sse3, mmxext, 3dnowpref, tsc

Memory: 4k page, physical 2094852k(1028392k free), swap 4431932k(3078100k free)

vm_info: Java HotSpot(TM) Client VM (23.21-b01) for windows-x86 JRE (1.7.0_21-b11), built on Apr  4 2013 04:43:10 by  " java_re "  with unknown MS VC++:1600

time: Fri May 31 01:10:34 2013
elapsed time: 0 seconds



#-----------------------------------------------------------#APPLET URL OR APPLICATION NAME:
http://www.pdfill.com/index.html
Comments
Another form of crash due to invalid JAR files is JDK-8054008
06-11-2014

It is not clear from the above what was determined to be the "correct" behaviour when encountering an invalid jar file on the bootclasspath. Should it be ignored or is the expectation that an exception will be thrown? As discussed in 8026877 any exception from the bootloader regarding the invalid jar is interpreted as being a simple "couldn't find the class" indicator in the application classloader. Consequently there are only some select circumstances where an invalid jar will cause a visible error to the user.
22-10-2013

In 7u25 b15, the error was thrown at a very early stage within the init_globals() called from create_vm(). Below is the call stack: jvm.dll!ClassLoader::create_class_path_entry(char * path, stat st, ClassPathEntry * * new_entry, bool lazy) Line 508 C++ jvm.dll!LazyClassPathEntry::resolve_entry() Line 303 + 0x24 bytes C++ jvm.dll!LazyClassPathEntry::open_stream(const char * name) Line 322 + 0x8 bytes C++ jvm.dll!ClassLoader::load_classfile(Symbol * h_name, Thread * __the_thread__) Line 898 + 0x17 bytes C++ jvm.dll!SystemDictionary::load_instance_class(Symbol * class_name, Handle class_loader, Thread * __the_thread__) Line 1362 + 0x14 bytes C++ jvm.dll!SystemDictionary::resolve_instance_class_or_null(Symbol * name, Handle class_loader, Handle protection_domain, Thread * __the_thread__) Line 758 + 0x18 bytes C++ jvm.dll!SystemDictionary::resolve_or_null(Symbol * class_name, Handle class_loader, Handle protection_domain, Thread * __the_thread__) Line 206 + 0x15 bytes C++ jvm.dll!SystemDictionary::resolve_or_null(Symbol * class_name, Thread * __the_thread__) Line 211 + 0x23 bytes C++ jvm.dll!SystemDictionary::initialize_wk_klass(SystemDictionary::WKID id, int init_opt, Thread * __the_thread__) Line 1935 + 0xd bytes C++ jvm.dll!SystemDictionary::initialize_wk_klasses_until(SystemDictionary::WKID limit_id, SystemDictionary::WKID & start_id, Thread * __the_thread__) Line 1949 + 0x11 bytes C++ jvm.dll!SystemDictionary::initialize_preloaded_classes(Thread * __the_thread__) Line 2011 + 0xf bytes C++ jvm.dll!SystemDictionary::initialize(Thread * __the_thread__) Line 1904 + 0x9 bytes C++ jvm.dll!Universe::genesis(Thread * __the_thread__) Line 353 + 0x9 bytes C++ jvm.dll!universe2_init() Line 1009 + 0x9 bytes C++ > jvm.dll!init_globals() Line 114 C++ jvm.dll!Threads::create_vm(JavaVMInitArgs * args, bool * canTryAgain) Line 3220 + 0x5 bytes C++ jvm.dll!JNI_CreateJavaVM(JavaVM_ * * vm, void * * penv, void * args) Line 5133 + 0xd bytes C++ java.exe!011013bd() [Frames below may be incorrect and/or missing, no symbols loaded for java.exe] java.exe!01101e2f() java.exe!0110c807() java.exe!0110a5a1() java.exe!0110c845() java.exe!0110a62b() kernel32.dll!767633aa() ntdll.dll!77739ef2() ntdll.dll!77739ec5() The error was thrown in the method below: bool Exceptions::special_exception(Thread* thread, const char* file, int line, Symbol* h_name, const char* message) { // bootstrapping check if (!Universe::is_fully_initialized()) { if (h_name == NULL) { // atleast an informative message. vm_exit_during_initialization("Exception", message); } else { vm_exit_during_initialization(h_name, message); <=====here } ShouldNotReachHere(); } } Note that it happened in the early stage during create_vm(), so the (!Universe::is_fully_initialized()) was true. The class it was trying to load was sun/misc/AtomicLongCSImpl which I couldn't find in 7u25. It was going through all the jar files in the bootclasspath and finally got to the foo.jar which has 0-byte and got "error in opening jar file" and then THROW_MSG(). So I think it's just a coincident in 7u25 where the correct error was thrown. In hs25, it didn't try to load the sun/misc/AtomicLongCSImpl class and thus it didn't hit the "error in opening jar file" (for the foo.jar) early until it passed the point when the vm is considered "initialized" - is_init_completed() is true. So when THROW_MSG() was called when it tried to load the class specified by the test case ("xxx"), it triggered the fatal error in ~ExceptionMark(). Call stack up to the THROWN_MSG() as follows: jvm.dll!ClassLoader::create_class_path_entry(char * path, stat st, ClassPathEntry * * new_entry, bool lazy) Line 508 C++ jvm.dll!LazyClassPathEntry::resolve_entry() Line 303 + 0x24 bytes C++ > jvm.dll!LazyClassPathEntry::open_stream(const char * name) Line 322 + 0x8 bytes C++ jvm.dll!ClassLoader::load_classfile(Symbol * h_name, Thread * __the_thread__) Line 900 + 0x17 bytes C++ jvm.dll!SystemDictionary::load_instance_class(Symbol * class_name, Handle class_loader, Thread * __the_thread__) Line 1301 + 0x14 bytes C++ jvm.dll!SystemDictionary::resolve_instance_class_or_null(Symbol * name, Handle class_loader, Handle protection_domain, Thread * __the_thread__) Line 779 + 0x18 bytes C++ jvm.dll!SystemDictionary::resolve_or_null(Symbol * class_name, Handle class_loader, Handle protection_domain, Thread * __the_thread__) Line 232 + 0x15 bytes C++ jvm.dll!SystemDictionary::resolve_or_null(Symbol * class_name, Thread * __the_thread__) Line 237 + 0x23 bytes C++ jvm.dll!JVM_FindClassFromBootLoader(JNIEnv_ * env, const char * name) Line 773 + 0x12 bytes C++ java.dll!69461e8c() [Frames below may be incorrect and/or missing, no symbols loaded for java.dll] jvm.dll!GrowableArray<Metadata *>::append(Metadata * const & elem) Line 207 C++ jvm.dll!os::write_memory_serialize_page(JavaThread * thread) Line 375 + 0x11 bytes C++ jvm.dll!InterfaceSupport::serialize_memory(JavaThread * thread) Line 40 + 0x9 bytes C++
19-08-2013

I could reproduce similar crash with the following simple java program. The pre-condition is to have a 0-byte jce.jar in the {jdk_home}/jre/lib directory. import javax.crypto.*; public class TestForName { public static void main(String[] args) { try { Class cls = Class.forName("javax.crypto.KeyGenerator"); System.out.println("Class = " + cls.getName()); } catch (ClassNotFoundException cnfe) { cnfe.printStackTrace(); } } } After modifying the code in question with the following: Thread* THREAD = thread; THROW_MSG(vmSymbols::java_lang_ClassNotFoundException(), msg); (Note that THREAD is required for THROW_MSG and thread is defined at the beginning of the function as JavaThread* thread = JavaThread::current();) another assert was triggered: # Internal Error (..\..\src\share\vm\classfile\classLoader.cpp:304), pid=12252, tid=10084 # assert(new_entry != NULL) failed: earlier code should have caught this The above assert is in LazyClassPathEntry::resolve_entry() after the following: ClassLoader::create_class_path_entry(_path, _st, &new_entry, false);
06-08-2013

That looks completely broken. As we are seeing this will force the VM to abort. Looks to me that the EXCEPTION_MARK should simply not be there.
01-08-2013

BTW, why are we doing this? EXCEPTION_MARK; THROW_MSG(vmSymbols::java_lang_ClassNotFoundException(), msg); This seems to be a convoluted way to abruptedly exit the VM: // Use an EXCEPTION_MARK for 'local' exceptions. EXCEPTION_MARK makes sure that no // pending exception exists upon entering its scope and tests that no pending exception // exists when leaving the scope.
01-08-2013

The fatal error happens inside here: ExceptionMark::~ExceptionMark() { if (_thread->has_pending_exception()) { Handle exception(_thread, _thread->pending_exception()); _thread->clear_pending_exception(); // Needed to avoid infinite recursion if (is_init_completed()) { exception->print(); fatal("ExceptionMark destructor expects no pending exceptions"); <<<<<<<<<<<<<HERE } else { vm_exit_during_initialization(exception); } } } This is triggered by the following code: void ClassLoader::create_class_path_entry(char *path, struct stat st, ClassPathEntry **new_entry, bool lazy) { ... { // enable call to C land ThreadToNativeFromVM ttn(thread); HandleMark hm(thread); zip = (*ZipOpen)(canonical_path, &error_msg); } if (zip != NULL && error_msg == NULL) { ... } else { ResourceMark rm(thread); char *msg; if (error_msg == NULL) { msg = NEW_RESOURCE_ARRAY(char, strlen(path) + 128); ; jio_snprintf(msg, strlen(path) + 127, "error in opening JAR file %s", path); } else { int len = (int)(strlen(path) + strlen(error_msg) + 128); msg = NEW_RESOURCE_ARRAY(char, len); ; jio_snprintf(msg, len - 1, "error in opening JAR file <%s> %s", error_msg, path); } EXCEPTION_MARK; THROW_MSG(vmSymbols::java_lang_ClassNotFoundException(), msg); /* <<<<<< ~ExceptionMark() called here */ } } From the Java call stack, it seems like sun.security.jca.ProviderConfig (which is inside rt.jar) is trying to load a class which is in one of the other bootstrap JAR files (probably jre/lib/jce.jar??). I would suggest making jce.jar (or other bootstrap JAR an invalid ZIP file) and see if we can reproduce this. Instead of using the PDFill tool, maybe it would be easier to use a stand-alone JCE example. If this is indeed the cause, maybe we can at least make the error more obvious. Like a message "your jce.jar is corrupt". Luckily, this kind of crash only happens with boot classes. For all other class loaders, invalid JAR files would be discovered by Java code.
01-08-2013

The WriteSave.exe process starts a java.exe process for saving a file. Steps as follows: 1) use Adobe Reader to open a pdf file 2) print the pdf file - select "PDFill writer" as the printer 3) the WriteSave.exe process (located at C:\Program Files (x86)\PlotSoft\PDFill) will be started. I used the Process Monitor tool to monitor WriteSave.exe, below is the command line for the java process: 10:57:28.8141955 AM WriterSave.exe 8072 Process Create C:\Program Files (x86)\Java\jre7\bin\java.exe SUCCESS PID: 7308, Command line: "C:\Program Files (x86)\Java\jre7\bin\java.exe" -jar "C:\Program Files (x86)\PlotSoft\PDFill\PDFWriter\Driver\PSCRIPT5.jar" GETVERSION The java process loads the following dll's: jpishare.dll java.dll Note that jpishare.dll is for the old java plugin which will be removed in jdk8. I didn't see jvm.dll loaded and there was no crash as I could print the file into another pdf file. JRE 7u40 b34 32-bit on win7 was used for testing.
31-07-2013

It might invoke a separate JVM process when you try to save the modified PDF file. You can try to see if the file C:\Program Files\PlotSoft\PDFill\PDFWriter\Driver\PSCRIPT5.jar exists. If so, rename it, and see if the PDF saving process fails.
24-07-2013