JDK-8343619 : Crash similar to JDK-8332506
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 21
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2024-10-31
  • Updated: 2024-11-12
Related Reports
Relates :  
Description
A DESCRIPTION OF THE PROBLEM :
We had an Apache Solr instance start crashing with this same issue after upgrading to JDK 21. It appears that  explicit monitor deflation leads to the in_use_list_ceiling being erroneously bumped, eventually leading to wrap around a divide by zero:

[2024-10-30T16:38:33.163+0000][info][monitorinflation] Async deflation needed: explicit request
[2024-10-30T16:38:33.163+0000][info][monitorinflation] begin deflating: in_use_list stats: ceiling=17587870461276979200, count=19, max=1188
[2024-10-30T16:38:33.163+0000][info][monitorinflation] before handshaking: unlinked_count=1, in_use_list stats: ceiling=17587870461276979200, count=18, max=1188
[2024-10-30T16:38:33.163+0000][info][monitorinflation] after handshaking: in_use_list stats: ceiling=17587870461276979200, count=19, max=1188
[2024-10-30T16:38:33.163+0000][info][monitorinflation] deflated_count=1, {unlinked,deleted}_count=1 monitors in 0.0000050 secs
[2024-10-30T16:38:33.163+0000][info][monitorinflation] end deflating: in_use_list stats: ceiling=17587870461276979200, count=19, max=1188
[2024-10-30T16:38:33.406+0000][info][monitorinflation] Async deflation needed: explicit request
[2024-10-30T16:38:33.407+0000][info][monitorinflation] begin deflating: in_use_list stats: ceiling=17587870461276979200, count=19, max=1188
[2024-10-30T16:38:33.407+0000][info][monitorinflation] before handshaking: unlinked_count=1, in_use_list stats: ceiling=17587870461276979200, count=18, max=1188
[2024-10-30T16:38:33.407+0000][info][monitorinflation] after handshaking: in_use_list stats: ceiling=17587870461276979200, count=19, max=1188
[2024-10-30T16:38:33.407+0000][info][monitorinflation] deflated_count=1, {unlinked,deleted}_count=1 monitors in 0.0000051 secs
[2024-10-30T16:38:33.407+0000][info][monitorinflation] end deflating: in_use_list stats: ceiling=17587870461276979200, count=19, max=1188
[2024-10-30T16:39:33.423+0000][info][monitorinflation] Async deflation needed: guaranteed interval (60000 ms) is greater than time since last deflation (60015 ms)
[2024-10-30T16:39:33.423+0000][info][monitorinflation] begin deflating: in_use_list stats: ceiling=17587870461276979200, count=19, max=1188
[2024-10-30T16:39:33.423+0000][info][monitorinflation] end deflating: in_use_list stats: ceiling=17587870461276979200, count=19, max=1188
[2024-10-30T16:39:34.034+0000][info][monitorinflation] Async deflation needed: explicit request
[2024-10-30T16:39:34.034+0000][info][monitorinflation] begin deflating: in_use_list stats: ceiling=17587870461276980224, count=138, max=1188
[2024-10-30T16:39:34.034+0000][info][monitorinflation] before handshaking: unlinked_count=119, in_use_list stats: ceiling=17587870461276980224, count=19, max=1188
[2024-10-30T16:39:34.034+0000][info][monitorinflation] after handshaking: in_use_list stats: ceiling=17587870461276980224, count=19, max=1188
[2024-10-30T16:39:34.034+0000][info][monitorinflation] deflated_count=119, {unlinked,deleted}_count=119 monitors in 0.0000427 secs
[2024-10-30T16:39:34.034+0000][info][monitorinflation] end deflating: in_use_list stats: ceiling=17587870461276980224, count=19, max=1188
[2024-10-30T16:39:34.317+0000][info][monitorinflation] Async deflation needed: explicit request
[2024-10-30T16:39:34.317+0000][info][monitorinflation] begin deflating: in_use_list stats: ceiling=17587870461276980224, count=19, max=1188
[2024-10-30T16:39:34.317+0000][info][monitorinflation] before handshaking: unlinked_count=1, in_use_list stats: ceiling=17587870461276980224, count=18, max=1188
[2024-10-30T16:39:34.317+0000][info][monitorinflation] after handshaking: in_use_list stats: ceiling=17587870461276980224, count=19, max=1188
[2024-10-30T16:39:34.317+0000][info][monitorinflation] deflated_count=1, {unlinked,deleted}_count=1 monitors in 0.0000047 secs
[2024-10-30T16:39:34.317+0000][info][monitorinflation] end deflating: in_use_list stats: ceiling=17587870461276980224, count=19, max=1188
[2024-10-30T16:40:33.242+0000][info][monitorinflation] Async deflation needed: explicit request
[2024-10-30T16:40:33.242+0000][info][monitorinflation] begin deflating: in_use_list stats: ceiling=17587870461276980224, count=19, max=1188
[2024-10-30T16:40:33.242+0000][info][monitorinflation] end deflating: in_use_list stats: ceiling=17587870461276980224, count=19, max=1188
[2024-10-30T16:40:33.489+0000][info][monitorinflation] Async deflation needed: explicit request
[2024-10-30T16:40:33.490+0000][info][monitorinflation] begin deflating: in_use_list stats: ceiling=17587870461276980224, count=19, max=1188
[2024-10-30T16:40:33.490+0000][info][monitorinflation] end deflating: in_use_list stats: ceiling=17587870461276980224, count=19, max=1188
[2024-10-30T16:41:33.169+0000][info][monitorinflation] Async deflation needed: explicit request
[2024-10-30T16:41:33.169+0000][info][monitorinflation] begin deflating: in_use_list stats: ceiling=17587870461276979200, count=19, max=1188
[2024-10-30T16:41:33.169+0000][info][monitorinflation] end deflating: in_use_list stats: ceiling=17587870461276979200, count=19, max=1188
[2024-10-30T16:41:33.415+0000][info][monitorinflation] Async deflation needed: explicit request
[2024-10-30T16:41:33.415+0000][info][monitorinflation] begin deflating: in_use_list stats: ceiling=17587870461276979200, count=19, max=1188
[2024-10-30T16:41:33.415+0000][info][monitorinflation] end deflating: in_use_list stats: ceiling=17587870461276979200, count=19, max=1188
[2024-10-30T16:41:33.915+0000][info][monitorinflation] Too many deflations without progress; bumping in_use_list_ceiling from 17587870461276979200 to 0

