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

Flood of stack traces from ArtifactLocationDecoderImpl #6309

Closed
odisseus opened this issue Mar 21, 2024 · 0 comments
Closed

Flood of stack traces from ArtifactLocationDecoderImpl #6309

odisseus opened this issue Mar 21, 2024 · 0 comments
Assignees
Labels
awaiting-maintainer Awaiting review from Bazel team on issues product: CLion CLion plugin type: bug

Comments

@odisseus
Copy link
Contributor

odisseus commented Mar 21, 2024

Description of the bug:

When I reload my project, the idea.log gets flooded with thousands of identical stack traces. In my particular project (about 20 thousand source files), each reload produces more than 100 megabytes of logs, which consist of the same stack trace repeated thousands of times (only the file path changes). Not only does this cause a noticeable performance drop, but it also wipes all other logs which could have pointed to the underlying issue with my project.

I'm not sure about the root cause of these stack traces (might as well be a problem with my project definition), but my concern here is the sheer amount of them.

Which category does this issue belong to?

CLion

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

No response

Which Intellij IDE are you using? Please provide the specific version.

CLion 2023.3.4

What programming languages and tools are you using? Please provide specific versions.

Python 3

What Bazel plugin version are you using?

Locally built, commit 5cfa0ff

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

2024-03-07 04:37:52,191 [  96247]   WARN - #com.google.idea.blaze.base.sync.workspace.ArtifactLocationDecoderImpl - Failed to resolve real path for external/foo_bar/site-packages/bar.py
java.nio.file.NoSuchFileException: /home/.cache/bazel/_bazel_user/0916fad4deef55e769a5c33929ab8825/execroot/baz/external/foo_bar/site-packages/bar.py
	at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
	at java.base/sun.nio.fs.UnixPath.toRealPath(UnixPath.java:825)
	at com.google.idea.blaze.base.sync.workspace.ArtifactLocationDecoderImpl.tryToResolveExternalArtifactToMainWorkspace(ArtifactLocationDecoderImpl.java:96)
	at com.google.idea.blaze.base.sync.workspace.ArtifactLocationDecoderImpl.decode(ArtifactLocationDecoderImpl.java:78)
	at com.google.idea.blaze.base.sync.workspace.ArtifactLocationDecoderImpl.outputArtifactFromExecRoot(ArtifactLocationDecoderImpl.java:143)
	at com.google.idea.blaze.base.sync.workspace.ArtifactLocationDecoderImpl.resolveOutput(ArtifactLocationDecoderImpl.java:57)
	at com.google.idea.blaze.base.command.buildresult.OutputArtifactResolver.resolve(OutputArtifactResolver.java:53)
	at com.google.idea.blaze.python.resolve.provider.AbstractPyImportResolverStrategy.lambda$psiProviderFromArtifact$0(AbstractPyImportResolverStrategy.java:120)
	at com.google.idea.blaze.python.resolve.provider.AbstractPyImportResolverStrategy.resolveFromSyncData(AbstractPyImportResolverStrategy.java:62)
	at com.google.idea.blaze.python.resolve.PyDynamicImportResolverInitializer.lambda$registerImportResolvers$0(PyDynamicImportResolverInitializer.java:51)
	at com.jetbrains.python.psi.resolve.PyResolveImportUtil$foreignResults$1.invoke(PyResolveImportUtil.kt:198)
	at com.jetbrains.python.psi.resolve.PyResolveImportUtil$foreignResults$1.invoke(PyResolveImportUtil.kt:198)
	at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)
	at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:170)
	at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:194)
	at kotlin.sequences.SequencesKt___SequencesKt.toCollection(_Sequences.kt:787)
	at kotlin.sequences.SequencesKt___SequencesKt.toMutableList(_Sequences.kt:817)
	at kotlin.sequences.SequencesKt___SequencesKt.toList(_Sequences.kt:808)
	at com.jetbrains.python.psi.resolve.PyResolveImportUtil.foreignResults(PyResolveImportUtil.kt:200)
	at com.jetbrains.python.psi.resolve.PyResolveImportUtil.resolveQualifiedName(PyResolveImportUtil.kt:73)
	at com.jetbrains.python.psi.resolve.ResolveImportUtil.lambda$calculateResolveModule$1(ResolveImportUtil.java:185)
	at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:110)
	at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:27)
	at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:65)
	at com.jetbrains.python.psi.resolve.ResolveImportUtil.calculateResolveModule(ResolveImportUtil.java:177)
	at com.jetbrains.python.psi.PyUtil.getNullableParameterizedCachedValue(PyUtil.java:670)
	at com.jetbrains.python.psi.PyUtil.getParameterizedCachedValue(PyUtil.java:648)
	at com.jetbrains.python.psi.resolve.ResolveImportUtil.resolveModule(ResolveImportUtil.java:166)
	at com.jetbrains.python.psi.resolve.ResolveImportUtil.resolveFromImportStatementSource(ResolveImportUtil.java:147)
	at com.jetbrains.python.psi.impl.PyFromImportStatementImpl.resolveImportSourceCandidates(PyFromImportStatementImpl.java:251)
	at com.jetbrains.python.psi.resolve.ResolveImportUtil.resolveNameInFromImport(ResolveImportUtil.java:125)
	at com.jetbrains.python.psi.resolve.ResolveImportUtil.multiResolveImportElement(ResolveImportUtil.java:104)
	at com.jetbrains.python.psi.impl.PyImportElementImpl.multiResolve(PyImportElementImpl.java:237)
	at com.jetbrains.python.psi.impl.PyImportElementImpl.getElementsNamed(PyImportElementImpl.java:218)
	at com.jetbrains.python.psi.impl.PyImportElementImpl.multiResolveName(PyImportElementImpl.java:189)
	at com.jetbrains.python.psi.resolve.PyResolveProcessor.resolveInImportedNameDefiner(PyResolveProcessor.java:96)
	at com.jetbrains.python.psi.resolve.PyResolveProcessor.execute(PyResolveProcessor.java:48)
	at com.jetbrains.python.psi.impl.PyFileImpl$ExportedNameCache.multiResolve(PyFileImpl.java:144)
	at com.jetbrains.python.psi.impl.PyFileImpl.lambda$multiResolveName$1(PyFileImpl.java:417)
	at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:110)
	at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:27)
	at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:65)
	at com.jetbrains.python.psi.impl.PyFileImpl.multiResolveName(PyFileImpl.java:416)
	at com.jetbrains.python.pyi.PyiFile.multiResolveName(PyiFile.kt:45)
	at com.jetbrains.python.psi.resolve.PyResolveUtil.doResolveQualifiedNameInScope(PyResolveUtil.java:249)
	at com.jetbrains.python.psi.resolve.PyResolveUtil.lambda$resolveQualifiedNameInScope$4(PyResolveUtil.java:231)
	at com.jetbrains.python.psi.PyUtil.getNullableParameterizedCachedValue(PyUtil.java:670)
	at com.jetbrains.python.psi.PyUtil.getParameterizedCachedValue(PyUtil.java:648)
	at com.jetbrains.python.psi.resolve.PyResolveUtil.resolveQualifiedNameInScope(PyResolveUtil.java:230)
	at com.jetbrains.python.codeInsight.typing.PyTypingTypeProvider.tryResolvingOnStubs(PyTypingTypeProvider.java:1687)
	at com.jetbrains.python.codeInsight.typing.PyTypingTypeProvider.tryResolvingWithAliases(PyTypingTypeProvider.java:1644)
	at com.jetbrains.python.codeInsight.typing.PyTypingTypeProvider.getType(PyTypingTypeProvider.java:704)
	at com.jetbrains.python.codeInsight.typing.PyTypingTypeProvider.getTypeFromBitwiseOrOperator(PyTypingTypeProvider.java:727)
	at com.jetbrains.python.codeInsight.typing.PyTypingTypeProvider.getTypeFromBinaryExpression(PyTypingTypeProvider.java:912)
	at com.jetbrains.python.codeInsight.typing.PyTypingTypeProvider.getTypeForResolvedElement(PyTypingTypeProvider.java:874)
	at com.jetbrains.python.codeInsight.typing.PyTypingTypeProvider.getType(PyTypingTypeProvider.java:705)
	at com.jetbrains.python.codeInsight.typing.PyTypingTypeProvider.getTypeFromBitwiseOrOperator(PyTypingTypeProvider.java:726)
	at com.jetbrains.python.codeInsight.typing.PyTypingTypeProvider.getTypeFromBinaryExpression(PyTypingTypeProvider.java:912)
	at com.jetbrains.python.codeInsight.typing.PyTypingTypeProvider.getTypeForResolvedElement(PyTypingTypeProvider.java:874)
	at com.jetbrains.python.codeInsight.typing.PyTypingTypeProvider.getType(PyTypingTypeProvider.java:705)
	at com.jetbrains.python.codeInsight.typing.PyTypingTypeProvider.getParameterType(PyTypingTypeProvider.java:263)
	at com.jetbrains.python.codeInsight.typing.PyTypingTypeProvider.getParameterType(PyTypingTypeProvider.java:55)
	at com.jetbrains.python.codeInsight.typing.PyTypeProviderWithCustomContext.lambda$getParameterType$2(PyTypeProviderWithCustomContext.java:45)
	at com.jetbrains.python.codeInsight.typing.PyTypingTypeProvider.staticWithCustomContext(PyTypingTypeProvider.java:1869)
	at com.jetbrains.python.codeInsight.typing.PyTypingTypeProvider.withCustomContext(PyTypingTypeProvider.java:1858)
	at com.jetbrains.python.codeInsight.typing.PyTypeProviderWithCustomContext.getParameterType(PyTypeProviderWithCustomContext.java:44)
	at com.jetbrains.python.psi.impl.PyNamedParameterImpl.getType(PyNamedParameterImpl.java:231)
	at com.jetbrains.python.psi.types.TypeEvalContext.lambda$getType$0(TypeEvalContext.java:181)
	at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:110)
	at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:27)
	at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:65)
	at com.jetbrains.python.psi.types.TypeEvalContext.getType(TypeEvalContext.java:170)
	at com.jetbrains.python.psi.types.PyCallableParameterImpl.getType(PyCallableParameterImpl.java:121)
	at com.jetbrains.python.psi.impl.PyCallExpressionHelper.isParamSpecOrConcatenate(PyCallExpressionHelper.java:1167)
	at com.jetbrains.python.psi.impl.PyCallExpressionHelper.analyzeArguments(PyCallExpressionHelper.java:1070)
	at com.jetbrains.python.psi.impl.PyCallExpressionHelper.mapArguments(PyCallExpressionHelper.java:876)
	at com.jetbrains.python.psi.impl.PyFunctionImpl.getCallType(PyFunctionImpl.java:223)
	at com.jetbrains.python.psi.impl.PyCallExpressionHelper.clarifyConstructorCallType(PyCallExpressionHelper.java:673)
	at com.jetbrains.python.psi.impl.PyCallExpressionHelper.toCallableType(PyCallExpressionHelper.java:384)
	at com.jetbrains.python.psi.impl.PyCallExpressionHelper.lambda$changeToImplicitlyInvokedMethods$20(PyCallExpressionHelper.java:944)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575)
	at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260)
	at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616)
	at one.util.streamex.AbstractStreamEx.toArray(AbstractStreamEx.java:390)
	at one.util.streamex.AbstractStreamEx.toMutableList(AbstractStreamEx.java:1328)
	at one.util.streamex.AbstractStreamEx.toList(AbstractStreamEx.java:1309)
	at com.jetbrains.python.psi.impl.PyCallExpressionHelper.changeToImplicitlyInvokedMethods(PyCallExpressionHelper.java:946)
	at com.jetbrains.python.psi.impl.PyCallExpressionHelper.getExplicitResolveResults(PyCallExpressionHelper.java:244)
	at com.jetbrains.python.psi.impl.PyCallExpressionHelper.lambda$multiResolveCallee$1(PyCallExpressionHelper.java:192)
	at com.jetbrains.python.psi.PyUtil.getNullableParameterizedCachedValue(PyUtil.java:670)
	at com.jetbrains.python.psi.PyUtil.getParameterizedCachedValue(PyUtil.java:648)
	at com.jetbrains.python.psi.impl.PyCallExpressionHelper.multiResolveCallee(PyCallExpressionHelper.java:188)
	at com.jetbrains.python.psi.impl.PyCallExpressionImpl.multiResolveCallee(PyCallExpressionImpl.java:47)
	at com.jetbrains.python.psi.impl.PyCallExpressionHelper.multiResolveCalleeFunction(PyCallExpressionHelper.java:833)
	at com.jetbrains.python.psi.impl.PyCallExpressionHelper.mapArguments(PyCallExpressionHelper.java:826)
	at com.jetbrains.python.inspections.PyTypeCheckerInspection$Visitor.checkCallSite(PyTypeCheckerInspection.java:260)
	at com.jetbrains.python.inspections.PyTypeCheckerInspection$Visitor.visitPyCallExpression(PyTypeCheckerInspection.java:55)
	at com.jetbrains.python.psi.impl.PyCallExpressionImpl.acceptPyVisitor(PyCallExpressionImpl.java:27)
	at com.jetbrains.python.psi.impl.PyBaseElementImpl.accept(PyBaseElementImpl.java:61)
	at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$10(InspectionRunner.java:334)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1133)
	at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$11(InspectionRunner.java:342)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:201)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:207)
	at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$12(InspectionRunner.java:348)
	at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:159)
	at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:151)
	at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$13(InspectionRunner.java:311)
	at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:130)
	at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:119)
	at com.intellij.codeInsight.daemon.impl.InspectionRunner.lambda$processInOrder$14(InspectionRunner.java:311)
	at com.intellij.concurrency.JobLauncherImpl$1MyProcessQueueTask.lambda$call$0(JobLauncherImpl.java:314)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:61)
	at com.intellij.concurrency.JobLauncherImpl$1MyProcessQueueTask.call(JobLauncherImpl.java:299)
	at com.intellij.concurrency.JobLauncherImpl$1MyProcessQueueTask.call(JobLauncherImpl.java:285)
	at java.base/java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1428)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-maintainer Awaiting review from Bazel team on issues product: CLion CLion plugin type: bug
Projects
None yet
Development

No branches or pull requests

4 participants