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

SSVM unable to init #745

Open
neilhuang007 opened this issue Nov 25, 2023 · 4 comments
Open

SSVM unable to init #745

neilhuang007 opened this issue Nov 25, 2023 · 4 comments
Labels

Comments

@neilhuang007
Copy link

when trying to turn on ssvm and this error happens
`13:51:32.101 [CompileDependencyUpdater/Phantom generation #0] INFO : Attempting to generate phantoms, analyzing 3571 classes...
13:51:32.353 [SsvmIntegration/Recaf SSVM-0] ERROR: SSVM failed to initialize
java.lang.IllegalStateException: VM initialization failed
at dev.xdark.ssvm.VirtualMachine.init(VirtualMachine.java:777)
at dev.xdark.ssvm.VirtualMachine.initialize(VirtualMachine.java:167)
at me.coley.recaf.ssvm.LocalVmFactory.create(LocalVmFactory.java:47)
at me.coley.recaf.ssvm.SsvmIntegration.createVM(SsvmIntegration.java:104)
at me.coley.recaf.ssvm.SsvmIntegration.updatePrimaryVm(SsvmIntegration.java:60)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1623)
Caused by: dev.xdark.ssvm.execution.PanicException: Segfault
at dev.xdark.ssvm.memory.allocation.BufferMemoryData.validate(BufferMemoryData.java:222)
Caused by: dev.xdark.ssvm.execution.PanicException: Segfault

at dev.xdark.ssvm.memory.allocation.BufferMemoryData.writeInt(BufferMemoryData.java:54)
at dev.xdark.ssvm.memory.management.SimpleMemoryManager.writeInt(SimpleMemoryManager.java:230)
at dev.xdark.ssvm.value.SimpleInstanceValue.setInt(SimpleInstanceValue.java:91)
at dev.xdark.ssvm.util.VMHelper.screenVmThread(VMHelper.java:706)
at dev.xdark.ssvm.thread.NopThreadManager.getVmThread(NopThreadManager.java:51)
at dev.xdark.ssvm.thread.ThreadManager.currentThread(ThreadManager.java:50)
at dev.xdark.ssvm.VirtualMachine.currentThread(VirtualMachine.java:546)
at dev.xdark.ssvm.VirtualMachine.getThreadStorage(VirtualMachine.java:537)
at dev.xdark.ssvm.mirror.SimpleInstanceJavaClass.initialize(SimpleInstanceJavaClass.java:191)
at dev.xdark.ssvm.thread.NopThreadManager.getVmThread(NopThreadManager.java:41)
at dev.xdark.ssvm.thread.ThreadManager.currentThread(ThreadManager.java:50)
at dev.xdark.ssvm.VirtualMachine.currentThread(VirtualMachine.java:546)
at dev.xdark.ssvm.VirtualMachine.getThreadStorage(VirtualMachine.java:537)
at dev.xdark.ssvm.mirror.SimpleInstanceJavaClass.initialize(SimpleInstanceJavaClass.java:191)
at dev.xdark.ssvm.VirtualMachine.init(VirtualMachine.java:772)
... 9 common frames omitted

13:51:35.119 [CompileDependencyUpdater/Phantom generation #0] ERROR: Failed to generate phantom classes
java.lang.RuntimeException: org.objectweb.asm.tree.analysis.AnalyzerException: Error at instruction 10: Insufficient maximum stack size.
at org.clyze.jphantom.JPhantom.run(JPhantom.java:86)
at me.coley.recaf.util.JPhantomUtil.generate(JPhantomUtil.java:76)
at me.coley.recaf.util.CompileDependencyUpdater.createPhantoms(CompileDependencyUpdater.java:55)
at me.coley.recaf.util.CompileDependencyUpdater.lambda$install$0(CompileDependencyUpdater.java:37)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1623)
Caused by: org.objectweb.asm.tree.analysis.AnalyzerException: Error at instruction 10: Insufficient maximum stack size.
at org.objectweb.asm.tree.analysis.Analyzer.analyze(Analyzer.java:279)
at org.clyze.jphantom.constraints.extractors.TypeConstraintExtractor.visit(TypeConstraintExtractor.java:58)
at org.clyze.jphantom.constraints.extractors.TypeConstraintExtractor.visit(TypeConstraintExtractor.java:46)
at org.clyze.jphantom.JPhantom.run(JPhantom.java:84)
... 8 common frames omitted
Caused by: java.lang.IndexOutOfBoundsException: Insufficient maximum stack size.
at org.objectweb.asm.tree.analysis.Frame.push(Frame.java:273)
at org.objectweb.asm.tree.analysis.Frame.execute(Frame.java:319)
at org.objectweb.asm.tree.analysis.Analyzer.analyze(Analyzer.java:171)
... 11 common frames omitted
Caused by: org.objectweb.asm.tree.analysis.AnalyzerException: Error at instruction 10: Insufficient maximum stack size.

Caused by: java.lang.IndexOutOfBoundsException: Insufficient maximum stack size.

13:52:31.134 [ContainerContentSource/Recaf misc-0] INFO : Reading from file: C:\Users\neilhuang007\Documents\deobf\input\Zachary.jar
13:52:31.581 [ContentSource/Recaf misc-0] INFO : Read 3571 classes, 4092 files
13:52:31.589 [CompileDependencyUpdater/Phantom generation #0] INFO : Attempting to generate phantoms, analyzing 3571 classes...
13:52:31.848 [SsvmIntegration/Recaf SSVM-0] ERROR: SSVM failed to initialize
java.lang.IllegalStateException: VM initialization failed
at dev.xdark.ssvm.VirtualMachine.init(VirtualMachine.java:777)
at dev.xdark.ssvm.VirtualMachine.initialize(VirtualMachine.java:167)
at me.coley.recaf.ssvm.RemoteVmFactory.create(RemoteVmFactory.java:72)
at me.coley.recaf.ssvm.SsvmIntegration.createVM(SsvmIntegration.java:104)
at me.coley.recaf.ssvm.SsvmIntegration.updatePrimaryVm(SsvmIntegration.java:60)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1623)
Caused by: dev.xdark.ssvm.execution.PanicException: Segfault
at dev.xdark.ssvm.memory.allocation.BufferMemoryData.validate(BufferMemoryData.java:222)
at dev.xdark.ssvm.memory.allocation.BufferMemoryData.writeInt(BufferMemoryData.java:54)
at dev.xdark.ssvm.memory.management.SimpleMemoryManager.writeInt(SimpleMemoryManager.java:230)
Caused by: dev.xdark.ssvm.execution.PanicException: Segfault

at dev.xdark.ssvm.value.SimpleInstanceValue.setInt(SimpleInstanceValue.java:91)
at dev.xdark.ssvm.util.VMHelper.screenVmThread(VMHelper.java:706)
at dev.xdark.ssvm.thread.NopThreadManager.getVmThread(NopThreadManager.java:51)
at dev.xdark.ssvm.thread.ThreadManager.currentThread(ThreadManager.java:50)
at dev.xdark.ssvm.VirtualMachine.currentThread(VirtualMachine.java:546)
at dev.xdark.ssvm.VirtualMachine.getThreadStorage(VirtualMachine.java:537)
at dev.xdark.ssvm.mirror.SimpleInstanceJavaClass.initialize(SimpleInstanceJavaClass.java:191)
at dev.xdark.ssvm.thread.NopThreadManager.getVmThread(NopThreadManager.java:41)
at dev.xdark.ssvm.thread.ThreadManager.currentThread(ThreadManager.java:50)
at dev.xdark.ssvm.VirtualMachine.currentThread(VirtualMachine.java:546)
at dev.xdark.ssvm.VirtualMachine.getThreadStorage(VirtualMachine.java:537)
at dev.xdark.ssvm.mirror.SimpleInstanceJavaClass.initialize(SimpleInstanceJavaClass.java:191)
at dev.xdark.ssvm.VirtualMachine.init(VirtualMachine.java:772)
... 9 common frames omitted

13:52:33.722 [CompileDependencyUpdater/Phantom generation #0] ERROR: Failed to generate phantom classes
java.lang.RuntimeException: org.objectweb.asm.tree.analysis.AnalyzerException: Error at instruction 10: Insufficient maximum stack size.
at org.clyze.jphantom.JPhantom.run(JPhantom.java:86)
at me.coley.recaf.util.JPhantomUtil.generate(JPhantomUtil.java:76)
at me.coley.recaf.util.CompileDependencyUpdater.createPhantoms(CompileDependencyUpdater.java:55)
at me.coley.recaf.util.CompileDependencyUpdater.lambda$install$0(CompileDependencyUpdater.java:37)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1623)
Caused by: org.objectweb.asm.tree.analysis.AnalyzerException: Error at instruction 10: Insufficient maximum stack size.
at org.objectweb.asm.tree.analysis.Analyzer.analyze(Analyzer.java:279)
at org.clyze.jphantom.constraints.extractors.TypeConstraintExtractor.visit(TypeConstraintExtractor.java:58)
at org.clyze.jphantom.constraints.extractors.TypeConstraintExtractor.visit(TypeConstraintExtractor.java:46)
at org.clyze.jphantom.JPhantom.run(JPhantom.java:84)
... 8 common frames omitted
Caused by: java.lang.IndexOutOfBoundsException: Insufficient maximum stack size.
at org.objectweb.asm.tree.analysis.Frame.push(Frame.java:273)
Caused by: org.objectweb.asm.tree.analysis.AnalyzerException: Error at instruction 10: Insufficient maximum stack size.

at org.objectweb.asm.tree.analysis.Frame.execute(Frame.java:319)
at org.objectweb.asm.tree.analysis.Analyzer.analyze(Analyzer.java:171)
... 11 common frames omitted

Caused by: java.lang.IndexOutOfBoundsException: Insufficient maximum stack size.`

