1

I have a large legacy webapp that runs on java11/oracle/tomcat 9. We're exploring the feasibility of transitioning to postgres. I'm running locally on my laptop (windows 11 enterprise), intellij+tomcat, postgres on docker. When using intellij to start tomcat WITHOUT connecting the debugger there's no problems. If I start tomcat with the debugger to investigate something, the tomcat jvm intermittently dies (always dies...just dies at different steps each time within 3-5 min of using the app). Basically all I have is knowing it doesn't happen with oracle and this fatal dump:

(this line from redhat 11, other jdk11 versions had '.../eventHelper.c:883'):

FATAL ERROR in native method: JDWP ExceptionOccurred, jvmtiError=AGENT_ERROR_INVALID_EVENT_TYPE(204) JDWP exit error AGENT_ERROR_INVALID_EVENT_TYPE(204): ExceptionOccurred [c:\cygwin64\tmp\ojdkbuild\lookaside\java-11-openjdk\src\jdk.jdwp.agent\share\native\libjdwp\eventHelper.c:883]

VM args for debugger: -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:58021,suspend=y,server=n -Dspring.profiles.active=local -Xms2048m -Xmx8128m -XX:ReservedCodeCacheSize=2048m

I've tried different vendors for open jdk (redhat, amazon, etc), different postgres drivers versions (currently using 42.5.2), different versions of jdk11, different versions of intellij (2022 versions up to 2023.1)...all have it happen. I dont see any kind of hs_err_.log

Any suggestions on where to look or something that would help me get more info?

  • 1
    https://stackoverflow.com/questions/5539923/agent-error-invalid-event-type-when-testing-an-eclipse-plugin *might* help. – tgdavies Apr 21 '23 at 05:47
  • omg...i've read that exact question no less than 15 times _*wishing*_ my solution could be so easy but knowing it couldn't be...we'd never call thread.stop in a webapp and they had an eclipse plugin. but since you took the time to link it, I figured I should double check....yep...that was exactly the problem. They tried postgres 20 yrs ago and the drivers didn't support timeouts...so there was a thread monitoring the timing and after it was done it called .stop() problem solved! thanks so much for poking me to validate one more time! – mello_yello Apr 21 '23 at 12:51

1 Answers1

1

Do not use Thread.stop() and sometimes you need to really validate your assumptions of what is possible in your complicated code base.

Baris Senyerli
  • 642
  • 7
  • 13