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

'cannot prefetch a directory' crash #17186

Closed
keith opened this issue Jan 10, 2023 · 3 comments
Closed

'cannot prefetch a directory' crash #17186

keith opened this issue Jan 10, 2023 · 3 comments
Assignees
Labels
team-Remote-Exec Issues and PRs for the Execution (Remote) team type: bug untriaged

Comments

@keith
Copy link
Member

keith commented Jan 10, 2023

Description of the bug:

Using HEAD bazel and build without the bytes (I assume that's related), we've started seeing this crash.

(12:11:39) FATAL: bazel crashed due to an internal error. Printing stack trace:
java.lang.RuntimeException: Unrecoverable error while evaluating node 'ActionLookupData{actionLookupKey=ConfiguredTargetKey{label=//Modules/ResourceSupport:ResourceSupportTests.__internal__.__test_bundle, config=BuildConfigurationKey[f8cc4d30b745f358f412b4c4b1f79432498fe02f6a0c5d873539031775299854]}, actionIndex=10}' (requested by nodes 'File:[[<execution_root>]bazel-out/applebin_ios-ios_x86_64-fastbuild-ST-5f721879e0e1/bin]Modules/ResourceSupport/ResourceSupportTests.xctest')
	at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:680)
	at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:382)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: cannot prefetch a directory
	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145)
	at com.google.devtools.build.lib.remote.AbstractActionInputPrefetcher.prefetchFiles(AbstractActionInputPrefetcher.java:186)
	at com.google.devtools.build.lib.remote.AbstractActionInputPrefetcher.prefetchFiles(AbstractActionInputPrefetcher.java:176)
	at com.google.devtools.build.lib.exec.AbstractSpawnStrategy$SpawnExecutionContextImpl.prefetchInputs(AbstractSpawnStrategy.java:248)
	at com.google.devtools.build.lib.exec.SpawnRunner$SpawnExecutionContext.prefetchInputsAndWait(SpawnRunner.java:165)
	at com.google.devtools.build.lib.exec.local.LocalSpawnRunner.exec(LocalSpawnRunner.java:145)
	at com.google.devtools.build.lib.exec.AbstractSpawnStrategy.exec(AbstractSpawnStrategy.java:152)
	at com.google.devtools.build.lib.exec.AbstractSpawnStrategy.exec(AbstractSpawnStrategy.java:112)
	at com.google.devtools.build.lib.exec.SpawnStrategyResolver.exec(SpawnStrategyResolver.java:45)
	at com.google.devtools.build.lib.analysis.actions.SpawnAction.execute(SpawnAction.java:342)
	at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$ActionRunner.executeAction(SkyframeActionExecutor.java:1082)
	at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$ActionRunner.run(SkyframeActionExecutor.java:1003)
	at com.google.devtools.build.lib.skyframe.ActionExecutionState.runStateMachine(ActionExecutionState.java:160)
	at com.google.devtools.build.lib.skyframe.ActionExecutionState.getResultOrDependOnFuture(ActionExecutionState.java:93)
	at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor.executeAction(SkyframeActionExecutor.java:516)
	at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.checkCacheAndExecuteIfNeeded(ActionExecutionFunction.java:827)
	at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.computeInternal(ActionExecutionFunction.java:323)
	at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.compute(ActionExecutionFunction.java:161)
	at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:591)
	... 4 more

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

Diff: e7be4b1...9860051

Culprit 763f966

@tjgq what is the suggested workaround in this case? I suppose we've been using this for a while successfully

Which operating system are you running Bazel on?

macOS

What is the output of bazel info release?

9860051

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

last_green with bazelisk.

What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?

No response

Have you found anything relevant by searching the web?

No response

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

No response

@brentleyjones
Copy link
Contributor

Probably fixed by #17183?

@keith
Copy link
Member Author

keith commented Jan 10, 2023

ah probably, nice timing, i'll verify after it lands

@ShreeM01 ShreeM01 added type: bug untriaged team-Remote-Exec Issues and PRs for the Execution (Remote) team labels Jan 10, 2023
@tjgq tjgq self-assigned this Jan 17, 2023
@tjgq
Copy link
Contributor

tjgq commented Jan 17, 2023

Sorry about that @keith! As @brentleyjones said, it should have been fixed by 4c57def. Please reopen otherwise.

@tjgq tjgq closed this as completed Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Remote-Exec Issues and PRs for the Execution (Remote) team type: bug untriaged
Projects
None yet
Development

No branches or pull requests

4 participants