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

OutOfMemoryError in Concrete Executor logs and error test #1292

Closed
alisevych opened this issue Nov 2, 2022 · 7 comments
Closed

OutOfMemoryError in Concrete Executor logs and error test #1292

alisevych opened this issue Nov 2, 2022 · 7 comments
Assignees
Labels
comp-fuzzing Issue is related to the fuzzing ctg-bug Issue is a bug

Comments

@alisevych
Copy link
Member

Description

Test generation for some classes produces Errors report with exceptions in Concrete executor.
Reproducing for:

  • StringExamples.isStringBuilderEmpty
  • ArrayOfObjects.arrayWithSucc

To Reproduce

  1. Enable logs using ~/.utbot/settings.properties: logConcreteExecutionErrors=true
  2. Install latest build from main into IDEA 2022.2.3
  3. Open UTBotJava project
  4. Generate tests with 95% Symbolic execution for
  • StringExamples.isStringBuilderEmpty or
  • ArrayOfObjects.arrayWithSucc
  1. Open the generated test

Expected behavior

There are no errors report tests expected.

Actual behavior

An error test is generated with information about errors in the concrete executor.

Visual proofs (screenshots, logs, images)

    ///region Errors report for arrayWithSucc

    public void testArrayWithSucc_errors() {
        // Couldn't generate some tests. List of errors:
        // 
        // 1 occurrences of:
        // Default concrete execution failed

    }
    ///endregion

The following exception is present in Concrete executor logs:

Exception in thread "kotlinx.coroutines.DefaultExecutor" java.lang.OutOfMemoryError: Java heap space
	at kotlinx.coroutines.CancellableContinuationImpl.resumedState(CancellableContinuationImpl.kt:416)
	at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:428)
	at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:420)
	at kotlinx.coroutines.CancellableContinuationImpl.resumeUndispatched(CancellableContinuationImpl.kt:518)
	at kotlinx.coroutines.EventLoopImplBase$DelayedResumeTask.run(EventLoop.common.kt:500)
	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284)
	at kotlinx.coroutines.DefaultExecutor.run(DefaultExecutor.kt:108)
	at java.base/java.lang.Thread.run(Thread.java:829)

-6732047430179090681-1.log
-8910242688641328018-1.log

Also once there was a different exception on ArrayOfObjects

16:22:57.037 | Info  | DynamicClassTransformer   | 16:Scheduler for Client60097 | Transforming: org/utbot/examples/arrays/ArrayOfObjects 
16:22:57.143 | Info  | DynamicClassTransformer   | 16:Scheduler for Client60097 | Transforming: org/utbot/examples/arrays/ObjectWithPrimitivesClass 
16:22:57.445 | Info  | DynamicClassTransformer   | 22:executor     | Transforming: org/utbot/examples/arrays/ObjectWithPrimitivesClassSucc 
16:23:43.502 | Error | Client                    | 15:ClientSocket | ClientSocket caught processing | java.lang.OutOfMemoryError: Java heap space
	at java.base/java.lang.Integer.valueOf(Integer.java:1059)
	at com.jetbrains.rd.framework.SocketWireKt.readInt32(SocketWire.kt:43)
	at com.jetbrains.rd.framework.SocketWireKt.access$readInt32(SocketWire.kt:1)
	at com.jetbrains.rd.framework.SocketWire$Base$PkgInputStream.read(SocketWire.kt:227)
	at com.jetbrains.rd.framework.SocketWireKt.readInt32(SocketWire.kt:37)
	at com.jetbrains.rd.framework.SocketWireKt.access$readInt32(SocketWire.kt:1)
	at com.jetbrains.rd.framework.SocketWire$Base.readMsg(SocketWire.kt:197)
	at com.jetbrains.rd.framework.SocketWire$Base.receiverProc(SocketWire.kt:178)
	at com.jetbrains.rd.framework.SocketWire$Base.access$receiverProc(SocketWire.kt:75)
	at com.jetbrains.rd.framework.SocketWire$Base$2.invoke(SocketWire.kt:122)
	at com.jetbrains.rd.framework.SocketWire$Base$2.invoke(SocketWire.kt:106)
	at com.jetbrains.rd.util.reactive.Signal.fire(Signal.kt:32)
	at com.jetbrains.rd.util.reactive.OptProperty.set(Property.kt:40)
	at com.jetbrains.rd.framework.SocketWire$Client$thread$1.invoke(SocketWire.kt:396)
	at com.jetbrains.rd.framework.SocketWire$Client$thread$1.invoke(SocketWire.kt:370)
	at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)

2455552591612723164-1.log

Environment

Windows 10 Pro
IntelliJ IDEA 2022.2.3
Gradle project (UTBotJava)
JDK 11

@alisevych
Copy link
Member Author

Reproducing on build from release branch in IDEA 2022.2.3
But now there are no exceptions in concrete executor logs. Only error test in test class.

@alisevych alisevych added this to the 2022.12 Release milestone Nov 8, 2022
@denis-fokin denis-fokin removed this from the 2022.12 Release milestone Dec 21, 2022
@Domonion
Copy link
Collaborator

