Skip to content

Flaky IsolatedProjectsAndroidProjectSyncTest #34866

@6hundreds

Description

@6hundreds

There are two types of timeout for IdeSyncTest:

  • A timeout declared by test
  • A timeout decraled by ide-starter, which is 10min by default, and we don't change it currently.

I assume that timeout declared by test is doesn't really make sense, or at least it should be synchornized with the one in ide-starter.

In the build log of failing instance(may get expired) we see that ide-starter retries to find appropriate java process:

 [12:17:50]: Couldn't find appropriate java process id for pid 706452
 [12:17:50]: Retrying in 3s ...
 [12:17:53]: Couldn't find appropriate java process id for pid 706452
 [12:17:53]: Retrying in 3s ...
 [12:17:56]: Couldn't find appropriate java process id for pid 706452
 [12:17:56]: Last failure:
      java.lang.Exception: There are no suitable candidates for the process
        at com.intellij.ide.starter.process.ProcessUtilsKt.getJavaProcessId(processUtils.kt:172)
        at com.intellij.ide.starter.process.ProcessUtilsKt.access$getJavaProcessId(processUtils.kt:1)
        at com.intellij.ide.starter.process.ProcessUtilsKt$getJavaProcessIdWithRetry$2.invokeSuspend(processUtils.kt:85)
        at com.intellij.ide.starter.process.ProcessUtilsKt$getJavaProcessIdWithRetry$2.invoke(processUtils.kt)
        at com.intellij.ide.starter.process.ProcessUtilsKt$getJavaProcessIdWithRetry$2.invoke(processUtils.kt)
        at com.intellij.tools.ide.util.common.RetryKt.withRetry-gwCluXo(retry.kt:27)
        at com.intellij.tools.ide.util.common.RetryKt$withRetry$1.invokeSuspend(retry.kt)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
        at kotlinx.coroutines.internal.SoftLimitedDispatcher$Worker.run(SoftLimitedDispatcher.kt:125)
        at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:608)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:873)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:763)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:750)
      ERROR: Unhandled exception in [CoroutineName(Test's supervisor scope), Dispatchers.IO]
      java.lang.IllegalArgumentException: Java process id must not be null
        at com.intellij.ide.starter.process.ProcessUtilsKt.getJavaProcessIdWithRetry(processUtils.kt:83)
        at com.intellij.ide.starter.process.ProcessUtilsKt$getJavaProcessIdWithRetry$1.invokeSuspend(processUtils.kt)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
        at kotlinx.coroutines.internal.SoftLimitedDispatcher$Worker.run(SoftLimitedDispatcher.kt:125)
        at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
[12:22:35]:    ... terminating process `run-ide-Sync` because it runs more than  600 seconds ...

after certain count retrying is stopping, and then hanging 5mins to terminate the process by 10min timeout afterwards.

I assume that other runs are able to find correct java process and that's why they're succesfull.

As a thought - it may be corellated with memory somehow, since currently test process has 512m of Xmx, what is maybe not enough for AndroidStudio. Xmx of IDE we can't control currently, but this facility is coming with https://github.com/gradle/gradle-ide-starter/pull/4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions