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

rd.util.reactive.RdFault on test generation for SecurityCheck (methods that should be sandboxed) #1107

Closed
olganaumenko opened this issue Oct 6, 2022 · 4 comments · Fixed by #1109
Assignees
Labels
ctg-bug Issue is a bug

Comments

@olganaumenko
Copy link
Collaborator

Description

UnitTestBot plugin throwed ExceptionInInitializerError when trying to generate tests for the methods that should be sandboxed.

To Reproduce

Steps to reproduce the behavior:

  1. In IntelliJ IDEA with JDK 11 install plugin from utbot-intellij-2022.10.403.zip.
  2. Create the class SecurityCheck.java as described in manual testing scenario from #625.
  3. Choose 100% Fuzzing in UnitTestBot settings.
  4. Use plugin to generate tests for SecurityCheck.java.

Expected behavior

Tests are supposed to be generated. No exception is thrown.

Actual behavior

IDE Internal Errors popup is shown with java.lang.ExceptionInInitializerError.

Visual proofs (screenshots, logs, images)

sandbox_issue_compressed

See the stack trace below:

stacktrace.txt


com.jetbrains.rd.util.reactive.RdFault: -- no message --, reason: java.lang.ExceptionInInitializerError
at org.utbot.engine.pc.UtContextInitializer.(UtSolver.kt:327)
at org.utbot.engine.UtBotSymbolicEngine.(UtBotSymbolicEngine.kt:164)
at org.utbot.framework.plugin.api.TestCaseGenerator.createSymbolicEngine(TestCaseGenerator.kt:263)
at org.utbot.framework.plugin.api.TestCaseGenerator.access$createSymbolicEngine(TestCaseGenerator.kt:61)
at org.utbot.framework.plugin.api.TestCaseGenerator$generate$3$1$1.invokeSuspend(TestCaseGenerator.kt:160)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
at org.utbot.common.ConcurrencyKt.runBlockingWithCancellationPredicate(Concurrency.kt:38)
at org.utbot.framework.plugin.api.TestCaseGenerator$generate$3.invoke(TestCaseGenerator.kt:152)
at org.utbot.framework.plugin.api.TestCaseGenerator$generate$3.invoke(TestCaseGenerator.kt:151)
at org.utbot.common.ConcurrencyKt.runIgnoringCancellationException(Concurrency.kt:47)
at org.utbot.framework.plugin.api.TestCaseGenerator.generate(TestCaseGenerator.kt:151)
at org.utbot.framework.process.EngineMainKt$setup$3.invoke(EngineMain.kt:105)
at org.utbot.framework.process.EngineMainKt$setup$3.invoke(EngineMain.kt:95)
at org.utbot.rd.CallsSynchronizer$measureExecutionForTermination$2$1$1.invoke(ClientProcessUtil.kt:79)
at org.utbot.rd.CallsSynchronizer$measureExecutionForTermination$1.invokeSuspend(ClientProcessUtil.kt:69)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
at org.utbot.rd.CallsSynchronizer.measureExecutionForTermination(ClientProcessUtil.kt:66)
at org.utbot.rd.CallsSynchronizer$measureExecutionForTermination$2$1.invokeSuspend(ClientProcessUtil.kt:78)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
at org.utbot.rd.CallsSynchronizer$measureExecutionForTermination$2.invoke(ClientProcessUtil.kt:77)
at com.jetbrains.rd.framework.IRdEndpoint$set$1.invoke(TaskInterfaces.kt:182)
at com.jetbrains.rd.framework.IRdEndpoint$set$1.invoke(TaskInterfaces.kt:182)
at com.jetbrains.rd.framework.impl.RdCall.onWireReceived(RdTask.kt:360)
at com.jetbrains.rd.framework.MessageBroker$invoke$2$2.invoke(MessageBroker.kt:57)
at com.jetbrains.rd.framework.MessageBroker$invoke$2$2.invoke(MessageBroker.kt:56)
at com.jetbrains.rd.framework.impl.ProtocolContexts.readMessageContextAndInvoke(ProtocolContexts.kt:148)
at com.jetbrains.rd.framework.MessageBroker$invoke$2.invoke(MessageBroker.kt:56)
at com.jetbrains.rd.framework.MessageBroker$invoke$2.invoke(MessageBroker.kt:54)
at com.jetbrains.rd.util.threading.SingleThreadSchedulerBase.queue$lambda-3(SingleThreadScheduler.kt:41)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.IllegalArgumentException: Not supported arch: x86
at org.utbot.engine.z3.Z3Initializer$Companion$initializeCallback$2.invoke(Z3initializer.kt:28)
at org.utbot.engine.z3.Z3Initializer$Companion$initializeCallback$2.invoke(Z3initializer.kt:25)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at org.utbot.engine.z3.Z3Initializer$Companion.getInitializeCallback(Z3initializer.kt:25)
at org.utbot.engine.z3.Z3Initializer$Companion.access$getInitializeCallback(Z3initializer.kt:21)
at org.utbot.engine.z3.Z3Initializer.(Z3initializer.kt:67)
... 53 more

