systemd / systemd

The systemd System and Service Manager
https://systemd.io
GNU General Public License v2.0
13.33k stars 3.82k forks source link

TEST-73-LOCALE: Stopping systemd-localed sometimes times out when built with sanitizers #35335

Open DaanDeMeyer opened 1 day ago

DaanDeMeyer commented 1 day ago

systemd version the issue has been seen with

main

Used distribution

No response

Linux kernel version used

No response

CPU architectures issue was seen on

None

Component

tests

Expected behaviour you didn't see

No response

Unexpected behaviour you saw

No response

Steps to reproduce the problem

No response

Additional program output to the terminal or log subsystem illustrating the issue

PID: 12073 (systemd-localed)
           UID: 0 (root)
           GID: 0 (root)
        Signal: 6 (ABRT)
     Timestamp: Sat 2024-11-23 23:57:00 UTC (3min 7s ago)
  Command Line: /usr/lib/systemd/systemd-localed
    Executable: /usr/lib/systemd/systemd-localed
 Control Group: /system.slice/systemd-localed.service
          Unit: systemd-localed.service
         Slice: system.slice
       Boot ID: 04a2028b4ee2490c84492e85f6f21481
    Machine ID: 7b37e13a88a74d0998e4ce5c8e1ac8bc
      Hostname: H
       Storage: journal
       Message: Process 12073 (systemd-localed) of user 0 dumped core.

                Module libxkbcommon.so.0 from rpm libxkbcommon-1.7.0-4.fc41.x86_64
                Module libcap-ng.so.0 from rpm libcap-ng-0.8.5-3.fc41.x86_64
                Module libpcre2-8.so.0 from rpm pcre2-10.44-1.fc41.1.x86_64
                Module libeconf.so.0 from rpm libeconf-0.7.4-3.fc42.x86_64
                Module libaudit.so.1 from rpm audit-4.0.2-1.fc41.x86_64
                Module libz.so.1 from rpm zlib-ng-2.2.2-1.fc42.x86_64
                Module libattr.so.1 from rpm attr-2.5.2-4.fc41.x86_64
                Module libselinux.so.1 from rpm libselinux-3.7-6.fc42.x86_64
                Module libseccomp.so.2 from rpm libseccomp-2.5.5-2.fc41.x86_64
                Module libpam.so.0 from rpm pam-1.7.0-2.fc42.x86_64
                Module libcrypto.so.3 from rpm openssl-3.2.2-8.fc42.x86_64
                Module libmount.so.1 from rpm util-linux-2.40.2-8.fc42.x86_64
                Module libcrypt.so.2 from rpm libxcrypt-4.4.36-10.fc42.x86_64
                Module libcap.so.2 from rpm libcap-2.71-1.fc42.x86_64
                Module libblkid.so.1 from rpm util-linux-2.40.2-8.fc42.x86_64
                Module libacl.so.1 from rpm acl-2.3.2-2.fc41.x86_64
                Stack trace of thread 12073:
                #0  0x00007f47806e768b __sched_yield (libc.so.6 + 0xdb68b)
                #1  0x00007f478181f6d5 _ZN11__sanitizer12StopTheWorldEPFvRKNS_20SuspendedThreadsListEPvES3_ (libclang_rt.asan.so + 0x1f6d5)
                #2  0x00007f478183106e _ZN6__lsanL32LockStuffAndStopTheWorldCallbackEP12dl_phdr_infomPv (libclang_rt.asan.so + 0x3106e)
                #3  0x00007f478074e3d9 dl_iterate_phdr (libc.so.6 + 0x1423d9)
                #4  0x00007f4781831043 _ZN6__lsan24LockStuffAndStopTheWorldEPFvRKN11__sanitizer20SuspendedThreadsListEPvEPNS_18CheckForLeaksParamE (libclang_rt.asan.so + 0x31043)
                #5  0x00007f478182d121 _ZN6__lsanL13CheckForLeaksEv (libclang_rt.asan.so + 0x2d121)
                #6  0x00007f478182cecb _ZN6__lsan11DoLeakCheckEv (libclang_rt.asan.so + 0x2cecb)
                #7  0x00007f4780628540 __cxa_finalize (libc.so.6 + 0x1c540)
                #8  0x00007f4781805ed7 __do_global_dtors_aux (libclang_rt.asan.so + 0x5ed7)
                #9  0x00007f4782364092 _dl_call_fini (ld-linux-x86-64.so.2 + 0x2092)
                #10 0x00007f478236722e _dl_fini (ld-linux-x86-64.so.2 + 0x522e)
                #11 0x00007f4780628ac1 __run_exit_handlers (libc.so.6 + 0x1cac1)
                #12 0x00007f4780628b9e exit (libc.so.6 + 0x1cb9e)
                #13 0x00007f47806100cf __libc_start_call_main (libc.so.6 + 0x40cf)
                #14 0x00007f478061018b __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x418b)
                #15 0x0000561991d944d5 _start (/usr/lib/systemd/systemd-localed + 0xa4d5)
                ELF object binary architecture: AMD x86-64
yuwata commented 23 hours ago

Maybe simply asan makes the termination logic too slow ? IIRC, infra of mkosi github action is slower than one for CentOS CIs, so many races have been revealed.

yuwata commented 23 hours ago

So, maybe TimeoutStopSec= or DefaultTimeoutStopSec= should be extended when asan is enabled on mkosi test.