Tests are generated on latest main. @alisevych

@alisevych alisevych self-assigned this Jan 27, 2023
@alisevych
Copy link
Member Author

@Domonion Reproducing with StringExamples.isStringBuilderEmpty

@Domonion
Copy link
Collaborator

Cannot reproduce still, latest main.

@alisevych
Copy link
Member Author

alisevych commented Jan 30, 2023

There are different concrete execution errors for StringExamples:

  • isStringBuilderEmpty
  • nullableStringBuffer
  • stringBuilderAsParameterExample

Test are generated. But Errors reports are present. Exceptions in utbot-instrumentedprocess-errors are different:

17:23:26.565 | ERROR | InstrumentedProcess       |  | org.utbot.instrumentation.instrumentation.execution.phases.ExecutionPhaseError: PostprocessingPhase
	at org.utbot.instrumentation.instrumentation.execution.phases.PostprocessingPhase.wrapError(PostprocessingPhase.kt:21)
	at org.utbot.instrumentation.instrumentation.execution.phases.ExecutionPhaseKt.start(ExecutionPhase.kt:29)
	at org.utbot.instrumentation.instrumentation.execution.UtExecutionInstrumentation.invoke(UtExecutionInstrumentation.kt:147)
	at org.utbot.instrumentation.instrumentation.execution.UtExecutionInstrumentation.invoke(UtExecutionInstrumentation.kt:48)
	at org.utbot.instrumentation.process.InstrumentedProcessMainKt$setup$2.invoke(InstrumentedProcessMain.kt:151)
	at org.utbot.instrumentation.process.InstrumentedProcessMainKt$setup$2.invoke(InstrumentedProcessMain.kt:147)
	at org.utbot.rd.IdleWatchdog$wrapActiveCall$1$1.invoke(ClientProcessUtil.kt:96)
	at org.utbot.rd.IdleWatchdog.wrapActive(ClientProcessUtil.kt:83)
	at org.utbot.rd.IdleWatchdog$wrapActiveCall$1.invoke(ClientProcessUtil.kt:95)
	at com.jetbrains.rd.framework.IRdEndpoint$set$1.invoke(TaskInterfaces.kt:182)
	at com.jetbrains.rd.framework.IRdEndpoint$set$1.invoke(TaskInterfaces.kt:173)
	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:12)
	at com.jetbrains.rd.framework.impl.ProtocolContexts.readMessageContextAndInvoke(ProtocolContexts.kt:151)
	at com.jetbrains.rd.framework.MessageBroker$invoke$2.invoke(MessageBroker.kt:56)
	at com.jetbrains.rd.framework.MessageBroker$invoke$2.invoke(MessageBroker.kt:12)
	at com.jetbrains.rd.util.threading.SingleThreadSchedulerBase$queue$1.run(SingleThreadScheduler.kt:41)
	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.NullPointerException
	at org.utbot.instrumentation.instrumentation.execution.phases.PostprocessingPhase.getSavedStatics(PostprocessingPhase.kt:16)
	at org.utbot.instrumentation.instrumentation.execution.phases.PostprocessingPhase.resetStaticFields(PostprocessingPhase.kt:24)
	at org.utbot.instrumentation.instrumentation.execution.UtExecutionInstrumentation$invoke$1$4.invoke(UtExecutionInstrumentation.kt:148)
	at org.utbot.instrumentation.instrumentation.execution.UtExecutionInstrumentation$invoke$1$4.invoke(UtExecutionInstrumentation.kt:147)
	at org.utbot.instrumentation.instrumentation.execution.phases.ExecutionPhaseKt.start(ExecutionPhase.kt:24)
	... 19 more

Domonion added a commit that referenced this issue Feb 2, 2023
Npe fix in for #1292 -
#1292 (comment),
but this is not fix
Domonion added a commit that referenced this issue Feb 2, 2023
Npe fix in for #1292 -
#1292 (comment),
but this is not fix
Domonion added a commit that referenced this issue Feb 2, 2023
[utbot-rider]
Npe fix in for #1292 -
#1292 (comment),
but this is not fix
@Domonion
Copy link
Collaborator

Domonion commented Feb 2, 2023

This issue is an instrance of #1697

@Domonion Domonion assigned Markoutte and unassigned Domonion Feb 2, 2023
tamarinvs19 pushed a commit that referenced this issue Feb 6, 2023
[utbot-rider]
Npe fix in for #1292 -
#1292 (comment),
but this is not fix
@alisevych alisevych added the comp-fuzzing Issue is related to the fuzzing label Feb 28, 2023
@alisevych
Copy link
Member Author

Closing it as a subcase of #1697

@alisevych alisevych closed this as not planned Won't fix, can't repro, duplicate, stale May 15, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in UTBot Java May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-fuzzing Issue is related to the fuzzing ctg-bug Issue is a bug
Projects
Archived in project
Development

No branches or pull requests

5 participants