intellij-kubernetes
intellij-kubernetes copied to clipboard
Kubernetes by Red Hat (1.5.0.8) locks up entire editor for 30+ seconds
related to #865
As title, if i open a k8 manifest file whilst authenitcation to my current cluster has expired. It locks up my whole editor. Intellij becomes completely non responsive. I can make intellij respond again if i login in my terminal. Additionally it locks up if i am not on VPN.
Error from the IDE Internal Errors window:
Freeze for 30 seconds
Sampled time: 9400ms, sampling rate: 100ms, GC time: 1670ms (6%), Class loading: 0%, cpu load: 1%
The stack is from the thread that was blocking EDT
com.intellij.diagnostic.Freeze
at [email protected]/jdk.internal.misc.Unsafe.park(Native Method)
at [email protected]/java.util.concurrent.locks.LockSupport.park(LockSupport.java:221)
at [email protected]/java.util.concurrent.CompletableFuture$Signaller.block(CompletableFuture.java:1864)
at [email protected]/java.util.concurrent.ForkJoinPool.unmanagedBlock(ForkJoinPool.java:4013)
at [email protected]/java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3961)
at [email protected]/java.util.concurrent.CompletableFuture.waitingGet(CompletableFuture.java:1898)
at [email protected]/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2072)
at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.waitForResult(OperationSupport.java:491)
at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.handleResponse(OperationSupport.java:524)
at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.restCall(OperationSupport.java:693)
at io.fabric8.kubernetes.client.impl.BaseClient.getApiResources(BaseClient.java:307)
at com.redhat.devtools.intellij.kubernetes.model.resource.APIResources.get(APIResources.kt:37)
at com.redhat.devtools.intellij.kubernetes.model.resource.NonCachingSingleResourceOperator.getAPIResource(NonCachingSingleResourceOperator.kt:229)
at com.redhat.devtools.intellij.kubernetes.model.resource.NonCachingSingleResourceOperator.getAPIResource(NonCachingSingleResourceOperator.kt:195)
at com.redhat.devtools.intellij.kubernetes.model.resource.NonCachingSingleResourceOperator.createResourceDefinitionContext(NonCachingSingleResourceOperator.kt:180)
at com.redhat.devtools.intellij.kubernetes.model.resource.NonCachingSingleResourceOperator.createOperation(NonCachingSingleResourceOperator.kt:162)
at com.redhat.devtools.intellij.kubernetes.model.resource.NonCachingSingleResourceOperator.get(NonCachingSingleResourceOperator.kt:66)
at com.redhat.devtools.intellij.kubernetes.model.context.ActiveContext.get(ActiveContext.kt:266)
at com.redhat.devtools.intellij.kubernetes.editor.ClusterResource.requestResource(ClusterResource.kt:112)
at com.redhat.devtools.intellij.kubernetes.editor.ClusterResource.pull(ClusterResource.kt:104)
at com.redhat.devtools.intellij.kubernetes.editor.ClusterResource.pull$default(ClusterResource.kt:100)
at com.redhat.devtools.intellij.kubernetes.editor.ClusterResource.isAuthorized(ClusterResource.kt:212)
at com.redhat.devtools.intellij.kubernetes.editor.EditorResource.isAuthorized(EditorResource.kt:293)
at com.redhat.devtools.intellij.kubernetes.editor.EditorResource.createState(EditorResource.kt:132)
at com.redhat.devtools.intellij.kubernetes.editor.EditorResource.getState(EditorResource.kt:114)
at com.redhat.devtools.intellij.kubernetes.editor.EditorResourceStateKt.FILTER_ERROR$lambda$2(EditorResourceState.kt:23)
at com.redhat.devtools.intellij.kubernetes.editor.EditorResourceStateKt$$Lambda/0x0000000306acf5e0.invoke(Unknown Source)
at com.redhat.devtools.intellij.kubernetes.editor.notification.Notifications.show(Notifications.kt:274)
at com.redhat.devtools.intellij.kubernetes.editor.ResourceEditor.showNotifications(ResourceEditor.kt:130)
at com.redhat.devtools.intellij.kubernetes.editor.ResourceEditor.update$lambda$4(ResourceEditor.kt:109)
at com.redhat.devtools.intellij.kubernetes.editor.ResourceEditor$$Lambda/0x00000003065f26c0.invoke(Unknown Source)
at com.redhat.devtools.intellij.kubernetes.editor.ResourceEditor.runAsync$lambda$24(ResourceEditor.kt:407)
at com.redhat.devtools.intellij.kubernetes.editor.ResourceEditor$$Lambda/0x00000003065f1b80.run(Unknown Source)
at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport$executeOnPooledThread$1.run(AnyThreadWriteThreadingSupport.kt:167)
at [email protected]/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
at com.intellij.util.concurrency.ContextCallable.lambda$call$1(ContextCallable.java:85)
at com.intellij.util.concurrency.ContextCallable$$Lambda/0x0000000301602370.get(Unknown Source)
at com.intellij.util.concurrency.ContextCallable.call(ContextCallable.java:94)
at [email protected]/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at com.intellij.util.concurrency.ChildContext$runInChildContext$1.invoke(propagation.kt:103)
at com.intellij.util.concurrency.ChildContext$runInChildContext$1.invoke(propagation.kt:103)
at com.intellij.util.concurrency.ChildContext.runInChildContext(propagation.kt:109)
at com.intellij.util.concurrency.ChildContext.runInChildContext(propagation.kt:103)
at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java:27)
at [email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at [email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at [email protected]/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:735)
at [email protected]/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:732)
at [email protected]/java.security.AccessController.executePrivileged(AccessController.java:778)
at [email protected]/java.security.AccessController.doPrivileged(AccessController.java:400)
at [email protected]/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:732)
at [email protected]/java.lang.Thread.runWith(Thread.java:1596)
at [email protected]/java.lang.Thread.run(Thread.java:1583)
Hi @megamit,
Sorry for the late reply. Thanks for reporting! This is very serious. We'll try to tackle in the next sprint. I'll keep you posted.
Hi @megamit, I unfortunately cannot replicate what you experience. I am wondering what your cluster responds with when asked about api resources (that's the call in your stacktrace). If I do
$ kubectl get --raw /apis/apps/v1
I get 401 Unauthorized back from my OpenShift cluster. The plugin thus is not blocking waiting for it.
Can you please report what you get from your cluster? I'd be especially interested in knowing if it takes a fair amount of time or if it's quick.
I suspect that the plugin is waiting & retrying for too long. Even though this is done in the background, operations in the display thread then get blocking waiting for it. All I can do for now is to force less retries and smaller timeouts. I'll identify what display thread operations get blocked because they are waiting for the api request.
@megamit: once I have a possible fix, I'd love you to test it if I hand you a plugin to manually install. Would that be possible to you? Thanks in advance.
In #865 I enforce timeouts and provide further fixes in #869. Crossing fingers that those would fix your issue, too. Those should be available very soon with a new release 1.6.0
I cannot reproduce this issue but I'm confident that #865 and #869 solved this. @megamit: I'm closing this issue as resolved. Please feel free to reopen it if you still experience it.