Skip to content

Conversation

japaric
Copy link
Contributor

@japaric japaric commented Feb 14, 2024

  • the segfault occurred in the second / third C++ frame after rustc called into LLVM using the PassWrapper.cpp glue
  • the segfault occurred due a ABI mismatch between those two frames
  • both frames corresponded to LLVM C++ functions. (the first frame was the PassWrapper.cpp glue)
  • one of the frames (functions) came from the LLVM library built in CI; the other frame was codegen'd locally
  • when comparing to a rust-lang/rust build, it was found that both frames involved in the segfault were present in the LLVM library built in rust-lang/rust CI. the rust-lang/rust artifact did not result in a segfault
  • the differences between the rust-lang/rust and ferrocene build settings are: (a) rust-lang/rust builds llvm as shared library; ferrocene builds them as static libraries. (b) rust-lang/rust uses clang and a newer version of gcc / g++
  • building LLVM as shared libraries in ferrocene did not fix the segfault but additionally bumping the gcc / g++ version (by way of using a newer base docker image) did

@japaric
Copy link
Contributor Author

japaric commented Feb 14, 2024

bors try

bors-ferrocene bot added a commit that referenced this pull request Feb 14, 2024
@bors-ferrocene
Copy link
Contributor

try

Build succeeded:

  • full

@japaric japaric force-pushed the ja-dynamic-llvm-libraries branch from 8608ff7 to 86c2e52 Compare February 22, 2024 13:37
@japaric
Copy link
Contributor Author

japaric commented Feb 22, 2024

bors try

bors-ferrocene bot added a commit that referenced this pull request Feb 22, 2024
@bors-ferrocene
Copy link
Contributor

try

Build failed:

@japaric japaric force-pushed the ja-dynamic-llvm-libraries branch from 86c2e52 to 1a8fed1 Compare February 22, 2024 17:09
@japaric
Copy link
Contributor Author

japaric commented Feb 22, 2024

bors try

bors-ferrocene bot added a commit that referenced this pull request Feb 22, 2024
@bors-ferrocene
Copy link
Contributor

try

Build failed:

  • full

@japaric
Copy link
Contributor Author

japaric commented Feb 23, 2024

bors try

bors-ferrocene bot added a commit that referenced this pull request Feb 23, 2024
@bors-ferrocene
Copy link
Contributor

try

Build failed:

@japaric japaric force-pushed the ja-dynamic-llvm-libraries branch from 9eca357 to a2721a1 Compare February 27, 2024 14:37
@japaric
Copy link
Contributor Author

japaric commented Feb 27, 2024

bors try

bors-ferrocene bot added a commit that referenced this pull request Feb 27, 2024
@bors-ferrocene
Copy link
Contributor

try

Build failed:

@japaric japaric changed the title build LLVM as shared libraries fix segfaulting rustc when download-ci-llvm = true Feb 27, 2024
@japaric japaric marked this pull request as ready for review February 27, 2024 17:50
Copy link
Member

@tshepang tshepang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors merge

@tshepang
Copy link
Member

we can get the directory (ubuntu-18) renamed (to ubuntu-20) in a future PR

bors-ferrocene bot added a commit that referenced this pull request Feb 27, 2024
283: fix segfaulting rustc when `download-ci-llvm = true` r=tshepang a=japaric

- the segfault occurred in the second / third C++ frame after `rustc` called into LLVM using the `PassWrapper.cpp` glue
- the segfault occurred due a ABI mismatch between those two frames
- both frames corresponded to LLVM C++ functions. (the first frame was the `PassWrapper.cpp` glue)
- one of the frames (functions) came from the LLVM library built in CI; the other frame was codegen'd locally
- when comparing to a rust-lang/rust build, it was found that both frames involved in the segfault were present in the LLVM library built in rust-lang/rust CI. the rust-lang/rust artifact did not result in a segfault
- the differences between the rust-lang/rust and ferrocene build settings are: (a) rust-lang/rust builds llvm as shared library; ferrocene builds them as static libraries. (b) rust-lang/rust uses `clang` and a newer version of `gcc` / `g++`
- building LLVM as shared libraries in ferrocene did not fix the segfault but additionally bumping the `gcc` / `g++` version (by way of using a newer base docker image) did

Co-authored-by: Jorge Aparicio <jorge.aparicio@ferrous-systems.com>
@bors-ferrocene
Copy link
Contributor

Build failed:

@tshepang
Copy link
Member

bors retry

bors-ferrocene bot added a commit that referenced this pull request Feb 28, 2024
283: fix segfaulting rustc when `download-ci-llvm = true` r=tshepang a=japaric

- the segfault occurred in the second / third C++ frame after `rustc` called into LLVM using the `PassWrapper.cpp` glue
- the segfault occurred due a ABI mismatch between those two frames
- both frames corresponded to LLVM C++ functions. (the first frame was the `PassWrapper.cpp` glue)
- one of the frames (functions) came from the LLVM library built in CI; the other frame was codegen'd locally
- when comparing to a rust-lang/rust build, it was found that both frames involved in the segfault were present in the LLVM library built in rust-lang/rust CI. the rust-lang/rust artifact did not result in a segfault
- the differences between the rust-lang/rust and ferrocene build settings are: (a) rust-lang/rust builds llvm as shared library; ferrocene builds them as static libraries. (b) rust-lang/rust uses `clang` and a newer version of `gcc` / `g++`
- building LLVM as shared libraries in ferrocene did not fix the segfault but additionally bumping the `gcc` / `g++` version (by way of using a newer base docker image) did

Co-authored-by: Jorge Aparicio <jorge.aparicio@ferrous-systems.com>
@bors-ferrocene
Copy link
Contributor

Build failed:

  • full

bors-ferrocene bot added a commit that referenced this pull request Mar 6, 2024
371: Properly exclude `build-metrics.json` from Tar r=tshepang a=Hoverbear

Plucked from #283, this fixes the "Invocation Stacking" issue in the generated reports from CI.

Co-authored-by: Jorge Aparicio <jorge.aparicio@ferrous-systems.com>
@pietroalbini
Copy link
Contributor

Superseded by #376.

bors-ferrocene bot added a commit that referenced this pull request Mar 8, 2024
376: Update to Ubuntu 20.04 and fix downloading LLVM from CI r=pvdrz a=pietroalbini

This PR is based on #283 and #362: it updates CI to run on Ubuntu 20.04 (fixing the failure in #305), and changes how we build LLVM to hopefully fix `download-ci-llvm`. Notably, this bumps the minimum glibc version requirement to 2.31.

The hard part of this PR was fixing the broken CI for Aarch64. It turns out that the failure was caused by a breaking change in `binfmt-support` package, which now requires manually enabling new binfmts after importing them (if `/proc/sys/fs/binfmt_misc` is not mounted, like in CI).

Co-authored-by: Jorge Aparicio <jorge.aparicio@ferrous-systems.com>
Co-authored-by: Tshepang Mbambo <tshepang.mbambo@ferrous-systems.com>
Co-authored-by: Pietro Albini <pietro.albini@ferrous-systems.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants