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

Error: not all bodies retrieved. 导致输出文件关闭 #8

Open
SuperXiaoxiong opened this issue Nov 15, 2023 · 5 comments
Open

Error: not all bodies retrieved. 导致输出文件关闭 #8

SuperXiaoxiong opened this issue Nov 15, 2023 · 5 comments

Comments

@SuperXiaoxiong
Copy link

运行参数

 java -jar soot-fact-generator.jar -i /mnt/hgfs/bytecodedl/jeecg-system-cloud-start-3.4.3.jar -l /home/ubuntu/work/jdk1.8.0_371/jre/lib/rt.jar --generate-jimple --allow-phantom --full --ignore-wrong-staticness --ignore-factgen-errors  -d /mnt/hgfs/bytecodedl/jeecg_out1  --log-dir /mnt/hgfs/bytecodedl/jeecg_out1/
Exception in thread "Thread-1" Error: not all bodies retrieved.
java.lang.RuntimeException: Failed to convert <oracle.jdbc.proxy.ClassGenerator: void generate(org.objectweb.asm.ClassWriter)>
        at soot.asm.AsmMethodSource.getBody(AsmMethodSource.java:2163)
        at soot.SootMethod.retrieveActiveBody(SootMethod.java:402)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.RuntimeException: Trying to create interface invoke expression for non-interface type: org.objectweb.asm.MethodVisitor Use JVirtualInvokeExpr or JSpecialInvokeExpr instead!
        at soot.jimple.internal.JInterfaceInvokeExpr.<init>(JInterfaceInvokeExpr.java:45)
        at soot.jimple.Jimple.newInterfaceInvokeExpr(Jimple.java:491)
        at soot.asm.AsmMethodSource.convertMethodInsn(AsmMethodSource.java:1398)
        at soot.asm.AsmMethodSource.convert(AsmMethodSource.java:1907)
        at soot.asm.AsmMethodSource.getBody(AsmMethodSource.java:2161)
        ... 4 more
java.lang.RuntimeException: Failed to convert <oracle.jdbc.proxy.ClassGenerator: void generate(org.objectweb.asm.ClassWriter)>
        at soot.asm.AsmMethodSource.getBody(AsmMethodSource.java:2163)
        at soot.SootMethod.retrieveActiveBody(SootMethod.java:402)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.RuntimeException: Trying to create interface invoke expression for non-interface type: org.objectweb.asm.MethodVisitor Use JVirtualInvokeExpr or JSpecialInvokeExpr instead!
        at soot.jimple.internal.JInterfaceInvokeExpr.<init>(JInterfaceInvokeExpr.java:45)
        at soot.jimple.Jimple.newInterfaceInvokeExpr(Jimple.java:491)
        at soot.asm.AsmMethodSource.convertMethodInsn(AsmMethodSource.java:1398)
        at soot.asm.AsmMethodSource.convert(AsmMethodSource.java:1907)
        at soot.asm.AsmMethodSource.getBody(AsmMethodSource.java:2161)
        ... 4 more
Fact generation cores: 8
null
org.clyze.doop.common.DoopErrorCodeException: Doop error #10
        at org.clyze.doop.common.DoopErrorCodeException.error10(DoopErrorCodeException.java:53)
        at org.clyze.doop.common.Driver.waitForExecutorShutdown(Driver.java:73)
        at org.clyze.doop.common.Driver.shutdownExecutor(Driver.java:78)
        at org.clyze.doop.common.Driver.doInParallel(Driver.java:62)
        at org.clyze.doop.common.Driver.generateInParallel(Driver.java:89)
        at org.clyze.doop.soot.Main.invokeSoot(Main.java:296)
        at org.clyze.doop.soot.Main.lambda$produceFacts$1(Main.java:127)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
Fact generation failed for method <sun.security.jgss.wrapper.NativeGSSContext: byte[] retrieveToken(java.io.InputStream,int)>.
java.lang.RuntimeException: java.io.IOException: Stream closed
        at org.clyze.doop.common.Database.add(Database.java:114)
        at org.clyze.doop.common.JavaFactWriter.writeActualParam(JavaFactWriter.java:293)
        at org.clyze.doop.soot.FactWriter.writeActualParams(FactWriter.java:861)
        at org.clyze.doop.soot.FactWriter.writeInvokeHelper(FactWriter.java:890)
        at org.clyze.doop.soot.FactWriter.writeInvoke(FactWriter.java:885)
        at org.clyze.doop.soot.FactGenerator.generate(FactGenerator.java:273)
        at org.clyze.doop.soot.FactGenerator.generate(FactGenerator.java:223)
        at org.clyze.doop.soot.FactGenerator.run(FactGenerator.java:75)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
Caused by: java.io.IOException: Stream closed
        at sun.nio.cs.StreamEncoder.ensureOpen(StreamEncoder.java:45)
        at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:118)
        at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:135)
        at java.io.OutputStreamWriter.write(OutputStreamWriter.java:220)
        at java.io.Writer.write(Writer.java:157)
        at org.clyze.doop.common.Database.add(Database.java:111)
        ... 10 more
Fact generation failed for method <java.util.logging.FileHandler: void openFiles()>.
java.lang.RuntimeException: java.io.IOException: Stream closed
        at org.clyze.doop.common.Database.add(Database.java:114)
        at org.clyze.doop.common.JavaFactWriter.writeActualParam(JavaFactWriter.java:293)
        at org.clyze.doop.soot.FactWriter.writeActualParams(FactWriter.java:861)
        at org.clyze.doop.soot.FactWriter.writeInvokeHelper(FactWriter.java:890)
        at org.clyze.doop.soot.FactWriter.writeInvoke(FactWriter.java:885)
        at org.clyze.doop.soot.FactWriter.writeAssignInvoke(FactWriter.java:258)
        at org.clyze.doop.soot.FactGenerator.generateAssignToLocal(FactGenerator.java:368)
        at org.clyze.doop.soot.FactGenerator.generate(FactGenerator.java:356)
        at org.clyze.doop.soot.FactGenerator.generate(FactGenerator.java:269)
        at org.clyze.doop.soot.FactGenerator.generate(FactGenerator.java:223)
        at org.clyze.doop.soot.FactGenerator.run(FactGenerator.java:75)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
Caused by: java.io.IOException: Stream closed
        at sun.nio.cs.StreamEncoder.ensureOpen(StreamEncoder.java:45)
        at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:118)
        at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:135)
        at java.io.OutputStreamWriter.write(OutputStreamWriter.java:220)
        at java.io.Writer.write(Writer.java:157)
        at org.clyze.doop.common.Database.add(Database.java:111)
        ... 13 more
Error while processing method: <java.util.logging.FileHandler: void openFiles()>: java.io.IOException: Stream closed
Error while processing method: <sun.security.jgss.wrapper.NativeGSSContext: byte[] retrieveToken(java.io.InputStream,int)>: java.io.IOException: Stream closed
Fact generation failed for method <org.springframework.data.util.MethodInvocationRecorder: java.util.Optional getPropertyPath(java.util.List)>.
java.lang.RuntimeException: java.io.IOException: Stream closed
        at org.clyze.doop.common.Database.add(Database.java:114)
        at org.clyze.doop.common.JavaFactWriter.writeActualParam(JavaFactWriter.java:293)
        at org.clyze.doop.soot.FactWriter.writeActualParams(FactWriter.java:861)
        at org.clyze.doop.soot.FactWriter.writeInvokeHelper(FactWriter.java:890)
        at org.clyze.doop.soot.FactWriter.writeInvoke(FactWriter.java:885)
        at org.clyze.doop.soot.FactWriter.writeAssignInvoke(FactWriter.java:258)
        at org.clyze.doop.soot.FactGenerator.generateAssignToLocal(FactGenerator.java:368)
        at org.clyze.doop.soot.FactGenerator.generate(FactGenerator.java:356)
        at org.clyze.doop.soot.FactGenerator.generate(FactGenerator.java:269)
        at org.clyze.doop.soot.FactGenerator.generate(FactGenerator.java:223)
        at org.clyze.doop.soot.FactGenerator.run(FactGenerator.java:75)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
Caused by: java.io.IOException: Stream closed
        at sun.nio.cs.StreamEncoder.ensureOpen(StreamEncoder.java:45)
        at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:118)
        at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:135)
        at java.io.OutputStreamWriter.write(OutputStreamWriter.java:220)
        at java.io.Writer.write(Writer.java:157)
        at org.clyze.doop.common.Database.add(Database.java:111)
        ... 13 more
Error while processing method: <org.springframework.data.util.MethodInvocationRecorder: java.util.Optional getPropertyPath(java.util.List)>: java.io.IOException: Stream closed
Fact generation failed for method <org.springframework.data.util.MethodInvocationRecorder: java.util.Optional lambda$getPropertyPath$0(java.util.List,org.springframework.data.util.MethodInvocationRecorder$RecordingMethodInterceptor)>.
java.lang.RuntimeException: java.io.IOException: Stream closed
        at org.clyze.doop.common.Database.add(Database.java:114)
        at org.clyze.doop.common.JavaFactWriter.writeActualParam(JavaFactWriter.java:293)
        at org.clyze.doop.soot.FactWriter.writeActualParams(FactWriter.java:861)
        at org.clyze.doop.soot.FactWriter.writeInvokeHelper(FactWriter.java:890)
        at org.clyze.doop.soot.FactWriter.writeInvoke(FactWriter.java:885)
        at org.clyze.doop.soot.FactWriter.writeAssignInvoke(FactWriter.java:258)
        at org.clyze.doop.soot.FactGenerator.generateAssignToLocal(FactGenerator.java:368)
        at org.clyze.doop.soot.FactGenerator.generate(FactGenerator.java:356)
        at org.clyze.doop.soot.FactGenerator.generate(FactGenerator.java:269)
        at org.clyze.doop.soot.FactGenerator.generate(FactGenerator.java:223)
        at org.clyze.doop.soot.FactGenerator.run(FactGenerator.java:75)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
Caused by: java.io.IOException: Stream closed
        at sun.nio.cs.StreamEncoder.ensureOpen(StreamEncoder.java:45)
        at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:118)
        at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:135)
        at java.io.OutputStreamWriter.write(OutputStreamWriter.java:220)
        at java.io.Writer.write(Writer.java:157)
        at org.clyze.doop.common.Database.add(Database.java:111)
        ... 13 more
Error while processing method: <org.springframework.data.util.MethodInvocationRecorder: java.util.Optional lambda$getPropertyPath$0(java.util.List,org.springframework.data.util.MethodInvocationRecorder$RecordingMethodInterceptor)>: java.io.IOException: Stream closed
Error while processing method: <reactor.extra.processor.RingBuffer: reactor.extra.processor.RingBuffer$Sequence[] getSequenceReceivers()>: java.io.IOException: Stream closed
Fact generation failed for method <sun.security.jgss.wrapper.NativeGSSContext: void <init>(sun.security.jgss.wrapper.GSSNameElement,sun.security.jgss.wrapper.GSSCredElement,int,sun.security.jgss.wrapper.GSSLibStub)>.
java.lang.RuntimeException: java.io.IOException: Stream closed
        at org.clyze.doop.common.Database.add(Database.java:114)
        at org.clyze.doop.soot.FactWriter.writeAssignHeapAllocation(FactWriter.java:277)
        at org.clyze.doop.soot.FactGenerator.generateAssignToLocal(FactGenerator.java:370)
        at org.clyze.doop.soot.FactGenerator.generate(FactGenerator.java:356)
        at org.clyze.doop.soot.FactGenerator.generate(FactGenerator.java:269)
        at org.clyze.doop.soot.FactGenerator.generate(FactGenerator.java:223)
        at org.clyze.doop.soot.FactGenerator.run(FactGenerator.java:75)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
Caused by: java.io.IOException: Stream closed
        at sun.nio.cs.StreamEncoder.ensureOpen(StreamEncoder.java:45)
        at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:118)
        at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:135)
        at java.io.OutputStreamWriter.write(OutputStreamWriter.java:220)
        at java.io.Writer.write(Writer.java:157)
        at org.clyze.doop.common.Database.add(Database.java:111)
        ... 9 more
Error while processing method: <sun.security.jgss.wrapper.NativeGSSContext: void <init>(sun.security.jgss.wrapper.GSSNameElement,sun.security.jgss.wrapper.GSSCredElement,int,sun.security.jgss.wrapper.GSSLibStub)>: java.io.IOException: Stream closed
Fact generation failed for method <org.springframework.data.util.MethodInvocationRecorder: org.springframework.data.util.MethodInvocationRecorder$Recorded access$300(org.springframework.data.util.MethodInvocationRecorder,java.lang.Class)>.
java.lang.RuntimeException: java.io.IOException: Stream closed
        at org.clyze.doop.common.Database.add(Database.java:114)
        at org.clyze.doop.common.JavaFactWriter.writeActualParam(JavaFactWriter.java:293)
        at org.clyze.doop.soot.FactWriter.writeActualParams(FactWriter.java:861)
        at org.clyze.doop.soot.FactWriter.writeInvokeHelper(FactWriter.java:890)
        at org.clyze.doop.soot.FactWriter.writeInvoke(FactWriter.java:885)
        at org.clyze.doop.soot.FactWriter.writeAssignInvoke(FactWriter.java:258)
        at org.clyze.doop.soot.FactGenerator.generateAssignToLocal(FactGenerator.java:368)
        at org.clyze.doop.soot.FactGenerator.generate(FactGenerator.java:356)
        at org.clyze.doop.soot.FactGenerator.generate(FactGenerator.java:269)
        at org.clyze.doop.soot.FactGenerator.generate(FactGenerator.java:223)
        at org.clyze.doop.soot.FactGenerator.run(FactGenerator.java:75)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
Caused by: java.io.IOException: Stream closed
        at sun.nio.cs.StreamEncoder.ensureOpen(StreamEncoder.java:45)
        at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:118)
@waderwu
Copy link
Member

waderwu commented Nov 16, 2023

方便提供一下,jeecg-system-cloud-start-3.4.3.jar 吗

@SuperXiaoxiong
Copy link
Author

SuperXiaoxiong commented Nov 20, 2023

项目是 https://github.com/jeecgboot/jeecg-boot, 师傅看下邮箱,我直接发送 打包好的jar 包
谷歌云盘 https://drive.google.com/file/d/16_ZaZjU13D_xesXkEwPawXzoo83B0rak/view?pli=1

@SuperXiaoxiong
Copy link
Author

debug 了一下
retrieveActiveBody 报错,这里是不是需要加一个try catch ,单个类获取body 报错忽略掉
image

@SuperXiaoxiong
Copy link
Author

try catch 了所有 retrieveActiveBody 的位置,一定程度上解决了该问题

@waderwu
Copy link
Member

waderwu commented Nov 26, 2023

我升级了一下soot到最新版本了,你再试试 https://github.com/BytecodeDL/soot-fact-generator/releases/tag/1.4.1

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

No branches or pull requests

2 participants