mozilla / sccache

Sccache is a ccache-like tool. It is used as a compiler wrapper and avoids compilation when possible. Sccache has the capability to utilize caching in remote storage environments, including various cloud storage options, or alternatively, in local storage.
Apache License 2.0
5.85k stars 552 forks source link

bwrap: Can\'t find source path /home/sccache/build/builds/[ID]/target: Permission denied #534

Open cr opened 5 years ago

cr commented 5 years ago

After finding the fix for #531 the same system seems to be working on some compile jobs now, but among the trace there are other errors now. It looks like there's a permission issue around the target folder and (possibly as a result) bubblewrap trying to access non-existing MacOS user paths:

TRACE 2019-10-09T14:51:59Z: sccache_dist::build: compile_output: Output { status: ExitStatus(ExitStatus(256)), stdout: "", stderr: "bwrap: Can\'t find source path /home/sccache/build/builds/85832d30d43683eac2f22f69c3ca00c6a2d1b1c218fd396de414450e0
9ebf0ad582a7274b904641974294cc7f099241268a6cee1afa12ff2c470dbea5ed8ea0d-167/target: Permission denied\n" }
TRACE 2019-10-09T14:51:59Z: sccache_dist::build: retrieving ["/Users/tomtung/Work/mozilla-central/objdir/dom/base/Unified_cpp_dom_base2.o"]
DEBUG 2019-10-09T14:51:59Z: sccache_dist::build: Missing output path "/Users/tomtung/Work/mozilla-central/objdir/dom/base/Unified_cpp_dom_base2.o"
DEBUG 2019-10-09T14:51:59Z: sccache_dist::build: Finishing with overlay
TRACE 2019-10-09T14:51:59Z: sccache_dist::build: creating output directories
TRACE 2019-10-09T14:51:59Z: sccache_dist::build: performing compile
DEBUG 2019-10-09T14:51:59Z: sccache_dist::build: Returning result
TRACE 2019-10-09T14:51:59Z: sccache::dist::http::server: Res 336: Response { status_code: 200, headers: [("Content-Type", "application/octet-stream")] }
cr commented 5 years ago

I might have solved this problem by chmod go+rx /home/sccache, because that was still mode 0700. Would be strange though if a root process can't step into that user directory.

However, this error remains:

Output { status: ExitStatus(ExitStatus(256)), stdout: "", stderr: "bwrap: Can\'t chdir to /Users/tomtung/Work/mozilla-central/objdir/gfx/thebes: Permission denied\n" }
Logarithmus commented 3 years ago

@cr how did you solve it? I'm struggling with it too!