During the debugger disconnect we free all ThreadNodes for vthreads. Part of 
doing this includes calling JVMTI SetThreadLocalStorage(thread, NULL). It's 
possible that after the disconnect process has already started the VM starts to 
exit (resulting in a VMDeath event). Once this happens SetThreadLocalStorage 
will start to return JVMTI_ERROR_WRONG_PHASE. We should ignore this error 
rather than having it result in an fatal error for the debug agent.

Tested with tier1, all tier5 svc testing, and ran vmTestbase/nsk/jdi 10 times 
on linux-aarch64-debug, which is the only platform that has seen this failure 
so far.

-------------

Commit messages:
 - allow wrong phase during shutdown

Changes: https://git.openjdk.org/jdk/pull/28653/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28653&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8362083
  Stats: 4 lines in 1 file changed: 4 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/28653.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28653/head:pull/28653

PR: https://git.openjdk.org/jdk/pull/28653

Reply via email to