1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-06 00:58:29 +03:00

78083 Commits

Author SHA1 Message Date
Daan De Meyer
373313b00d fmf: Only move logs if corresponding directory exists
Otherwise find fails with an error.

(cherry picked from commit 3c2fa8e0501f9f39b3b7ca0506a7d548a39af928)
2025-01-15 09:56:07 +00:00
Daan De Meyer
3dbbf85013 test: Only move journal file if we didn't just unlink it
(cherry picked from commit 1d77ac19cfa1c9b194d7e9805430ab6fd38ba97e)
2025-01-15 09:56:07 +00:00
Daan De Meyer
d6ebbd871e test: Fix bug in integration test wrapper
(cherry picked from commit 79ac78e3680a425d86c7a90e6846c630c9583b48)
2025-01-15 09:56:07 +00:00
Daan De Meyer
8ba14c6907 fmf: Skip TEST-21-DFUZZER
Similar to Github Actions, since we don't build with sanitizers in
the packit job, let's skip TEST-21-DFUZZER.

(cherry picked from commit e0c2fd6a3345d26afdf4159406c38cd9101d2e0d)
2025-01-15 09:56:07 +00:00
Daan De Meyer
562bb35dc7 fmf: Use different heuristic on beefy systems
If we save journals in /tmp, we can run a larger number of tests in
parallel so let's make use of the larger number of CPUs if the tests
run on a beefy machine.

(cherry picked from commit 53546c71fe0a1b30ee296df84bb8c3577f5675a4)
2025-01-15 09:56:07 +00:00
Daan De Meyer
f4ad1e0709 fmf: Bump inotify limits to avoid systemd-nspawn failures
(cherry picked from commit c32a8cdaa0f03ae29e9edade1213cc2001b28000)
2025-01-15 09:56:07 +00:00
Daan De Meyer
34581e87d6 test: Move StateDirectory= directive into dropin
The integration-test-setup calls require StateDirectory= but some
tests override the test unit used which then won't have StateDirectory=
so let's move StateDirectory= into the dropin as well to avoid this
issue.

(cherry picked from commit 1f17ec0ed419627a686ee6e719ac7f55cf082ada)
2025-01-15 09:56:07 +00:00
Daan De Meyer
9f5b0ea933 test: Don't register machines with machined unless we're in interactive mode
(cherry picked from commit 84b30442d257102a9a39122f9a537fa48fb0bfda)
2025-01-15 09:56:07 +00:00
Daan De Meyer
7713732dfd test: Add option to save in progress test journals to /tmp
The journal isn't the best at being fast, especially when writing
to disk and not to memory, which can cause integration tests to
grind to a halt on beefy systems due to all the systemd-journal-remote
instances not being able to write journal entries to disk fast enough.

Let's introduce an option to allow writing in progress test journals
to use /tmp which can be used on beefy systems with lots of memory to
speed things up.

(cherry picked from commit e49fdecd161b3d391e55311652fda3220d851fa1)
2025-01-15 09:56:07 +00:00
Daan De Meyer
f6343a52f9 tree-wide: Fix python formatting
The new release of ruff formats a few more things which causes linter
failures in CI so let's fix those formatting nits.

(cherry picked from commit 96403d5121d93dd47dbe9dab5b90ff973e664ac3)
2025-01-15 09:56:07 +00:00
Daan De Meyer
fc15f5990b fmf: Log clock source
(cherry picked from commit 6e761c5a93278fc719a66f7c984af9608b836991)
2025-01-15 09:56:07 +00:00
Daan De Meyer
a8c7d1de26 fmf: Move meson logs and failed test journals to test artifacts dir
(cherry picked from commit 0e444c948e7d8ddbdec83116b68af7d876e2d2f6)
2025-01-15 09:56:07 +00:00
Daan De Meyer
13f4c782dd mkosi: Re-enable TEST-21-DFUZZER when running with sanitizers
Similar to how CentOS CI did it previously, let's only run
TEST-21-DFUZZER when built with sanitizers for maximum effect.

(cherry picked from commit 103e92810a4bd3f01d2a49d85ef9575d60a8d244)
2025-01-15 09:56:07 +00:00
Daan De Meyer
a4ae723295 test: Only plug in integration-test-setup.sh in interactive mode
If we're not running interactively, there's no point in the features
from integration-test-setup.sh which are intended for interactive
development and debugging so lets skip adding it in that case.

(cherry picked from commit 794d456cf402a35290d6562c21f0ff846511026c)
2025-01-15 09:56:07 +00:00
Daan De Meyer
16ae6d001d test: Drop set -x from integration-test-setup.sh
(cherry picked from commit 90538ede55ac9d40dc513f64f052c687672cae89)
2025-01-15 09:56:07 +00:00
Daan De Meyer
93efcc17c6 fmf: Force SELinux relabel when running within testing farm
We expect to run as root within testing farm and to have permissions
to do selinux relabelling so let's enable it explicitly.

(cherry picked from commit e1c883bf32f3922bfc977701062e353c0a0a4ac5)
2025-01-15 09:56:07 +00:00
Daan De Meyer
27acc15203 TEST-06-SELINUX: Add knob to allow checking for AVCs
When running the integration tests downstream, it's useful to be
able to test that a new systemd version doesn't introduce any AVC
denials, so let's add a knob to make that possible.

(cherry picked from commit de19520ec979902fd457515d1a795210fdaedf93)
2025-01-15 09:56:07 +00:00
Daan De Meyer
963bfbbf69 fmf: Dump CPU and memory information
(cherry picked from commit 44368f84d7ddbec7a50648a65c27cb6a31090a29)
2025-01-15 09:56:07 +00:00
Daan De Meyer
3a93f4dc7d fmf: Only mess with /etc/yum.repos.d when running within testing farm
If running tmt locally to debug the test script, make sure we don't
mess with /etc/yum.repos.d.

(cherry picked from commit 8e3347f3bd3d9a01b8f39b0858eab74084ecf20a)
2025-01-15 09:56:07 +00:00
Daan De Meyer
45d45ebfac fmf: Fix glob
Globs inside quotes aren't expanded and we need the glob to be more
specific to avoid matching multiple entries inside the tmt source
directory.

(cherry picked from commit fc1b08dee2ccf706580fa448e66831d1e853d054)
2025-01-15 09:56:07 +00:00
Daan De Meyer
5761eb9b76 fmf: Fix dist-git example
All that's needed is dist-git-source: true so remove the other settings
that aren't required.

(cherry picked from commit 0a85b3757968a2750286119760244e017c990263)
2025-01-15 09:56:07 +00:00
Daan De Meyer
ed729eca0c fmf: Don't fail if we can't put selinux in permissive mode
The tests might be running unprivileged or in an environment without
selinux so let's not fail if we can't put it in permissive mode.

(cherry picked from commit 0250db0139b159cb9e6c1a87ad91ffdd03e80236)
2025-01-15 09:56:07 +00:00
Luca Boccassi
7fa3b5018b meson: bump version to 257.2 v257.2 2025-01-07 20:45:53 +00:00
Yu Watanabe
fe5b433e75 journalctl: make --invocation and --list-invocations accept unit name without suffix
Fixes #35538.

(cherry picked from commit e8823b5e352711c68ab3282697a6ab1cfb06d25a)
2025-01-07 20:41:10 +00:00
Yu Watanabe
a65b513182 systemctl: certainly ignore ENOENT in checking inhibitors
Fixes a bug caused by 804874d26ac73e0af07c4c5d7165c95372f03f6d.

Follow-up for 084f361b509cbffe7ffd5ab6085469f76f799fe5 and
a1417e5563acb73a0accdc12b3af91e4ec1c7f46.

Note, ERRNO_IS_NEG_DISCONNECT() includes ENONET rather than ENOENT...
So, ENOENT needs to be handled explicitly.

Fixes #35757 and #35806.

(cherry picked from commit 66f379b63ddac8c72b9130df86a82b68ec42c119)
2025-01-07 20:41:10 +00:00
Yu Watanabe
ec38b373c6 systemctl: also ignore ENOENT in checking inhibitors
Fixes a bug caused by 804874d26ac73e0af07c4c5d7165c95372f03f6d.
Follow-up for a1417e5563acb73a0accdc12b3af91e4ec1c7f46.
Fixes #35757.

(cherry picked from commit 084f361b509cbffe7ffd5ab6085469f76f799fe5)
2025-01-07 20:41:10 +00:00
Luca Boccassi
e3d0ccaa5a obs: also trigger Fedora package builds
The package is logistically separated, as the rpm sources conflict from Fedora
conflict with the rpm sources from SUSE (some files have the same name and
location but different, incompatible content), so Fedora builds can't be
triggered from the same package. The result is the same.