plssss help

@neilhuang007
Copy link
Author

btw its 3.X series

@Col-E Col-E added the 3.X label Dec 9, 2023
@PimentelM
Copy link

I'm having the same problem in both my computers, PC and Mac. Using Java zulu 21 here, also tried setting the remove VM java to be jdk 19, I don't know what this remote thing does though

12:04:43.485 [ContainerContentSource/Recaf misc-1] INFO : Reading from file: /Users/pimentel/Downloads/helloworld-2.0.jar 12:04:43.493 [ContentSource/Recaf misc-1] INFO : Read 2 classes, 9 files 12:04:43.503 [CompileDependencyUpdater/Phantom generation #0] INFO : Attempting to generate phantoms, analyzing 2 classes... 12:04:43.511 [JPhantomUtil/Phantom generation #0] DEBUG: Phantom analysis complete, generated 1 classes 12:04:43.512 [CompileDependencyUpdater/Phantom generation #0] INFO : 1 phantom classes were generated 12:04:44.191 [SsvmIntegration/Recaf SSVM-0] ERROR: SSVM failed to initialize java.lang.IllegalStateException: VM initialization failed at dev.xdark.ssvm.VirtualMachine.init(VirtualMachine.java:777) at dev.xdark.ssvm.VirtualMachine.initialize(VirtualMachine.java:167) at me.coley.recaf.ssvm.RemoteVmFactory.create(RemoteVmFactory.java:72) at me.coley.recaf.ssvm.SsvmIntegration.createVM(SsvmIntegration.java:104) at me.coley.recaf.ssvm.SsvmIntegration.updatePrimaryVm(SsvmIntegration.java:60) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) at java.base/java.lang.Thread.run(Thread.java:1583) Caused by: dev.xdark.ssvm.execution.PanicException: Segfault at dev.xdark.ssvm.memory.allocation.BufferMemoryData.validate(BufferMemoryData.java:222) at dev.xdark.ssvm.memory.allocation.BufferMemoryData.writeInt(BufferMemoryData.java:54) at dev.xdark.ssvm.memory.management.SimpleMemoryManager.writeInt(SimpleMemoryManager.java:230) at dev.xdark.ssvm.value.SimpleInstanceValue.setInt(SimpleInstanceValue.java:91) at dev.xdark.ssvm.util.VMHelper.screenVmThread(VMHelper.java:706) at dev.xdark.ssvm.thread.NopThreadManager.getVmThread(NopThreadManager.java:51) at dev.xdark.ssvm.thread.ThreadManager.currentThread(ThreadManager.java:50) at dev.xdark.ssvm.VirtualMachine.currentThread(VirtualMachine.java:546) at dev.xdark.ssvm.VirtualMachine.getThreadStorage(VirtualMachine.java:537) at dev.xdark.ssvm.mirror.SimpleInstanceJavaClass.initialize(SimpleInstanceJavaClass.java:191) at dev.xdark.ssvm.thread.NopThreadManager.getVmThread(NopThreadManager.java:41) at dev.xdark.ssvm.thread.ThreadManager.currentThread(ThreadManager.java:50) at dev.xdark.ssvm.VirtualMachine.currentThread(VirtualMachine.java:546) at dev.xdark.ssvm.VirtualMachine.getThreadStorage(VirtualMachine.java:537) at dev.xdark.ssvm.mirror.SimpleInstanceJavaClass.initialize(SimpleInstanceJavaClass.java:191) at dev.xdark.ssvm.VirtualMachine.init(VirtualMachine.java:772) ... 9 common frames omitted

@hardb1te
Copy link

Anyone managed to overcome this?

@PimentelM
Copy link

PimentelM commented Feb 19, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants