Pin clang to version 17 in sanitizer CI jobs#3546
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## unstable #3546 +/- ##
============================================
+ Coverage 76.21% 76.37% +0.16%
============================================
Files 159 159
Lines 81672 80045 -1627
============================================
- Hits 62243 61132 -1111
+ Misses 19429 18913 -516 🚀 New features to boost your workflow:
|
|
I realized we don't run the sanitizer tests for the |
sarthakaggarwal97
left a comment
There was a problem hiding this comment.
I think this would work fine. Another option is trying out if we can pin it to clang-17 for the sanitizer jobs. That is probably less invasive than a makefile change since it only changes daily.yml file
something like this?
matrix:
compiler: [gcc, clang-17]
|
@eifrah-aws Could you also take a look? |
| # Strip LTO flags from OPTIMIZATION for the static Lua module build. | ||
| # When archiving into a .a, LTO bitcode objects cause linker failures | ||
| # if the system's LLVM gold plugin version doesn't match clang's version. | ||
| LUA_MODULE_OPTIMIZATION=$(subst -flto,,$(subst -ffat-lto-objects,,$(subst -flto=auto,,$(OPTIMIZATION)))) |
There was a problem hiding this comment.
Would this degrade performance?
|
Related commit: 0327c27 |
Signed-off-by: Hanxi Zhang <hanxizh@amazon.com>
bc80832 to
bde9dbc
Compare
|
@hanxizh9910 curious why did we choose clang 17 instead of 18? |
|
I think we can remove the LTO flag and it shouldn't affect the performance as the Lua module is compiled into a static archive and then it's linked into |
Hi, because the LLVM gold plugin on the runner is version 17. We need the compiler to match the gold plugin. Pinning to clang-18 wouldn't help |
The reader, |
|
FYI: The current tests failures in CI should get fixes with #3545 |
|
Started failing after #3392 merge. Merging it for now to help stabilize the daily. However, take a look @eifrah-aws once you get time. |
|
failed to make again: https://github.com/valkey-io/valkey/actions/runs/24865821147/job/72801509679. Will make a new PR using the old way to fix it |
This reverts commit 7db5b70. Signed-off-by: Harkrishn Patro <bunty.hari@gmail.com>
Analysis
The daily CI sanitizer jobs with clang are failing during the build step.
The
ubuntu-latestrunner now has clang 18, but the LLVM gold pluginis still version 17. When the static Lua module is built with
-flto,the
.ofiles contain LLVM 18 bitcode that the gold plugin (v17) cannotread:
bfd plugin: LLVM gold plugin has failed to create LTO module: Unknown attribute kind (91) (Producer: 'LLVM18.1.3' Reader: 'LLVM 17.0.6')Example failure: https://github.com/valkey-io/valkey/actions/runs/24753491944/job/72421581512
Fix
Pin the sanitizer jobs to
clang-17so the compiler and gold pluginversions match.
Tested(successfully built): https://github.com/hanxizh9910/valkey/actions/runs/24859845008
Note
If
clang-17is removed from theubuntu-latestimage in the future,we may need to either add an explicit install step