Thread dumps cause this due to the explicit deflation request here:

https://github.com/openjdk/jdk/blob/688e92e7f5febddd2935cb7f500dd3f10fbd9401/src/hotspot/share/runtime/vmOperations.cpp#L402-L410



Comments
Submitter replied to the initial questions: - hs_err_pid log file was attached: Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0xe8cca1] ObjectSynchronizer::is_async_deflation_needed()+0x1e1 V [libjvm.so+0xc0e118] MonitorDeflationThread::monitor_deflation_thread_entry(JavaThread*, JavaThread*)+0xc8 V [libjvm.so+0x91c150] JavaThread::thread_main_inner()+0x1e0 V [libjvm.so+0xedd6f8] Thread::call_run()+0xa8 V [libjvm.so+0xc67c0a] thread_native_entry(Thread*)+0xda C [libc.so.6+0x98b07] This is crashing when using Apache Solr, not when using the test case provided in the original webbug. -any JVM version where this system isn't crashing? This began when upgrading from JDK 17.0.11 to 21.0.4 -have you tested in the latest version of JDK 23? No, we couldn't see any change at https://github.com/openjdk/jdk/commits/20f3aaff4470745ff082bc562f4e4e72044090b2/src/hotspot/share/runtime/synchronizer.cpp that would address this. This makes sense due to the original issue (JDK-8332506) hasn't been fixed yet.
05-11-2024