-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
failed to build archive invalid data encountered #65536
Comments
Hm, seems like this has since fixed itself. I'm going to close since it was probably spurious. |
Hmm, that error sounds like a toolchain bug/limitation (it really shouldn't care what we throw in there). |
I have encountered this locally building Servo's script crate, as has Servo's CI. |
@jdm @Mark-Simulacrum Could someone provide the Presumably for Servo itself it would have to be before and after a relevant rustup? |
Before:
After:
|
cc @michaelwoerister That's a 28.2% increase, much larger than what we saw for @Mark-Simulacrum Would be interesting to have artifact sizes (for benchmarks themselves) on perf although the damage has been done here. @jdm Okay that's bad but it doesn't increase the number of bits required to hold the number of bytes, maybe the whole |
@eddyb The pre-change rlib was ~530mb and post-change was in the range of ~550mb iirc. |
EDIT2: that might have all been irrelevant, looks like the contents of the |
So it turns out that our 4-byte It's also possible we'll save some time if LLVM stops trying to parse our |
Do I understand correctly by backwards compatibility we mean that if you're running an old rustc in a directory that happens to have rmeta files generated by a new rustc we'd just run into compilation errors if we didn't have the 4 byte zero prefix? i.e., it wouldn't introduce anything other than maybe odd-looking errors? (I am struggling to understand why exactly we did this in the first place, as we don't guarantee metadata format within one minor release, even...)
Hm, I would be ... surprised if LLVM started trying to parse arbitrary sections as various formats (e.g., COFF) but maybe that's normal behavior... |
@Mark-Simulacrum
IIUC, COFF is one of the major 3 LLVM has been parsing our (Note that this doesn't apply to the special section of a |
rustc_metadata: don't let LLVM confuse rmeta blobs for COFF object files. This has likely been a silent issue since 1.10 but only caused trouble recently (see #65536 (comment)), when recent changes to the `rmeta` schema introduced more opportunities for COFF parse errors. To prevent any undesired interactions with old compilers, I've renamed the file inside `rlib`s from `rust.metadata.bin` to `lib.rmeta` (not strongly attached to it, suggestions welcome). Fixes #65536. <hr/> Before: ``` $ llvm-objdump -all-headers build/*/stage1-std/*/release/deps/libcore-*.rmeta build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libcore-6b9e8b5a59b79a1d.rmeta: file format COFF-<unknown arch> architecture: unknown start address: 0x00000000 Sections: Idx Name Size VMA Type SYMBOL TABLE: ``` After: ``` $ llvm-objdump -all-headers build/*/stage1-std/*/release/deps/libcore-*.rmeta llvm-objdump: error: 'build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/deps/libcore-6b9e8b5a59b79a1d.rmeta': The file was not recognized as a valid object file ```
ea45150 (#59953) appears to introduce some sort of bug in the archive generation, which causes script-servo to fail to build on perf:
error: failed to build archive: Invalid data was encountered while parsing the file
.@eddyb, do you think it's worth reverting that PR for now?
The text was updated successfully, but these errors were encountered: