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

Unexpected IO Error (Not a directory) on macOS #10618

Closed
Tracked by #12665
RNabel opened this issue Jan 20, 2020 · 3 comments
Closed
Tracked by #12665

Unexpected IO Error (Not a directory) on macOS #10618

RNabel opened this issue Jan 20, 2020 · 3 comments
Assignees
Labels
P2 We'll consider working on this in future. (Assignee optional) team-Remote-Exec Issues and PRs for the Execution (Remote) team type: bug

Comments

@RNabel
Copy link
Contributor

RNabel commented Jan 20, 2020

Description of the problem / feature request:

Bazel server crashing with IOException when building a descriptor set with --remote_download_outputs=toplevel et al. enabled.

Feature requests: what underlying problem are you trying to solve with this feature?

IOException crash.

Stack trace:

Couldn't build file <target>-descriptor-set.proto.bin: Generating Descriptor Set proto_library <target> failed due to unexpected I/O exception: /private/var/tmp/_bazel_<user>/b6b989c6d3681c6cb6a4a268dfbe97f5/execroot/__main__/bazel-out/<cpu>/bin/<package>/_virtual_imports/<target name>/<relative .proto path with stripped prefix> (Not a directory)
--
  | java.io.IOException: /private/var/tmp/_bazel_<user>/b6b989c6d3681c6cb6a4a268dfbe97f5/execroot/__main__/bazel-out/<cpu>/bin/<package>/_virtual_imports/<target name>/<relative .proto path with stripped prefix> (Not a directory)
  | at com.google.devtools.build.lib.unix.NativePosixFiles.readdir(Native Method)
  | at com.google.devtools.build.lib.unix.NativePosixFiles.readdir(NativePosixFiles.java:283)
  | at com.google.devtools.build.lib.unix.UnixFileSystem.readdir(UnixFileSystem.java:160)
  | at com.google.devtools.build.lib.vfs.Path.readdir(Path.java:384)
  | at com.google.devtools.build.lib.remote.merkletree.DirectoryTreeBuilder.explodeDirectory(DirectoryTreeBuilder.java:135)
  | at com.google.devtools.build.lib.remote.merkletree.DirectoryTreeBuilder.explodeDirectory(DirectoryTreeBuilder.java:128)
  | at com.google.devtools.build.lib.remote.merkletree.DirectoryTreeBuilder.fromActionInputs(DirectoryTreeBuilder.java:99)
  | at com.google.devtools.build.lib.remote.merkletree.DirectoryTreeBuilder.fromActionInputs(DirectoryTreeBuilder.java:47)
  | at com.google.devtools.build.lib.remote.merkletree.MerkleTree.build(MerkleTree.java:123)
  | at com.google.devtools.build.lib.remote.RemoteSpawnCache.lookup(RemoteSpawnCache.java:130)
  | at com.google.devtools.build.lib.exec.AbstractSpawnStrategy.exec(AbstractSpawnStrategy.java:117)
  | at com.google.devtools.build.lib.exec.AbstractSpawnStrategy.exec(AbstractSpawnStrategy.java:87)
  | at com.google.devtools.build.lib.actions.SpawnActionContext.beginExecution(SpawnActionContext.java:41)
  | at com.google.devtools.build.lib.exec.ProxySpawnActionContext.beginExecution(ProxySpawnActionContext.java:60)
  | at com.google.devtools.build.lib.analysis.actions.SpawnAction.beginExecution(SpawnAction.java:332)
  | at com.google.devtools.build.lib.actions.Action.execute(Action.java:123)
  | at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$4.execute(SkyframeActionExecutor.java:905)
  | at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$ActionRunner.continueAction(SkyframeActionExecutor.java:1040)
  | at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor$ActionRunner.run(SkyframeActionExecutor.java:1011)
  | at com.google.devtools.build.lib.skyframe.ActionExecutionState.runStateMachine(ActionExecutionState.java:116)
  | at com.google.devtools.build.lib.skyframe.ActionExecutionState.getResultOrDependOnFuture(ActionExecutionState.java:77)
  | at com.google.devtools.build.lib.skyframe.SkyframeActionExecutor.executeAction(SkyframeActionExecutor.java:589)
  | at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.checkCacheAndExecuteIfNeeded(ActionExecutionFunction.java:902)
  | at com.google.devtools.build.lib.skyframe.ActionExecutionFunction.compute(ActionExecutionFunction.java:292)
  | at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:454)
  | at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:399)
  | 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)


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

This happens flakily.

Flags: remote cache + --remote_download_outputs=toplevel --experimental_inmemory_jdeps_files --experimental_inmemory_dotd_files --nobuild_runfile_links

The proto_library target has direct and transitive dependencies which all use the strip_prefix parameter.

What operating system are you running Bazel on?

macOS 10.14.6

What's the output of bazel info release?

release 2.0.0

Have you found anything relevant by searching the web?

Likely related: #4751, but the stack trace looks very different.

@jin jin added z-team-Apple Deprecated. Send to rules_apple, or label team-Rules-CPP + platform:apple untriaged labels Jan 23, 2020
@tetromino
Copy link
Contributor

Sanity check: in your stack trace, are <target>, <user>, <cpu>, <package>, <target name>, and <relative .proto path with stripped prefix> all placeholders to hide internal code; the angle brackets etc. are not literally in the stack trace, right?

@jmmv jmmv added team-Remote-Exec Issues and PRs for the Execution (Remote) team and removed z-team-Apple Deprecated. Send to rules_apple, or label team-Rules-CPP + platform:apple labels Jan 23, 2020
@RNabel
Copy link
Contributor Author

RNabel commented Jan 24, 2020

@tetromino Correct, those are placeholders only and there are no angled brackets in the stack trace.

@coeuvre coeuvre added P2 We'll consider working on this in future. (Assignee optional) type: bug and removed untriaged labels Dec 9, 2020
@coeuvre coeuvre self-assigned this Dec 9, 2020
@coeuvre
Copy link
Member

coeuvre commented Oct 21, 2022

I think this is fixed with recent development. Free feel to reopen if it sill happens to you on latest version.

@coeuvre coeuvre closed this as completed Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 We'll consider working on this in future. (Assignee optional) team-Remote-Exec Issues and PRs for the Execution (Remote) team type: bug
Projects
None yet
Development

No branches or pull requests

5 participants