JDK-8317351 : SIGSEGV in LShiftLNode::Ideal
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 17
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: x86_64
  • Submitted: 2023-10-02
  • Updated: 2025-07-01
  • Resolved: 2025-07-01
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.
Other
tbdResolved
Related Reports
Duplicate :  
Description
The C2 compiler occasionally crashes on a continuous integration system running Linux x64 compiling com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl::doApplyEvent with the stack looking like this:

Stack: [0x00007f932024d000,0x00007f932034e000],  sp=0x00007f9320349890,  free space=1010k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0xbd5a30]  LShiftLNode::Ideal(PhaseGVN*, bool)+0x2a0
V  [libjvm.so+0xc6ca42]  PhaseIterGVN::transform_old(Node*)+0x92
V  [libjvm.so+0x3e11ee]  ArrayCopyNode::prepare_array_copy(PhaseGVN*, bool, Node*&, Node*&, Node*&, Node*&, BasicType&, Type const*&, bool&)+0x37e
V  [libjvm.so+0x3e2da1]  ArrayCopyNode::Ideal(PhaseGVN*, bool)+0x1c1
V  [libjvm.so+0xc6ca42]  PhaseIterGVN::transform_old(Node*)+0x92
V  [libjvm.so+0xc69108]  PhaseIterGVN::optimize()+0x118
V  [libjvm.so+0x5d7752]  Compile::Optimize()+0x1332
V  [libjvm.so+0x5d8b75]  Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, bool, bool, DirectiveSet*)+0xe65
V  [libjvm.so+0x5179b1]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x191
V  [libjvm.so+0x5e1d8c]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0xd2c
V  [libjvm.so+0x5e2be7]  CompileBroker::compiler_thread_loop()+0x677
V  [libjvm.so+0xe69c20]  JavaThread::thread_main_inner()+0xd0
V  [libjvm.so+0xe6d230]  Thread::call_run()+0xc0
V  [libjvm.so+0xc23351]  thread_native_entry(Thread*)+0xe1

See also attached hs_err files. 
The source code for the compiled method can be found here: https://github.com/JetBrains/intellij-community/blob/836025bc355c8f0f6db6d045deee9d7c565cf933/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/PersistentFSImpl.java#L1899C49-L1899C49
Comments
We have a reproducer for this now (JDK-8361117). Closing as duplicate.
01-07-2025

> Did you get a chance to run with a debug version of the JVM? No, it's too complicated to set up.
23-05-2024

Okay, thanks for the update. Did you get a chance to run with a debug version of the JVM?
23-05-2024

> [~mkartashev] Any more information on this? There are a few crashes likes this with 17, but so far none with 21. There are no replay files.
22-05-2024

[~mkartashev] Any more information on this?
21-05-2024

You could also try to run with a debug build of the JVM to see if we hit any asserts.
04-10-2023

Thanks a lot, Maxim. The last line in the replay file (starting with "compile") lists all the methods that are inlined and at least those classes would be required. Unfortunately, I see some dynamically generated code in there. For example, com/intellij/openapi/vfs/newvfs/persistent/PersistentFSImpl$$Lambda$2230+0x00000008015b3118 <init>. So most likely, replay compilation will not help in this case.
04-10-2023

Acquired a replay file for one of the crashes. Can you suggest a way to collect the minimum necessary class files for the reproducer?
04-10-2023

Resolving as Incomplete until we get more information.
03-10-2023

Okay, thanks for the details. The replay compilation file + class files might be sufficient to reproduce. Let's see.
02-10-2023

> Did you also test with later JDK releases? No, only JDK17-based. It's quite hard to run with another just for testing purposes, especially because it doesn't fail very often, maybe once every few days. > I assume there is no simple reproducer that we could run on our side? You assume correctly. These are tests of IntelliJ IDEA and the VM crashes only after several (5 to 12) minutes of work.
02-10-2023

Thanks! Did you also test with later JDK releases? I assume there is no simple reproducer that we could run on our side?
02-10-2023

Sorry, these were not saved on that CI. Will try to arrange for them to be saved in case of future crashes.
02-10-2023

[~mkartashev] could you please provide the corresponding replay_pid*.log files?
02-10-2023

FWIW, all those methods seem to use IntArrayList (https://fastutil.di.unimi.it/docs/it/unimi/dsi/fastutil/ints/IntArrayList.html) that relies of System.arraycopy().
02-10-2023

Also crashes in the same place while compiling yet another method: com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl::executeDelete (source code: https://github.com/JetBrains/intellij-community/blob/096d6b5142b2446b34b3b9e192ae51ac853645d0/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/PersistentFSImpl.java#L2068)
02-10-2023

Also crashes in the same place while compiling a different method: com.intellij.openapi.vfs.newvfs.persistent.FSRecordsImpl::markAsDeletedRecursively (source code: https://github.com/JetBrains/intellij-community/blob/836025bc355c8f0f6db6d045deee9d7c565cf933/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/FSRecordsImpl.java#L515)
02-10-2023