Skip to content
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

(RHEL-30372) Fix TEST-17-UDEV under ASan (and a couple of gcc warnings) #260

Merged
merged 4 commits into from
May 15, 2024

Conversation

mrc0mmand
Copy link
Member

@mrc0mmand mrc0mmand commented Apr 18, 2024

Resolves: #259.

crrodriguez and others added 4 commits April 18, 2024 22:56
Fixes gcc 13 -Wenum-int-mismatch which are enabled by default.

(cherry picked from commit aa70dd6)

Related: RHEL-30372
gcc 13 -Wenum-int-mismatch reminds us that enum != int

(cherry picked from commit e14afe3)

Related: RHEL-30372
gcc 13 -Wenum-int-mismatch, enabled by default, reminds us enum ! = int

(cherry picked from commit 9264db1)

Related: RHEL-30372
Since f387005 we started generating coredumps by default (up to
certain size). This change has one unintentional effect on our test
suite - if a sanitized binary (udevd worker here) crashes and ASan is
instructed to allow core dumping (via disable_coredump=0 and
use_madv_dontdump=1), we try to dump a relatively big core file (~80
MiB), and since the test suite configures systemd-coredumpd to dump the
cores into the journal, we try to append it to the journal message about
the crash. However, journal complains that the message with the coredump
is too big so the crash report is not written, and we end up with
coredumpctl not showing the crash, which the test in this case uses to
monitor if the udevd worker's job timed out:

[   17.873463] systemd-udevd[1617]: null: Worker [1625] processing SEQNUM=3588 is taking a long time
[   17.876823] systemd-udevd[1625]: null: Spawned process '/bin/sleep 60' [1626] is taking longer than 3s to complete
...
[   24.223459] systemd-udevd[1617]: null: Worker [1625] processing SEQNUM=3588 killed
[   24.265141] systemd[1]: Created slice system-systemd\x2dcoredump.slice.
[   24.284960] systemd[1]: Started [email protected].
[   27.545120] systemd-journald[1225]: Failed to write entry to /var/log/journal/6da99a97048e4f08abd4ddabcf92bbdd/system.journal (51 items, 89252196 bytes) despite vacuuming, ignoring: Argument list too long
[   27.551759] systemd-coredump[1709]: ==1709==LeakSanitizer has encountered a fatal error.
[   27.551759] systemd-coredump[1709]: ==1709==HINT: For debugging, try setting environment variable LSAN_OPTIONS=verbosity=1:log_threads=1
[   27.551759] systemd-coredump[1709]: ==1709==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)

The upstream version of this test doesn't suffer from this because it
was recently-ish rewritten to not check for the crash event
(5592608, but we're missing some udevd prerequisites for that to
work in RHEL9), and we also started instructing ASan to allow coredumps
after that change, so the issue was never encountered there in the first
place.

Since we don't really care about the actual coredump in this case, let's
just temporarily override the core rlimit to 0 for the udevd process.

Related: RHEL-30372
rhel-only
@mrc0mmand mrc0mmand force-pushed the fix-TEST-17-under-ASan branch from 9185588 to 7bb8317 Compare April 18, 2024 21:02
@github-actions github-actions bot changed the title Fix TEST-17-UDEV under ASan (and a couple of gcc warnings) (RHEL-30372) Fix TEST-17-UDEV under ASan (and a couple of gcc warnings) Apr 18, 2024
@github-actions github-actions bot added pr/needs-ci Formerly needs-ci pr/needs-review Formerly needs-review labels Apr 18, 2024
Copy link

github-actions bot commented Apr 18, 2024

Commit validation

Tracker - RHEL-30372

The following commits meet all requirements

commit upstream
607b15f - journal-remote: code is of type enum MHD_RequestTerminationCode systemd/systemd@aa70dd6
e11103c - resolve: dns_server_feature_level*string type is DnsServerFeatureLev… systemd/systemd@e14afe3
36ab59b - shared|install: Use InstallChangeType consistently systemd/systemd@9264db1
7bb8317 - test: temporarily disable coredumps in testsuite-17.03.sh rhel-only

Tracker validation

Success

🟢 Tracker RHEL-30372 has set desired product: CentOS Stream 9
🟢 Tracker RHEL-30372 has set desired component: systemd
🟢 Tracker RHEL-30372 has been approved


Pull Request validation

Success

🟢 CI - All checks have passed
🟢 Review - Reviewed by a member
🟢 Approval - Changes were approved


Auto Merge

Success

🟢 Pull Request is not marked as draft and it's not blocked by dont-merge label
🟢 Pull Request meet requirements, title has correct form
🟢 Pull Request meet requirements, mergeable is true
🟢 Pull Request meet requirements, mergeable_state is clean
🟢 Pull Request has correct target branch main
🟢 Pull Request was merged

@github-actions github-actions bot removed the pr/needs-ci Formerly needs-ci label Apr 18, 2024
@mrc0mmand mrc0mmand marked this pull request as ready for review April 19, 2024 09:12
@jamacku jamacku added this to the RHEL-9.5.0 milestone Apr 25, 2024
@github-actions github-actions bot added tracker/missing Formerly needs-bz and removed tracker/missing Formerly needs-bz labels Apr 30, 2024
Copy link
Member

@jamacku jamacku left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions bot removed the pr/needs-review Formerly needs-review label May 15, 2024
@github-actions github-actions bot merged commit 54c44b1 into redhat-plumbers:main May 15, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TEST-17-UDEV is currently broken under sanitizers
3 participants