(cherry picked from commit 5c4cb68390a4a3b60d2ca733e283c44fcc205df7)
2025-01-07 18:30:03 +00:00
Luca Boccassi
986e51805b CI: add OBS workflow integration to build packages on push to main
When main is updated, packages for Arch/Debian/Ubuntu/SUSE will be built and published
on OBS:

https://download.opensuse.org/repositories/home:/bluca:/systemd/
https://build.opensuse.org/project/show/home:bluca:systemd
(cherry picked from commit 0b5f9269398d1422bb7ff3f928a4ffe67332ff63)
2025-01-07 18:30:03 +00:00
Daan De Meyer
253ee3c07f Revert "mkosi: Fix opensuse build"
The commit that changes the name from README.testsuite to README.md
was never backported (and shouldn't as it would break opensuse's spec)
so revert the corresponding change in the mkosi opensuse build script.

This reverts commit 4162c331dd4fc6657d1f51c90a7a0223e9f4a30d.
2025-01-07 18:26:13 +00:00
Jacob McNamee
a398d18e79 stdio-bridge: fix polled fds
Poll fds associated with the bus instead of hardcoding stdin/stdout.

This is consequential under socket activation, when the provided fd
should be used instead of stdin/stdout.

(cherry picked from commit 9d1c28b2d8422df700e7d94339ac6052a6755c6c)
(cherry picked from commit 59f5a4323468befbdca2bae7907219eaf8852f9a)
2025-01-07 18:26:13 +00:00
Daan De Meyer
cc599a20ef fmf: Check out target branch in packit
(cherry picked from commit 3c9ffd2e4b81e6bbc8cb28634432b6c9dccd661e)
2025-01-07 18:26:13 +00:00
Daan De Meyer
177b7aae44 packit: Simplify configuration
(cherry picked from commit 86a6d7cc5a4798e614c50ed02c751e71f74637f9)
2025-01-07 18:26:13 +00:00
Daan De Meyer
b23751d0d0 mkosi: Install which in build image
Required by gdb-add-index to find gdb and not declared as a dependency
of the package.

(cherry picked from commit 414fe9629cebf1ca2dc4c38d82ad8872a5483e89)
2025-01-07 18:26:13 +00:00
Yu Watanabe
685de97882 hwdb: comment out the entry for Logitech MX Keys for Mac
This effectively reverts the commit f70e5620b6ac319beac1d5ce26331bdc48d25daa,
as the entry seems to match multiple models.

Fixes #35691.

(cherry picked from commit 52a2b049476b374dea2efa22d39c5a1944125c47)
2025-01-07 18:26:13 +00:00
Luca Boccassi
b2320ced38 test: answer 2nd mdadm --create question for compat with new version
New version of mdadm now asks a second question, so send 'y' twice
to it in the test scripts

[    5.253483] TEST-64-UDEV-STORAGE.sh[684]: + echo y
[    5.254412] TEST-64-UDEV-STORAGE.sh[685]: + mdadm --create /dev/md/mdmirror --name mdmirror --uuid aaaaaaaa:bbbbbbbb:cccccccc:00000001 /dev/disk/by-id/scsi-0systemd_foobar_deadbeefmdadm0 /dev/disk/by-id/scsi-0systemd_foobar_deadbeefmdadm1 -v -f --level=1 --raid-devices=2
[    5.254759] TEST-64-UDEV-STORAGE.sh[685]: To optimalize recovery speed, it is recommended to enable write-indent bitmap, do you want to enable it now? [y/N]? mdadm: Note: this array has metadata at the start and
[    5.255085] TEST-64-UDEV-STORAGE.sh[685]:     may not be suitable as a boot device.  If you plan to
[    5.255418] TEST-64-UDEV-STORAGE.sh[685]:     store '/boot' on this device please ensure that
[    5.255745] TEST-64-UDEV-STORAGE.sh[685]:     your boot-loader understands md/v1.x metadata, or use
[    5.256285] TEST-64-UDEV-STORAGE.sh[685]:     --metadata=0.90
[    5.256672] TEST-64-UDEV-STORAGE.sh[685]: mdadm: size set to 64512K
[    5.257063] TEST-64-UDEV-STORAGE.sh[685]: Continue creating array [y/N]? mdadm: create aborted.

This is backward compatible with the older version that asks just one
question

(cherry picked from commit 16406420ea449b75e70a7dced05d7b98bc0f5376)
2025-01-07 18:26:13 +00:00
Mike Yuan
6f30e56bf3 core/unit-serialize: fix serialization of markers
Follow-up for ff68472a20c208121b69ea13586f3105a219bc14

(cherry picked from commit 5ce8d7d83902e920a34488c4193d9bc4b5bb70ae)
2025-01-07 18:26:13 +00:00
Luca Boccassi
b342fb52b0 creds: fix use-after-free in varlink interface
All other usages of sd_varlink_call* do not free the json return parameter,
and it is owned by the varlink object instead. Do the same here.

TEST-54-CREDS.sh[1074]: ==1074==ERROR: AddressSanitizer: heap-use-after-free on address 0x50c00000095a at pc 0x55cf8cd18a0f bp 0x7ffd7b9d4f10 sp 0x7ffd7b9d4f08
TEST-54-CREDS.sh[1074]: READ of size 2 at 0x50c00000095a thread T0 ((sd-mkdcreds))
TEST-54-CREDS.sh[1074]:     #0 0x55cf8cd18a0e in sd_json_variant_unref /usr/src/debug/systemd/src/libsystemd/sd-json/sd-json.c:887:16
TEST-54-CREDS.sh[1074]:     #1 0x55cf8cd4cecb in varlink_clear_current /usr/src/debug/systemd/src/libsystemd/sd-varlink/sd-varlink.c:593:22
TEST-54-CREDS.sh[1074]:     #2 0x55cf8cd4975e in varlink_clear /usr/src/debug/systemd/src/libsystemd/sd-varlink/sd-varlink.c:614:9
TEST-54-CREDS.sh[1074]:     #3 0x55cf8cd3dc3c in varlink_destroy /usr/src/debug/systemd/src/libsystemd/sd-varlink/sd-varlink.c:651:9
TEST-54-CREDS.sh[1074]:     #4 0x55cf8cd3dc3c in sd_varlink_unref /usr/src/debug/systemd/src/libsystemd/sd-varlink/sd-varlink.c:657:1
TEST-54-CREDS.sh[1074]:     #5 0x55cf8cb47a82 in sd_varlink_unrefp /usr/src/debug/systemd/src/systemd/sd-varlink.h:279:1
TEST-54-CREDS.sh[1074]:     #6 0x55cf8cb47a82 in ipc_decrypt_credential /usr/src/debug/systemd/src/shared/creds-util.c:1660:1
TEST-54-CREDS.sh[1074]:     #7 0x55cf8caca99a in maybe_decrypt_and_write_credential /usr/src/debug/systemd/src/core/exec-credential.c:486:29
TEST-54-CREDS.sh[1074]:     #8 0x55cf8cac790b in load_credential /usr/src/debug/systemd/src/core/exec-credential.c:713:16
TEST-54-CREDS.sh[1074]:     #9 0x55cf8cac5403 in acquire_credentials /usr/src/debug/systemd/src/core/exec-credential.c:819:29
TEST-54-CREDS.sh[1074]:     #10 0x55cf8cac5403 in setup_credentials_internal /usr/src/debug/systemd/src/core/exec-credential.c:1023:13
TEST-54-CREDS.sh[1074]:     #11 0x55cf8cac42d4 in exec_setup_credentials /usr/src/debug/systemd/src/core/exec-credential.c:1168:21
TEST-54-CREDS.sh[1074]:     #12 0x55cf8ca59569 in exec_invoke /usr/src/debug/systemd/src/core/exec-invoke.c:4866:13
TEST-54-CREDS.sh[1074]:     #13 0x55cf8ca428d8 in run /usr/src/debug/systemd/src/core/executor.c:244:13
TEST-54-CREDS.sh[1074]:     #14 0x55cf8ca428d8 in main /usr/src/debug/systemd/src/core/executor.c:275:13
TEST-54-CREDS.sh[1074]:     #15 0x7f64b40110c7 in __libc_start_call_main (/lib64/libc.so.6+0x40c7) (BuildId: 159846287d47eef88f2a478f59803f6e8fc81d05)
TEST-54-CREDS.sh[1074]:     #16 0x7f64b401118a in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x418a) (BuildId: 159846287d47eef88f2a478f59803f6e8fc81d05)
TEST-54-CREDS.sh[1074]:     #17 0x55cf8ca41cb4  (/usr/lib/systemd/systemd-executor+0x124cb4) (BuildId: 24f2b1608c3aaee3226cdd14fa2b6e6741156222)
TEST-54-CREDS.sh[1074]: 0x50c00000095a is located 26 bytes inside of 120-byte region [0x50c000000940,0x50c0000009b8)
TEST-54-CREDS.sh[1074]: freed by thread T0 ((sd-mkdcreds)) here:
TEST-54-CREDS.sh[1074]:     #0 0x7f64b48d57ea in free (/usr/lib/clang/19/lib/x86_64-redhat-linux-gnu/libclang_rt.asan.so+0xd57ea) (BuildId: c59bbd28ceb74038a60373d4a8cd4c258bcf0b4e)
TEST-54-CREDS.sh[1074]:     #1 0x55cf8cd188ab in sd_json_variant_unref /usr/src/debug/systemd/src/libsystemd/sd-json/sd-json.c:895:25
TEST-54-CREDS.sh[1074]:     #2 0x55cf8cb47a4c in sd_json_variant_unrefp /usr/src/debug/systemd/src/systemd/sd-json.h:98:1
TEST-54-CREDS.sh[1074]:     #3 0x55cf8cb47a4c in ipc_decrypt_credential /usr/src/debug/systemd/src/shared/creds-util.c:1660:1
TEST-54-CREDS.sh[1074]:     #4 0x55cf8caca99a in maybe_decrypt_and_write_credential /usr/src/debug/systemd/src/core/exec-credential.c:486:29
TEST-54-CREDS.sh[1074]:     #5 0x55cf8cac790b in load_credential /usr/src/debug/systemd/src/core/exec-credential.c:713:16
TEST-54-CREDS.sh[1074]:     #6 0x55cf8cac5403 in acquire_credentials /usr/src/debug/systemd/src/core/exec-credential.c:819:29
TEST-54-CREDS.sh[1074]:     #7 0x55cf8cac5403 in setup_credentials_internal /usr/src/debug/systemd/src/core/exec-credential.c:1023:13
TEST-54-CREDS.sh[1074]:     #8 0x55cf8cac42d4 in exec_setup_credentials /usr/src/debug/systemd/src/core/exec-credential.c:1168:21
TEST-54-CREDS.sh[1074]:     #9 0x55cf8ca59569 in exec_invoke /usr/src/debug/systemd/src/core/exec-invoke.c:4866:13
TEST-54-CREDS.sh[1074]:     #10 0x55cf8ca428d8 in run /usr/src/debug/systemd/src/core/executor.c:244:13
TEST-54-CREDS.sh[1074]:     #11 0x55cf8ca428d8 in main /usr/src/debug/systemd/src/core/executor.c:275:13
TEST-54-CREDS.sh[1074]:     #12 0x7f64b40110c7 in __libc_start_call_main (/lib64/libc.so.6+0x40c7) (BuildId: 159846287d47eef88f2a478f59803f6e8fc81d05)
TEST-54-CREDS.sh[1074]:     #13 0x7f64b401118a in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x418a) (BuildId: 159846287d47eef88f2a478f59803f6e8fc81d05)
TEST-54-CREDS.sh[1074]:     #14 0x55cf8ca41cb4  (/usr/lib/systemd/systemd-executor+0x124cb4) (BuildId: 24f2b1608c3aaee3226cdd14fa2b6e6741156222)
TEST-54-CREDS.sh[1074]: previously allocated by thread T0 ((sd-mkdcreds)) here:
TEST-54-CREDS.sh[1074]:     #0 0x7f64b48d5a83 in malloc (/usr/lib/clang/19/lib/x86_64-redhat-linux-gnu/libclang_rt.asan.so+0xd5a83) (BuildId: c59bbd28ceb74038a60373d4a8cd4c258bcf0b4e)
TEST-54-CREDS.sh[1074]:     #1 0x55cf8cd16bb7 in malloc_multiply /usr/src/debug/systemd/src/basic/alloc-util.h:119:16
TEST-54-CREDS.sh[1074]:     #2 0x55cf8cd16bb7 in sd_json_variant_new_object /usr/src/debug/systemd/src/libsystemd/sd-json/sd-json.c:737:13
TEST-54-CREDS.sh[1074]:     #3 0x55cf8cd32e58 in json_parse_internal /usr/src/debug/systemd/src/libsystemd/sd-json/sd-json.c:3161:29
TEST-54-CREDS.sh[1074]:     #4 0x55cf8cd37326 in sd_json_parse_with_source /usr/src/debug/systemd/src/libsystemd/sd-json/sd-json.c:3408:16
TEST-54-CREDS.sh[1074]:     #5 0x55cf8cd37326 in sd_json_parse /usr/src/debug/systemd/src/libsystemd/sd-json/sd-json.c:3437:16
TEST-54-CREDS.sh[1074]:     #6 0x55cf8cd3f753 in varlink_parse_message /usr/src/debug/systemd/src/libsystemd/sd-varlink/sd-varlink.c:962:13
TEST-54-CREDS.sh[1074]:     #7 0x55cf8cd3f753 in sd_varlink_process /usr/src/debug/systemd/src/libsystemd/sd-varlink/sd-varlink.c:1466:13
TEST-54-CREDS.sh[1074]:     #8 0x55cf8cd4c0a9 in sd_varlink_call_full /usr/src/debug/systemd/src/libsystemd/sd-varlink/sd-varlink.c:2160:21
TEST-54-CREDS.sh[1074]:     #9 0x55cf8cd4d617 in sd_varlink_callb_ap /usr/src/debug/systemd/src/libsystemd/sd-varlink/sd-varlink.c:2237:16
TEST-54-CREDS.sh[1074]:     #10 0x55cf8cd4da3c in sd_varlink_callb /usr/src/debug/systemd/src/libsystemd/sd-varlink/sd-varlink.c:2251:13
TEST-54-CREDS.sh[1074]:     #11 0x55cf8cb47686 in ipc_decrypt_credential /usr/src/debug/systemd/src/shared/creds-util.c:1623:13
TEST-54-CREDS.sh[1074]:     #12 0x55cf8caca99a in maybe_decrypt_and_write_credential /usr/src/debug/systemd/src/core/exec-credential.c:486:29
TEST-54-CREDS.sh[1074]:     #13 0x55cf8cac790b in load_credential /usr/src/debug/systemd/src/core/exec-credential.c:713:16
TEST-54-CREDS.sh[1074]:     #14 0x55cf8cac5403 in acquire_credentials /usr/src/debug/systemd/src/core/exec-credential.c:819:29
TEST-54-CREDS.sh[1074]:     #15 0x55cf8cac5403 in setup_credentials_internal /usr/src/debug/systemd/src/core/exec-credential.c:1023:13
TEST-54-CREDS.sh[1074]:     #16 0x55cf8cac42d4 in exec_setup_credentials /usr/src/debug/systemd/src/core/exec-credential.c:1168:21
TEST-54-CREDS.sh[1074]:     #17 0x55cf8ca59569 in exec_invoke /usr/src/debug/systemd/src/core/exec-invoke.c:4866:13
TEST-54-CREDS.sh[1074]:     #18 0x55cf8ca428d8 in run /usr/src/debug/systemd/src/core/executor.c:244:13
TEST-54-CREDS.sh[1074]:     #19 0x55cf8ca428d8 in main /usr/src/debug/systemd/src/core/executor.c:275:13
TEST-54-CREDS.sh[1074]:     #20 0x7f64b40110c7 in __libc_start_call_main (/lib64/libc.so.6+0x40c7) (BuildId: 159846287d47eef88f2a478f59803f6e8fc81d05)
TEST-54-CREDS.sh[1074]:     #21 0x7f64b401118a in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x418a) (BuildId: 159846287d47eef88f2a478f59803f6e8fc81d05)
TEST-54-CREDS.sh[1074]:     #22 0x55cf8ca41cb4  (/usr/lib/systemd/systemd-executor+0x124cb4) (BuildId: 24f2b1608c3aaee3226cdd14fa2b6e6741156222)
TEST-54-CREDS.sh[1074]: SUMMARY: AddressSanitizer: heap-use-after-free /usr/src/debug/systemd/src/libsystemd/sd-json/sd-json.c:887:16 in sd_json_variant_unref
TEST-54-CREDS.sh[1074]: Shadow bytes around the buggy address:
TEST-54-CREDS.sh[1074]:   0x50c000000680: 00 00 00 00 00 00 00 00 fa fa fa fa fa fa fa fa
TEST-54-CREDS.sh[1074]:   0x50c000000700: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
TEST-54-CREDS.sh[1074]:   0x50c000000780: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
TEST-54-CREDS.sh[1074]:   0x50c000000800: 00 00 00 00 00 00 00 00 fa fa fa fa fa fa fa fa
TEST-54-CREDS.sh[1074]:   0x50c000000880: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fa
TEST-54-CREDS.sh[1074]: =>0x50c000000900: fa fa fa fa fa fa fa fa fd fd fd[fd]fd fd fd fd
TEST-54-CREDS.sh[1074]:   0x50c000000980: fd fd fd fd fd fd fd fa fa fa fa fa fa fa fa fa
TEST-54-CREDS.sh[1074]:   0x50c000000a00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
TEST-54-CREDS.sh[1074]:   0x50c000000a80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
TEST-54-CREDS.sh[1074]:   0x50c000000b00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
TEST-54-CREDS.sh[1074]:   0x50c000000b80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
TEST-54-CREDS.sh[1074]: Shadow byte legend (one shadow byte represents 8 application bytes):
TEST-54-CREDS.sh[1074]:   Addressable:           00
TEST-54-CREDS.sh[1074]:   Partially addressable: 01 02 03 04 05 06 07
TEST-54-CREDS.sh[1074]:   Heap left redzone:       fa
TEST-54-CREDS.sh[1074]:   Freed heap region:       fd
TEST-54-CREDS.sh[1074]:   Stack left redzone:      f1
TEST-54-CREDS.sh[1074]:   Stack mid redzone:       f2
TEST-54-CREDS.sh[1074]:   Stack right redzone:     f3
TEST-54-CREDS.sh[1074]:   Stack after return:      f5
TEST-54-CREDS.sh[1074]:   Stack use after scope:   f8
TEST-54-CREDS.sh[1074]:   Global redzone:          f9
TEST-54-CREDS.sh[1074]:   Global init order:       f6
TEST-54-CREDS.sh[1074]:   Poisoned by user:        f7
TEST-54-CREDS.sh[1074]:   Container overflow:      fc
TEST-54-CREDS.sh[1074]:   Array cookie:            ac
TEST-54-CREDS.sh[1074]:   Intra object redzone:    bb
TEST-54-CREDS.sh[1074]:   ASan internal:           fe
TEST-54-CREDS.sh[1074]:   Left alloca redzone:     ca
TEST-54-CREDS.sh[1074]:   Right alloca redzone:    cb

Follow-up for 2c3cbc5c018e05b3a3e5ec6c6a2da6f3c6c3fb09

(cherry picked from commit 842a674d4f7fb69af28e67f447c1250383e50f41)
2025-01-07 18:26:13 +00:00
Yu Watanabe
962bdd1d02 machine: GC machine when no leader PID is set
After d8854ff1aca4434db0d7d6dcaf9fcf2f38105fb4, if a serialized
leader PID of a machine is already dead when deserialized, then the
leader PID and PIDFD are unset for the machine, and subsequent
machine_start() -> machine_watch_pidfd() will trigger an assertion.
This makes a Machine object without leader PID GCed.

Fixes a bug introduced by the combination of
d8854ff1aca4434db0d7d6dcaf9fcf2f38105fb4 (v255) and
1762c2c045d3a78d3cad54c6b1e5ee9624b32b00 (v257).

Fixes #35602.

(cherry picked from commit 51a0a3b0494d01c1622f6d0c3e2c31e01c18612f)
2025-01-07 18:26:13 +00:00
Yu Watanabe
d00cc09bf0 locale-setup: do not load locale from environemnt when /etc/locale.conf is unchanged
Previously, when /etc/locale.conf is unchanged, locales were loaded from
possibly outdated environment variable.

Fixes a bug introduced by 018befcff6b51f8a50ca232e1984d34526037241 (v253).
Fixes #35717.

