glowroot: Crash with Java 14 and HikariCP

I have a large application that builds and runs with Java 14 and uses HikariCP for db connection pooling (also uses querydsl and the postgres driver). As soon as it attempts to access the database, it falls over. Here is the stacktrace up to the calling code:

java.lang.VerifyError: Stack map does not match the one at exception handler 171
Exception Details:
  Location:
    com/sun/proxy/$Proxy51.prepareStatement(Ljava/lang/String;II)Ljava/sql/PreparedStatement; @171: iload
  Reason:
    Type 'java/lang/Throwable' (current frame, locals[1]) is not assignable to 'java/lang/String' (stack map, locals[1])
  Current Frame:
    bci: @125
    flags: { }
    locals: { 'com/sun/proxy/$Proxy51', 'java/lang/Throwable', integer, integer, integer, 'org/glowroot/agent/bytecode/api/ThreadContextThreadLocal$Holder', 'org/glowroot/agent/bytecode/api/ThreadContextPlus', integer, 'org/glowroot/agent/plugin/api/Timer', 'java/lang/String' }
    stack: { 'java/lang/Throwable' }
  Stackmap Frame:
    bci: @171
    flags: { }
    locals: { 'com/sun/proxy/$Proxy51', 'java/lang/String', integer, integer, integer, 'org/glowroot/agent/bytecode/api/ThreadContextThreadLocal$Holder', 'org/glowroot/agent/bytecode/api/ThreadContextPlus', integer, 'org/glowroot/agent/plugin/api/Timer', 'java/lang/String' }
    stack: { 'java/lang/Throwable' }
  Bytecode:
    0000000: 0336 0401 3a05 013a 0602 3607 013a 082b
    0000010: 3a09 1905 c700 08b8 0093 3a05 1905 b600
    0000020: 9b59 3a06 c600 1f19 06b9 009e 0100 5936
    0000030: 0712 9f9f 0010 1906 129f b900 a302 0004
    0000040: a700 0403 3604 1504 9900 0a19 06b8 00f1
    0000050: 3a08 2ab4 0058 2ab2 010a 06bd 0070 5903
    0000060: 2b53 5904 1cb8 00bb 5359 051d b800 bb53
    0000070: b900 6004 00c0 00f5 a700 0ebf 4cbb 0067
    0000080: 592b b700 6abf 1504 9900 0959 1909 b800
    0000090: f815 0499 0008 1908 b800 fc15 0702 9f00
    00000a0: 0c19 0615 07b9 00a3 0200 b015 0499 0008
    00000b0: 1908 b800 fc15 0702 9f00 0c19 0615 07b9
    00000c0: 00a3 0200 bf
  Exception Handler Table:
    bci [82, 123] => handler: 123
    bci [82, 123] => handler: 123
    bci [82, 123] => handler: 123
    bci [82, 123] => handler: 124
    bci [82, 134] => handler: 171
  Stackmap Table:
    full_frame(@28,{Object[#2],Object[#124],Integer,Integer,Integer,Object[#149],Object[#151],Integer,Object[#236],Object[#124]},{})
    same_frame(@67)
    same_locals_1_stack_item_frame(@68,Integer)
    same_frame(@82)
    same_locals_1_stack_item_frame(@123,Object[#84])
    same_locals_1_stack_item_frame(@124,Object[#84])
    same_locals_1_stack_item_frame(@134,Object[#245])
    same_locals_1_stack_item_frame(@145,Object[#245])
    same_locals_1_stack_item_frame(@155,Object[#245])
    same_locals_1_stack_item_frame(@170,Object[#245])
    same_locals_1_stack_item_frame(@171,Object[#84])
    same_locals_1_stack_item_frame(@181,Object[#84])
    same_locals_1_stack_item_frame(@196,Object[#84])

	at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3215)
	at java.base/java.lang.Class.getConstructor0(Class.java:3420)
	at java.base/java.lang.Class.getConstructor(Class.java:2165)
	at java.base/java.lang.reflect.Proxy$ProxyBuilder.build(Proxy.java:660)
	at java.base/java.lang.reflect.Proxy.lambda$getProxyConstructor$0(Proxy.java:424)
	at java.base/jdk.internal.loader.AbstractClassLoaderValue$Memoizer.get(AbstractClassLoaderValue.java:329)
	at java.base/jdk.internal.loader.AbstractClassLoaderValue.computeIfAbsent(AbstractClassLoaderValue.java:205)
	at java.base/java.lang.reflect.Proxy.getProxyConstructor(Proxy.java:422)
	at java.base/java.lang.reflect.Proxy.newProxyInstance(Proxy.java:1015)
	at com.zaxxer.hikari.pool.ProxyConnection$ClosedConnection.getClosedConnection(ProxyConnection.java:518)
	at com.zaxxer.hikari.pool.ProxyConnection$ClosedConnection.<clinit>(ProxyConnection.java:493)
	at com.zaxxer.hikari.pool.ProxyConnection.close(ProxyConnection.java:252)

I checked Glowroot, opened it with Intellij, and briefly attempted to try to add a test (thought maybe to agent > integration-tests > org.glowroot.agent.tests.JdbcDriverIT ?) but quickly got put off by the Java 6 and shading requirements that didn’t seem to work right in the IDE. Before our recent conversion from Java 8 → Java 14 we got a lot of value from Glowroot and would love to resume using it. I can provide any other details required to help resolve this.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 2
  • Comments: 24 (9 by maintainers)

Most upvoted comments

May want to check to see if the 0.14.0-beta.2 release fixes this, I had a similar error and its now working using it

I agree. I had a similar problem with jdk 14+ until 0.14.0-beta.1, and it disappeared in 0.14.0-beta.2. I think the fix #859 solved this VerifyError issue, and I can now use Glowroot without error on JDK 17.

May want to check to see if the 0.14.0-beta.2 release fixes this, I had a similar error and its now working using it