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.78k stars 545 forks source link

[dist] failed compiles with certain crates #459

Open drahnr opened 5 years ago

drahnr commented 5 years ago

Running cargo install amp fails with

ERROR 2019-06-22T08:40:17Z: sccache::server: frame size too big

commonly during compiling syntex_syntax on the sccache client side server.

#...
error: failed to execute compile
caused by: error reading compile response from server
caused by: Failed to read response header
caused by: failed to fill whole buffer
error: Could not compile `syntex_syntax`.

Caused by:
  process didn't exit successfully: `/home/bernhard/.cargo/bin/sccache rustc --crate-name syntex_syntax /home/bernhard/.cargo/registry/src/github.com-1ecc6299db9ec823/syntex_syntax-0.58.1/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=90c94cfaaae17a7a -C extra-filename=-90c94cfaaae17a7a --out-dir /home/bernhard/Projects/amp/target/debug/deps -L dependency=/home/bernhard/Projects/amp/target/debug/deps --extern bitflags=/home/bernhard/Projects/amp/target/debug/deps/libbitflags-0256e6d00b77c606.rlib --extern log=/home/bernhard/Projects/amp/target/debug/deps/liblog-588145bbe7fe5cf8.rlib --extern rustc_serialize=/home/bernhard/Projects/amp/target/debug/deps/librustc_serialize-0a962096d98c8a0d.rlib --extern syntex_errors=/home/bernhard/Projects/amp/target/debug/deps/libsyntex_errors-5011a41b7245a794.rlib --extern syntex_pos=/home/bernhard/Projects/amp/target/debug/deps/libsyntex_pos-8e45cb13ab260d3b.rlib --extern unicode_xid=/home/bernhard/Projects/amp/target/debug/deps/libunicode_xid-9f31982208d988c7.rlib --cap-lints allow` (exit code: 2)

Fedora x86_64 client/server/scheduler hosts.

$ sccache -s

Compile requests                         15
Compile requests executed                15
Cache hits                               13
Cache hits (Rust)                        13
Cache misses                              2
Cache misses (Rust)                       2
Cache timeouts                            0
Cache read errors                         0
Forced recaches                           0
Cache write errors                        0
Compilation failures                      0
Cache errors                              0
Non-cacheable compilations                0
Non-cacheable calls                       0
Non-compilation calls                     0
Unsupported compiler calls                0
Successful distributed compilations       2
Failed distributed compilations           0
Average cache write                   0.352 s
Average cache read miss               4.886 s
Average cache read hit                1.190 s
Cache location                      Redis: redis://myredis:78910/101
Cache size                              311 MiB
doronbehar commented 5 years ago

Seems the same as #452, I'm affected by this issue when trying to build sequoia, using a local cache storage.

drahnr commented 5 years ago

Seems the same as #452, I'm affected by this issue when trying to build sequoia, using a local cache storage.

The above still happens when applying the mentioned workaround of #452 - so I'd like to understand what is happening before marking this as a duplicate of #452 (or vice versa)

glandium commented 4 years ago

I think it's different from #452, but similar to what I was about to file, which is that when the stderr output from a compilation is too large, sccache::server: frame size too big happens. It actually doesn't need dist, it happens with non-distributed. For instance, it happens when building the dns-parse crate with rustc 1.43.

glandium commented 4 years ago

A workaround is to set SCCACHE_MAX_FRAME_LENGTH to a large value in the environment.