(cherry picked from commit 80797bbb919b3ccde4e51b349f3ca70c1157053e)
2025-01-07 18:26:13 +00:00
Mike Yuan
01686c36cd shared/hibernate-util: handle the case where no swap has available backing dev
This also makes find_suitable_hibernation_device() report
more accurate error (ENOSPC -> ESTALE) if there's
no swap space on the system at all but resume= is set.

Fixes #35798
Replaces #35801

(cherry picked from commit bd3d361580715c7a6204c74df9185cc81d67f0c2)
2025-01-07 18:26:13 +00:00
Mike Yuan
74d673d7ae shared/hibernate-util: don't attempt to fiemap fd if no backing dev available
Prompted by #35798

Co-authored-by: Yu Watanabe <watanabe.yu+github@gmail.com>
(cherry picked from commit 6d3b2273b1e14d79548a018674ad6e5a5b8b8009)
2025-01-07 18:26:13 +00:00
Luca Boccassi
331888d165 resolved: stop mdns/lnrr when config changes to disabled on reload
Currently on reload mdns/lnrr are enabled if they were disabled,
but not viceversa. Fix it.

Follow-up for 14a52176798bc2d013297b503ac6fa49a64e2725

(cherry picked from commit 2976730a4d34749bfb7a88da341464f1834ab1c6)
2025-01-07 18:26:13 +00:00
Yu Watanabe
47f9a9879a sd-device: fix validation for devices under /sys/firmware/ in sd_device_new_from_subsystem_sysname()
Devices under /sys/firmware/ do not have subsystems. Hence, the
validation in sd_device_new_from_subsystem_sysname() ->
device_new_from_path_join() always failed.

Fixes a bug introduced by cd7c71154cd62d3f50c07ce387edd9c20aebd7bc (v257).
Fixes #35861.

(cherry picked from commit 3328d1e1816f408e6516c35991a89a8d21fd60b4)
2025-01-07 18:26:13 +00:00
Yu Watanabe
b3951fb0a8 sd-device: add missing debugging log
It was unexpectedly dropped by 660087dc9c4a5c610da99e7b6b1772e371eb0a80.

(cherry picked from commit 7e5238625ed4a879c2fe8ff7e457021d174bf083)
2025-01-07 18:26:13 +00:00
Daan De Meyer
85a9b7cfd1 repart: Use streq_ptr()
p->format is not guaranteed to be initialized.

(cherry picked from commit ffcdaec632d8b96b63499054ff3492b03b33e233)
2025-01-07 18:26:13 +00:00
Luca Boccassi
b6792202f3 core: fix assert when AddDependencyUnitFiles is called with invalid parameter
unit_file_add_dependency() asserts, so check before calling it that the
type is expected, or return EINVAL to the caller.

root@localhost:~# busctl call org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager AddDependencyUnitFiles "asssbb" 0 uwhatm8 After 1 1

Broadcast message from systemd-journald@localhost (Mon 2025-01-06 18:12:14 UTC):

systemd[1]: Caught <ABRT>, from our own process.

Fixes https://github.com/systemd/systemd/issues/35882

(cherry picked from commit d87dc74e8f1a30d72a0f202e411400bab34ab55a)
2025-01-07 18:26:13 +00:00
Daan De Meyer
54b90f783d fmf: Support being used downstream in dist-git tests
We can use our upstream fmf definitions to run downstream tests in
the Fedora systemd dist-git repository
(https://src.fedoraproject.org/rpms/systemd). To have access to the
dist-git sources when running the tests, we enable dist-git-source: true
downstream which makes the sources available in $TMT_SOURCE_DIR so
let's make sure we use those sources if they're available.

(cherry picked from commit 0eb7e29dfb388f746797675cef1ebd7bc3568b6e)
2025-01-07 18:26:13 +00:00
Daan De Meyer
80b0e03a8e fmf: Insist on mkosi sha being available
Let's assume the workflow file containing the mkosi always being
available.

Also fix the detection while we're at it by not leaving the systemd
directory.

(cherry picked from commit 9e76e9c9dc211440e79a7e27600593169597cc41)
2025-01-07 18:26:13 +00:00
Daan De Meyer
9db018d9ba ci: Rename qemu variable to vm
(cherry picked from commit c5981510e9744b9646088717aeef1ea71f74b1a6)
2025-01-07 18:26:13 +00:00
Daan De Meyer
d9bf9ede93 mkosi: Migrate more deprecated options
(cherry picked from commit 28baef47a3098bd82b27c0a629df6c5f885693e7)
2025-01-07 18:26:13 +00:00