wlcs icon indicating copy to clipboard operation
wlcs copied to clipboard

ci: add sanitizer runs

Open Saviq opened this issue 4 months ago • 2 comments

Saviq avatar Aug 06 '25 14:08 Saviq

This looks strange...

2025-08-07T07:34:25.0960973Z [ RUN      ] BadBufferTest.test_truncated_shm_file
2025-08-07T07:34:25.0961120Z unknown file: Failure
2025-08-07T07:34:25.0961462Z C++ exception with description "Timeout waiting for condition" thrown in the test body.
2025-08-07T07:34:25.0961486Z 

That's a timeout of std::chrono::seconds{10 * TEST_TIMEOUT_MULTIPLIER} - and happens less than a microsecond after the test starts. Is TEST_TIMEOUT_MULTIPLIER something stupid?

Seems not. Just that the timestamp prefixes are skewed by buffering the console output

AlanGriffiths avatar Aug 07 '25 08:08 AlanGriffiths

@Saviq Is this still equivalent to the old PR? No need to explicitly specify -DWLCS_BUILD_* since they're already specified in CMakeLists.txt

tarek-y-ismail avatar Nov 24 '25 15:11 tarek-y-ismail

@Saviq Is this still equivalent to the old PR?

"The old PR"?

This actually runs the sanitizer versions in CI. But it didn't work out well when I filed this.

Saviq avatar Nov 24 '25 15:11 Saviq

This actually runs the sanitizer versions in CI. But it didn't work out well when I filed this.

I just rebased it and noticed that a bunch of stuff isn't needed anymore. Hence, double-checking with you.

tarek-y-ismail avatar Nov 24 '25 15:11 tarek-y-ismail

noticed that a bunch of stuff isn't needed anymore

Looks sane, yeah. Don't see the previous diff to confirm beyond doubt, though :shrug:

EDIT:

Looked through the old commits, seems fine.

Saviq avatar Nov 24 '25 15:11 Saviq

So we fail some tests on asan, some on ubsan, and tsan straight up crashes. Will look into this again tomorrow.

tarek-y-ismail avatar Nov 24 '25 16:11 tarek-y-ismail

Didn't take a look at this. But I just noticed that it's just clang builds that are failing. @Saviq Did something similar happen before?

tarek-y-ismail avatar Nov 25 '25 15:11 tarek-y-ismail

Did something similar happen before?

Some history available in:

https://github.com/canonical/wlcs/actions/workflows/spread.yml?query=branch%3Aadd-sanitizer-builds

Saviq avatar Nov 25 '25 17:11 Saviq

I can reproduce this locally. WLCS with clang refuses to run on ASan even with both Mir and WLCS built with ASan, and TSan straight up crashes immediately with 100k stack frames of __interceptor__cxa_atexit() (yes, one hundred thousand frames) right as TSan initializes. The failures with NoSan and UBSan in CI match with the expected failures list.

@Saviq Any clues what might be happening with ASan and TSan?

tarek-y-ismail avatar Nov 26 '25 16:11 tarek-y-ismail

TICS Quality Gate

:heavy_check_mark: Passed

wlcs

Coding Standards: :heavy_check_mark: Passed

:heavy_check_mark: Condition “No new Coding Standard Violations for level 1, 2, 3 with respect to Previous analysis” passed.

See the results in the TICS Viewer

The following files have been checked for this project
  • src/helpers.cpp

TICS / TICS / Run TICS analysis

github-actions[bot] avatar Nov 27 '25 11:11 github-actions[bot]

@Saviq I'll leave it to you to review and merge.

tarek-y-ismail avatar Nov 27 '25 11:11 tarek-y-ismail

I'll leave it to you to review and merge.

Can't review my own PR, here's my ACK: :+1:, but you have to Approve :)

Saviq avatar Nov 27 '25 11:11 Saviq