at com.jetbrains.rd.framework.RdTaskResult$Companion.read(TaskInterfaces.kt:30)
at com.jetbrains.rd.framework.impl.CallSiteWiredRdTask.onWireReceived(RdTask.kt:104)
at com.jetbrains.rd.framework.MessageBroker$invoke$2$2.invoke(MessageBroker.kt:57)
at com.jetbrains.rd.framework.MessageBroker$invoke$2$2.invoke(MessageBroker.kt:56)
at com.jetbrains.rd.framework.impl.ProtocolContexts.readMessageContextAndInvoke(ProtocolContexts.kt:148)
at com.jetbrains.rd.framework.MessageBroker$invoke$2.invoke(MessageBroker.kt:56)
at com.jetbrains.rd.framework.MessageBroker$invoke$2.invoke(MessageBroker.kt:54)
at com.jetbrains.rd.framework.impl.RdCall$createResponseScheduler$1.queue$execute(RdTask.kt:278)
at com.jetbrains.rd.framework.impl.RdCall$createResponseScheduler$1.access$queue$execute(RdTask.kt:267)
at com.jetbrains.rd.framework.impl.RdCall$createResponseScheduler$1$queue$1.invokeSuspend(RdTask.kt:287)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
at org.utbot.intellij.plugin.process.EngineProcess.generate(EngineProcess.kt:241)
at org.utbot.intellij.plugin.generator.UtTestsDialogProcessor$createTests$1$1.run(UtTestsDialogProcessor.kt:204)
at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:442)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:114)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$5(CoreProgressManager.java:493)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:244)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:189)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:176)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:244)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
at java.base/java.lang.Thread.run(Thread.java:829)

Environment

Windows 10 Pro 21H1
IntelliJ IDEA 2022.1.3 (Ultimate Edition)
JDK 11

@olganaumenko olganaumenko added the ctg-bug Issue is a bug label Oct 6, 2022
@korifey korifey moved this to Todo in UTBot Java Oct 6, 2022
Repository owner moved this from Todo to Done in UTBot Java Oct 7, 2022
@olganaumenko
Copy link
Collaborator Author

I'm afraid the problem is still here :(

Plugin installed: utbot-intellij-2022.10.413

Please see the screenshot attached:
snd2

And the stack trace:
stacktrace_10-10-2022.txt

@alisevych
Copy link
Member

Bug is not reproducing for me in IDEA 2022.1.3, 2022.1.4, 2022.2.2 (Ultimate).
But there is another issue #1129

@alisevych alisevych assigned alisevych and unassigned Domonion Oct 11, 2022
@alisevych
Copy link
Member

Tried to reproduce again with same UTBotJava project version being checked out, but no - the tests are being generated.

@olganaumenko
Copy link
Collaborator Author

Fixed with installing the proper version of JDK:
I had amazon-corretto-11-x86-windows-jdk.msi instead of amazon-corretto-11-x64-windows-jdk.msi.
Sorry for bothering all of you! :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ctg-bug Issue is a bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants