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

Worker thread execution failed: Failed to apply jb to <com.google.firebase.snippets.FirebaseAuthSnippets: javax.ws.rs.core.Response clearSessionCookieAndRevoke(javax.ws.rs.core.Cookie)> #2024

Open
buriedpot opened this issue Nov 20, 2023 · 3 comments

Comments

@buriedpot
Copy link

Hi, when I use 4.2.1, this error never occurs or occurs few times.

Recently, I updated soot from 4.2.1 to 4.3.0, and then many programs throw Exceptions as below:


[ERROR] Worker thread execution failed: Failed to apply jb to 
java.lang.RuntimeException: Failed to apply jb to 
    at soot.asm.AsmMethodSource.getBody (AsmMethodSource.java:2282)
    at soot.SootMethod.retrieveActiveBody (SootMethod.java:446)
    at soot.PackManager.lambda$retrieveAllBodies$2 (PackManager.java:1252)
    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:748)
Caused by: java.util.ConcurrentModificationException
    at java.util.ArrayList$Itr.checkForComodification (ArrayList.java:909)
    at java.util.ArrayList$Itr.next (ArrayList.java:859)
    at soot.FastHierarchy.getSignaturePolymorphicMethod (FastHierarchy.java:932)
    at soot.FastHierarchy.resolveMethod (FastHierarchy.java:833)
    at soot.FastHierarchy.resolveMethod (FastHierarchy.java:785)
    at soot.SootMethodRefImpl.tryResolve (SootMethodRefImpl.java:227)
    at soot.SootMethodRefImpl.tryResolve (SootMethodRefImpl.java:213)
    at soot.toolkits.exceptions.UnitThrowAnalysis.mightThrow (UnitThrowAnalysis.java:304)
    at soot.toolkits.exceptions.UnitThrowAnalysis$ValueSwitch.caseInstanceInvokeExpr (UnitThrowAnalysis.java:1181)
    at soot.toolkits.exceptions.UnitThrowAnalysis$ValueSwitch.caseVirtualInvokeExpr (UnitThrowAnalysis.java:1017)
    at soot.jimple.internal.AbstractVirtualInvokeExpr.apply (AbstractVirtualInvokeExpr.java:81)
    at soot.toolkits.exceptions.UnitThrowAnalysis.mightThrow (UnitThrowAnalysis.java:296)
    at soot.toolkits.exceptions.UnitThrowAnalysis$UnitSwitch.caseInvokeStmt (UnitThrowAnalysis.java:802)
    at soot.jimple.internal.JInvokeStmt.apply (JInvokeStmt.java:99)
    at soot.toolkits.exceptions.UnitThrowAnalysis.mightThrow (UnitThrowAnalysis.java:280)
    at soot.toolkits.exceptions.UnitThrowAnalysis.mightThrow (UnitThrowAnalysis.java:275)
    at soot.toolkits.graph.ExceptionalUnitGraph.buildExceptionDests (ExceptionalUnitGraph.java:277)
    at soot.toolkits.graph.ExceptionalUnitGraph.initialize (ExceptionalUnitGraph.java:220)
    at soot.toolkits.graph.ExceptionalUnitGraph. (ExceptionalUnitGraph.java:127)
    at soot.toolkits.graph.ExceptionalUnitGraphFactory.newExceptionalUnitGraph (ExceptionalUnitGraphFactory.java:55)
    at soot.toolkits.graph.ExceptionalUnitGraphFactory.createExceptionalUnitGraph (ExceptionalUnitGraphFactory.java:50)
    at soot.toolkits.scalar.LocalSplitter.internalTransform (LocalSplitter.java:109)
    at soot.BodyTransformer.transform (BodyTransformer.java:47)
    at soot.Transform.apply (Transform.java:126)
    at soot.JimpleBodyPack.applyPhaseOptions (JimpleBodyPack.java:65)
    at soot.JimpleBodyPack.internalApply (JimpleBodyPack.java:112)
    at soot.Pack.apply (Pack.java:126)
    at soot.asm.AsmMethodSource.getBody (AsmMethodSource.java:2280)
    at soot.SootMethod.retrieveActiveBody (SootMethod.java:446)
    at soot.PackManager.lambda$retrieveAllBodies$2 (PackManager.java:1252)
    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:748)
java.lang.RuntimeException: Failed to apply jb to 

Which configuration should I config for soot 4.3.0 to avoid this problem?

@buriedpot
Copy link
Author

@buriedpot
Copy link
Author

buriedpot commented Jan 10, 2024

And I found that this error doesn't occur on windows but on ubuntu. The soot version is 4.3.0+.

@buriedpot
Copy link
Author

buriedpot commented Jan 16, 2024

According my own debugging, I found that the method SootClass.getMethodsByNameAndParamCount may introduce some bug. While it is calling getMethods(), other threads modify the methodList.

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

1 participant