Open erikh opened 10 months ago
Since I don't know if it's relevant, here's a ldd megalock
on a recent optimized bin because it does link against numerous C shared libraries:
linux-vdso.so.1 (0x00007fff2f555000)
libxkbcommon.so.0 => /usr/lib/libxkbcommon.so.0 (0x00007f97388a4000)
libxkbcommon-x11.so.0 => /usr/lib/libxkbcommon-x11.so.0 (0x00007f973889b000)
libcairo.so.2 => /usr/lib/libcairo.so.2 (0x00007f9738762000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f9738737000)
libxcb-randr.so.0 => /usr/lib/libxcb-randr.so.0 (0x00007f9738725000)
libxcb-image.so.0 => /usr/lib/libxcb-image.so.0 (0x00007f973871f000)
libxcb-xrm.so.0 => /usr/lib/libxcb-xrm.so.0 (0x00007f9738715000)
libxcb-xkb.so.1 => /usr/lib/libxcb-xkb.so.1 (0x00007f97386f6000)
libxcb-util.so.1 => /usr/lib/libxcb-util.so.1 (0x00007f97386ef000)
libpam.so.0 => /usr/lib/libpam.so.0 (0x00007f97386de000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f97386b9000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007f97385cc000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f97383e8000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007f97383ce000)
libpng16.so.16 => /usr/lib/libpng16.so.16 (0x00007f9738394000)
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00007f9738344000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f9738276000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f9738133000)
libXext.so.6 => /usr/lib/libXext.so.6 (0x00007f973811c000)
libXrender.so.1 => /usr/lib/libXrender.so.1 (0x00007f973810f000)
libxcb-render.so.0 => /usr/lib/libxcb-render.so.0 (0x00007f9738100000)
libxcb-shm.so.0 => /usr/lib/libxcb-shm.so.0 (0x00007f97380fb000)
libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0x00007f973804e000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f9738049000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f973803f000)
libaudit.so.1 => /usr/lib/libaudit.so.1 (0x00007f9738015000)
/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f97389d7000)
libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007f9737fea000)
libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x00007f9737fd7000)
libharfbuzz.so.0 => /usr/lib/libharfbuzz.so.0 (0x00007f9737ec9000)
libbrotlidec.so.1 => /usr/lib/libbrotlidec.so.1 (0x00007f9737eb8000)
libcap-ng.so.0 => /usr/lib/libcap-ng.so.0 (0x00007f9737eb0000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007f9737d64000)
libgraphite2.so.3 => /usr/lib/libgraphite2.so.3 (0x00007f9737d41000)
libbrotlicommon.so.1 => /usr/lib/libbrotlicommon.so.1 (0x00007f9737d1e000)
libpcre2-8.so.0 => /usr/lib/libpcre2-8.so.0 (0x00007f9737c81000)
Upgrading to the latest version of my crates, proc_macro2 was in there as well as syn, seemed to have corrected the error. Could also be lurking somewhere in the build cache. If you want that I suppose I can provide it somewhere.
Not sure what to do with this bug now, but feel free to close it if you no longer feel it's relevant.
@saethlin does your PR fix this?
Hm, it looks like the problem here is that the OnDiskCache footer is off the end of the file. When that happens due to out-of-disk, people tend to notice that they are out of disk. @erikh Am I correct in assuming you had some disk space available when this crash happened?
If this is an out-of-disk, it was probably "solved" by https://github.com/rust-lang/rust/pull/117301 then will be actually solved by https://github.com/rust-lang/rust/pull/119510. But if isn't an out-of-disk situation, this is probably an incremental compilation bug. The build directory state at the time the crash happened would be useful, but if the crash doesn't recur anymore on your end then the problematic state in the build directory is probably gone. In that case, this issue is still useful to say that something is wrong here, but that's kind of all.
@saethlin correct, I had about 900GB free on this mountpoint at the time of compilation.
It does also make sense that my build cache was corrupt; refreshing crates seemed to correct the issue. Maybe a truncated object write or something? Just throwing things at the wall here.
Either way, my personal issue is resolved, but I figure this is probably worth keeping around for resolution on a more reasonable time frame.
Crashes like this in incremental compilation are usually due to subtle internal things like a Hash
impl used in the incremental compilation cache that accidentally has a high collision rate in some rare situation.
Ah, interesting. So heat death of the universe before this bug probably gets closed, eh? :)
I'll leave ya to it.
Code
I do not have a minimum verifiable example. It's hard to decipher this backtrace. However, I have https://github.com/erikh/megalock/commit/daed9c04b202a34c18570779badfff2c641c9331 which should demonstrate this error on 1.75.0.
EDIT: sorry, I had the url syntax wrong. That link should point at the correct commit.
Meta
rustc --version --verbose
:Error output
Backtrace
The backtrace comes from rustc itself.Just doing my part, looks like my repo did something to hose the compiler. Next steps I'm happy to help with, but the repo is probably the easiest way to investigate this independently. I'm sorry I'm not more helpful.