Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite loop in InvocationExprent.lambda$isMappingInBounds$18 #356

Open
Geolykt opened this issue Apr 5, 2024 · 0 comments
Open

Infinite loop in InvocationExprent.lambda$isMappingInBounds$18 #356

Geolykt opened this issue Apr 5, 2024 · 0 comments
Labels
Priority: Medium Medium priority Subsystem: Writing Anything concerning how expressions are written Type: Bug Something isn't working

Comments

@Geolykt
Copy link
Contributor

Geolykt commented Apr 5, 2024

Vineflower version

1.10.0

Describe the bug

While decompiling the gdx jar version 1.9.11 (https://repo1.maven.org/maven2/com/badlogicgames/gdx/gdx/1.9.11/gdx-1.9.11.jar), Vineflower will deadlock itself. When using --thread-count=1 the log suggest that the decompiler hangs while processing com/badlogic/gdx/utils/OrderedMap.

Additional information

Relevant jstack trace:

2024-04-05 15:12:14
Full thread dump OpenJDK 64-Bit Server VM (17.0.10+7 mixed mode, sharing):

Threads class SMR info:
_java_thread_list=0x00007f279480d880, length=16, elements={
0x00007f287c025a40, 0x00007f287c131070, 0x00007f287c132460, 0x00007f287c1379b0,
0x00007f287c138d70, 0x00007f287c13a190, 0x00007f287c13bb50, 0x00007f287c13d090,
0x00007f287c146500, 0x00007f287c14e450, 0x00007f287c151110, 0x00007f287c3950f0,
0x00007f287c395dc0, 0x00007f287c396dd0, 0x00007f287c397dd0, 0x00007f27cc000ff0
}

"main" #1 prio=5 os_prio=0 cpu=931.81ms elapsed=235.58s tid=0x00007f287c025a40 nid=0x7a20 waiting on condition  [0x00007f288291d000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park([email protected]/Native Method)
	- parking to wait for  <0x0000000680c00000> (a java.util.concurrent.FutureTask)
	at java.util.concurrent.locks.LockSupport.park([email protected]/LockSupport.java:211)
	at java.util.concurrent.FutureTask.awaitDone([email protected]/FutureTask.java:447)
	at java.util.concurrent.FutureTask.get([email protected]/FutureTask.java:190)
	at org.jetbrains.java.decompiler.struct.ContextUnit.waitForAll(ContextUnit.java:226)
	at org.jetbrains.java.decompiler.struct.ContextUnit.save(ContextUnit.java:194)
	at org.jetbrains.java.decompiler.struct.StructContext.saveContext(StructContext.java:178)
	at org.jetbrains.java.decompiler.main.Fernflower.decompileContext(Fernflower.java:149)
	at org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler.decompileContext(ConsoleDecompiler.java:246)
	at org.jetbrains.java.decompiler.main.decompiler.ConsoleDecompiler.main(ConsoleDecompiler.java:191)

"Reference Handler" #2 daemon prio=10 os_prio=0 cpu=1.14ms elapsed=235.54s tid=0x00007f287c131070 nid=0x7a27 waiting on condition  [0x00007f2855026000]
   java.lang.Thread.State: RUNNABLE
	at java.lang.ref.Reference.waitForReferencePendingList([email protected]/Native Method)
	at java.lang.ref.Reference.processPendingReferences([email protected]/Reference.java:253)
	at java.lang.ref.Reference$ReferenceHandler.run([email protected]/Reference.java:215)

"Finalizer" #3 daemon prio=8 os_prio=0 cpu=0.18ms elapsed=235.54s tid=0x00007f287c132460 nid=0x7a28 in Object.wait()  [0x00007f2854f26000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait([email protected]/Native Method)
	- waiting on <0x000000062b000af8> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove([email protected]/ReferenceQueue.java:155)
	- locked <0x000000062b000af8> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove([email protected]/ReferenceQueue.java:176)
	at java.lang.ref.Finalizer$FinalizerThread.run([email protected]/Finalizer.java:172)

"Signal Dispatcher" #4 daemon prio=9 os_prio=0 cpu=0.26ms elapsed=235.54s tid=0x00007f287c1379b0 nid=0x7a29 waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Service Thread" #5 daemon prio=9 os_prio=0 cpu=0.21ms elapsed=235.54s tid=0x00007f287c138d70 nid=0x7a2a runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Monitor Deflation Thread" #6 daemon prio=9 os_prio=0 cpu=11.58ms elapsed=235.54s tid=0x00007f287c13a190 nid=0x7a2b runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" #7 daemon prio=9 os_prio=0 cpu=13892.67ms elapsed=235.54s tid=0x00007f287c13bb50 nid=0x7a2c waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   No compile task

"C1 CompilerThread0" #9 daemon prio=9 os_prio=0 cpu=2702.94ms elapsed=235.54s tid=0x00007f287c13d090 nid=0x7a2d waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE
   No compile task

"Sweeper thread" #10 daemon prio=9 os_prio=0 cpu=83.53ms elapsed=235.54s tid=0x00007f287c146500 nid=0x7a2e runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Notification Thread" #11 daemon prio=9 os_prio=0 cpu=0.08ms elapsed=235.53s tid=0x00007f287c14e450 nid=0x7a2f runnable  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Common-Cleaner" #12 daemon prio=8 os_prio=0 cpu=1.30ms elapsed=235.53s tid=0x00007f287c151110 nid=0x7a31 in Object.wait()  [0x00007f2854625000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
	at java.lang.Object.wait([email protected]/Native Method)
	- waiting on <0x000000062b000d50> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove([email protected]/ReferenceQueue.java:155)
	- locked <0x000000062b000d50> (a java.lang.ref.ReferenceQueue$Lock)
	at jdk.internal.ref.CleanerImpl.run([email protected]/CleanerImpl.java:140)
	at java.lang.Thread.run([email protected]/Thread.java:840)
	at jdk.internal.misc.InnocuousThread.run([email protected]/InnocuousThread.java:162)

"pool-1-thread-1" #13 prio=5 os_prio=0 cpu=8171.04ms elapsed=234.51s tid=0x00007f287c3950f0 nid=0x7a3c waiting on condition  [0x00007f284dffe000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park([email protected]/Native Method)
	- parking to wait for  <0x000000062daa3900> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park([email protected]/LockSupport.java:341)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode.block([email protected]/AbstractQueuedSynchronizer.java:506)
	at java.util.concurrent.ForkJoinPool.unmanagedBlock([email protected]/ForkJoinPool.java:3465)
	at java.util.concurrent.ForkJoinPool.managedBlock([email protected]/ForkJoinPool.java:3436)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await([email protected]/AbstractQueuedSynchronizer.java:1623)
	at java.util.concurrent.LinkedBlockingQueue.take([email protected]/LinkedBlockingQueue.java:435)
	at java.util.concurrent.ThreadPoolExecutor.getTask([email protected]/ThreadPoolExecutor.java:1062)
	at java.util.concurrent.ThreadPoolExecutor.runWorker([email protected]/ThreadPoolExecutor.java:1122)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run([email protected]/ThreadPoolExecutor.java:635)
	at java.lang.Thread.run([email protected]/Thread.java:840)

"pool-1-thread-2" #14 prio=5 os_prio=0 cpu=8907.92ms elapsed=234.51s tid=0x00007f287c395dc0 nid=0x7a3d waiting on condition  [0x00007f284defe000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park([email protected]/Native Method)
	- parking to wait for  <0x000000062daa3900> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park([email protected]/LockSupport.java:341)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode.block([email protected]/AbstractQueuedSynchronizer.java:506)
	at java.util.concurrent.ForkJoinPool.unmanagedBlock([email protected]/ForkJoinPool.java:3465)
	at java.util.concurrent.ForkJoinPool.managedBlock([email protected]/ForkJoinPool.java:3436)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await([email protected]/AbstractQueuedSynchronizer.java:1623)
	at java.util.concurrent.LinkedBlockingQueue.take([email protected]/LinkedBlockingQueue.java:435)
	at java.util.concurrent.ThreadPoolExecutor.getTask([email protected]/ThreadPoolExecutor.java:1062)
	at java.util.concurrent.ThreadPoolExecutor.runWorker([email protected]/ThreadPoolExecutor.java:1122)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run([email protected]/ThreadPoolExecutor.java:635)
	at java.lang.Thread.run([email protected]/Thread.java:840)

"pool-1-thread-3" #15 prio=5 os_prio=0 cpu=10575.34ms elapsed=234.51s tid=0x00007f287c396dd0 nid=0x7a3e waiting on condition  [0x00007f284ddfe000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park([email protected]/Native Method)
	- parking to wait for  <0x000000062daa3900> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park([email protected]/LockSupport.java:341)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode.block([email protected]/AbstractQueuedSynchronizer.java:506)
	at java.util.concurrent.ForkJoinPool.unmanagedBlock([email protected]/ForkJoinPool.java:3465)
	at java.util.concurrent.ForkJoinPool.managedBlock([email protected]/ForkJoinPool.java:3436)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await([email protected]/AbstractQueuedSynchronizer.java:1623)
	at java.util.concurrent.LinkedBlockingQueue.take([email protected]/LinkedBlockingQueue.java:435)
	at java.util.concurrent.ThreadPoolExecutor.getTask([email protected]/ThreadPoolExecutor.java:1062)
	at java.util.concurrent.ThreadPoolExecutor.runWorker([email protected]/ThreadPoolExecutor.java:1122)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run([email protected]/ThreadPoolExecutor.java:635)
	at java.lang.Thread.run([email protected]/Thread.java:840)

"pool-1-thread-4" #16 prio=5 os_prio=0 cpu=223731.22ms elapsed=234.50s tid=0x00007f287c397dd0 nid=0x7a3f runnable  [0x00007f284dcfb000]
   java.lang.Thread.State: RUNNABLE
	at org.jetbrains.java.decompiler.modules.decompiler.exps.InvocationExprent.lambda$isMappingInBounds$18(InvocationExprent.java:1574)
	at org.jetbrains.java.decompiler.modules.decompiler.exps.InvocationExprent$$Lambda$298/0x00007f27f80d8f58.apply(Unknown Source)
	at org.jetbrains.java.decompiler.modules.decompiler.exps.InvocationExprent.lambda$isMappingInBounds$19(InvocationExprent.java:1643)
	at org.jetbrains.java.decompiler.modules.decompiler.exps.InvocationExprent$$Lambda$304/0x00007f27f80d9ce0.test(Unknown Source)
	at java.util.stream.MatchOps$1MatchSink.accept([email protected]/MatchOps.java:90)
	at java.util.ArrayList$ArrayListSpliterator.tryAdvance([email protected]/ArrayList.java:1602)
	at java.util.stream.ReferencePipeline.forEachWithCancel([email protected]/ReferencePipeline.java:129)
	at java.util.stream.AbstractPipeline.copyIntoWithCancel([email protected]/AbstractPipeline.java:527)
	at java.util.stream.AbstractPipeline.copyInto([email protected]/AbstractPipeline.java:513)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto([email protected]/AbstractPipeline.java:499)
	at java.util.stream.MatchOps$MatchOp.evaluateSequential([email protected]/MatchOps.java:230)
	at java.util.stream.MatchOps$MatchOp.evaluateSequential([email protected]/MatchOps.java:196)
	at java.util.stream.AbstractPipeline.evaluate([email protected]/AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.anyMatch([email protected]/ReferencePipeline.java:632)
	at org.jetbrains.java.decompiler.modules.decompiler.exps.InvocationExprent.lambda$isMappingInBounds$20(InvocationExprent.java:1643)
	at org.jetbrains.java.decompiler.modules.decompiler.exps.InvocationExprent$$Lambda$299/0x00007f27f80d9190.test(Unknown Source)
	at java.util.stream.MatchOps$1MatchSink.accept([email protected]/MatchOps.java:90)
	at java.util.ArrayList$ArrayListSpliterator.tryAdvance([email protected]/ArrayList.java:1602)
	at java.util.stream.ReferencePipeline.forEachWithCancel([email protected]/ReferencePipeline.java:129)
	at java.util.stream.AbstractPipeline.copyIntoWithCancel([email protected]/AbstractPipeline.java:527)
	at java.util.stream.AbstractPipeline.copyInto([email protected]/AbstractPipeline.java:513)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto([email protected]/AbstractPipeline.java:499)
	at java.util.stream.MatchOps$MatchOp.evaluateSequential([email protected]/MatchOps.java:230)
	at java.util.stream.MatchOps$MatchOp.evaluateSequential([email protected]/MatchOps.java:196)
	at java.util.stream.AbstractPipeline.evaluate([email protected]/AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.allMatch([email protected]/ReferencePipeline.java:637)
	at org.jetbrains.java.decompiler.modules.decompiler.exps.InvocationExprent.isMappingInBounds(InvocationExprent.java:1643)
	at org.jetbrains.java.decompiler.modules.decompiler.exps.InvocationExprent.putGenericMapping(InvocationExprent.java:1543)
	at org.jetbrains.java.decompiler.modules.decompiler.exps.InvocationExprent.processGenericMapping(InvocationExprent.java:1515)
	at org.jetbrains.java.decompiler.modules.decompiler.exps.InvocationExprent.getInferredExprType(InvocationExprent.java:571)
	at org.jetbrains.java.decompiler.modules.decompiler.exps.InvocationExprent.getInferredExprType(InvocationExprent.java:503)
	at org.jetbrains.java.decompiler.modules.decompiler.ExprProcessor.listToJava(ExprProcessor.java:893)
	at org.jetbrains.java.decompiler.modules.decompiler.stats.BasicBlockStatement.toJava(BasicBlockStatement.java:90)
	at org.jetbrains.java.decompiler.modules.decompiler.ExprProcessor.jmpWrapper(ExprProcessor.java:833)
	at org.jetbrains.java.decompiler.modules.decompiler.stats.DoStatement.toJava(DoStatement.java:141)
	at org.jetbrains.java.decompiler.modules.decompiler.ExprProcessor.jmpWrapper(ExprProcessor.java:833)
	at org.jetbrains.java.decompiler.modules.decompiler.stats.SequenceStatement.toJava(SequenceStatement.java:107)
	at org.jetbrains.java.decompiler.modules.decompiler.stats.RootStatement.toJava(RootStatement.java:36)
	at org.jetbrains.java.decompiler.main.ClassWriter.writeMethod(ClassWriter.java:1283)
	at org.jetbrains.java.decompiler.main.ClassWriter.writeClass(ClassWriter.java:470)
	at org.jetbrains.java.decompiler.main.ClassesProcessor.writeClass(ClassesProcessor.java:474)
	at org.jetbrains.java.decompiler.main.Fernflower.getClassContent(Fernflower.java:191)
	at org.jetbrains.java.decompiler.struct.ContextUnit.lambda$save$3(ContextUnit.java:187)
	at org.jetbrains.java.decompiler.struct.ContextUnit$$Lambda$274/0x00007f27f80d4b00.run(Unknown Source)
	at java.util.concurrent.Executors$RunnableAdapter.call([email protected]/Executors.java:539)
	at java.util.concurrent.FutureTask.run([email protected]/FutureTask.java:264)
	at java.util.concurrent.ThreadPoolExecutor.runWorker([email protected]/ThreadPoolExecutor.java:1136)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run([email protected]/ThreadPoolExecutor.java:635)
	at java.lang.Thread.run([email protected]/Thread.java:840)

"Attach Listener" #17 daemon prio=9 os_prio=0 cpu=0.38ms elapsed=212.63s tid=0x00007f27cc000ff0 nid=0x7a94 waiting on condition  [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"VM Thread" os_prio=0 cpu=30.05ms elapsed=235.54s tid=0x00007f287c12d0e0 nid=0x7a26 runnable  

"GC Thread#0" os_prio=0 cpu=734.07ms elapsed=235.58s tid=0x00007f287c052440 nid=0x7a21 runnable  

"GC Thread#1" os_prio=0 cpu=708.50ms elapsed=235.13s tid=0x00007f27ec0050c0 nid=0x7a33 runnable  

"GC Thread#2" os_prio=0 cpu=623.74ms elapsed=235.13s tid=0x00007f27ec005b00 nid=0x7a34 runnable  

"GC Thread#3" os_prio=0 cpu=694.02ms elapsed=235.13s tid=0x00007f27ec006540 nid=0x7a35 runnable  

"G1 Main Marker" os_prio=0 cpu=0.05ms elapsed=235.58s tid=0x00007f287c0624b0 nid=0x7a22 runnable  

"G1 Conc#0" os_prio=0 cpu=0.09ms elapsed=235.58s tid=0x00007f287c063420 nid=0x7a23 runnable  

"G1 Refine#0" os_prio=0 cpu=38.27ms elapsed=235.58s tid=0x00007f287c0feb60 nid=0x7a24 runnable  

"G1 Refine#1" os_prio=0 cpu=3.65ms elapsed=234.62s tid=0x00007f283c000eb0 nid=0x7a3b runnable  

"G1 Refine#2" os_prio=0 cpu=0.09ms elapsed=216.14s tid=0x00007f277c001750 nid=0x7a84 runnable  

"G1 Service" os_prio=0 cpu=38.56ms elapsed=235.58s tid=0x00007f287c0ffa60 nid=0x7a25 runnable  

"VM Periodic Task Thread" os_prio=0 cpu=66.84ms elapsed=235.53s tid=0x00007f287c14fda0 nid=0x7a30 waiting on condition  

JNI global refs: 9, weak refs: 0

Using VisualVM and making use of the jstack command multiple times suggests that the VM stays in this method and does not leave it or call another method, furthermore no notable heap allocations are performed (though it slowly accumulates memory nevertheless).

@Geolykt Geolykt added the Type: Bug Something isn't working label Apr 5, 2024
@jaskarth jaskarth added Subsystem: Writing Anything concerning how expressions are written Priority: Medium Medium priority labels Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Medium Medium priority Subsystem: Writing Anything concerning how expressions are written Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants