Luca Boccassi [Thu, 14 Dec 2023 08:45:26 +0000 (08:45 +0000)]
Merge pull request #30417 from YHNdnzj/unit-log-resource
core/unit: clean up unit_log_resources
Artur Pak [Thu, 14 Dec 2023 06:32:54 +0000 (14:32 +0800)]
Add three Dell platforms to sensor accel location base
Daan De Meyer [Thu, 14 Dec 2023 08:38:17 +0000 (09:38 +0100)]
Merge pull request #30467 from poettering/loop-block-tweaks
various tweaks to block device ioctls, and loop device mgmt
Lennart Poettering [Fri, 8 Dec 2023 09:25:57 +0000 (10:25 +0100)]
rlimit-util: add pid_getrlimit() helper
This is gets the resource limits off a specified process, and is very
similar to prlimit() with a NULL new_rlimit argument. In fact, it tries
that first. However, it then falls back to use /proc/$PID/limits. Why?
Simply because Linux prohibits access to prlimit() for processes with a
different UID, but /proc/$PID/limits still works.
This is preparation to allow nspawn to run unprivileged.
Luca Boccassi [Thu, 14 Dec 2023 08:19:51 +0000 (08:19 +0000)]
Merge pull request #30469 from poettering/userdbd-tweaks2
userdb: some smaller userdb tweaks
Colin Walters [Thu, 14 Dec 2023 00:58:31 +0000 (19:58 -0500)]
docs/CREDENTIALS: Don't write authorized_keys with executable bits
No reason to make this file executable.
Lennart Poettering [Wed, 13 Dec 2023 15:48:58 +0000 (16:48 +0100)]
mount-util: make sure mount_switch_root() works as clean NOP when '/' is specified as target
Lennart Poettering [Wed, 13 Dec 2023 17:21:18 +0000 (18:21 +0100)]
userdbd: split out function to find listener fd
no actual code changes, just some refactoring and modernization
Lennart Poettering [Wed, 13 Dec 2023 17:19:42 +0000 (18:19 +0100)]
userbd: modernize process_connection() fd possession logic
Lennart Poettering [Wed, 13 Dec 2023 17:19:20 +0000 (18:19 +0100)]
userdbd: realign table
Lennart Poettering [Wed, 13 Dec 2023 17:19:00 +0000 (18:19 +0100)]
userdbd: drop redundant empty line
Lennart Poettering [Wed, 13 Dec 2023 17:18:39 +0000 (18:18 +0100)]
userdbd: properly close the listener fd on exit
Lennart Poettering [Mon, 4 Dec 2023 16:57:06 +0000 (17:57 +0100)]
update TODO
Lennart Poettering [Fri, 1 Dec 2023 16:16:25 +0000 (17:16 +0100)]
userwork: port to pidref_set_parent()
Lennart Poettering [Fri, 1 Dec 2023 16:14:33 +0000 (17:14 +0100)]
pidref: add pidref_set_parent() for race-freely getting pidref on ppid
Lennart Poettering [Mon, 4 Dec 2023 17:27:19 +0000 (18:27 +0100)]
dissect-tool: hide device column if it's a short-lived loopback device
It's pointless showing info that isn#t going to survive the current
invocation, hence hide it.
The "partition number" column is more useful since it kinda shows the
same information, but without the device node name prefixed that is
local to the currentl invocation.
Lennart Poettering [Mon, 4 Dec 2023 17:25:54 +0000 (18:25 +0100)]
dissect-tool: show sector/image size from DissectedImage object
The information is provided to us already in the structure now, hence
use it.
Lennart Poettering [Mon, 4 Dec 2023 17:04:44 +0000 (18:04 +0100)]
dissect-image: also store the image size in DissectedImage
That way we can easily access it the same way regardless if we operate
on a block device or on a regular file.
Lennart Poettering [Mon, 4 Dec 2023 17:02:45 +0000 (18:02 +0100)]
loop-util: remember if we created the LoopDevice
Let's store in a bool whether a LoopDevice object was created via
loop_device_open() or loop_device_make().
Lennart Poettering [Mon, 4 Dec 2023 17:01:39 +0000 (18:01 +0100)]
loop-util: also store the device size in LoopDevice
That makes the field easily accessible, just as the sector size.
Lennart Poettering [Mon, 4 Dec 2023 16:58:33 +0000 (17:58 +0100)]
blockdev-util: add new helper blockdev_get_device_size()
This function is just a wrapper around the BLKGETSIZE64. Which is a
pretty simple ioctl. The only reason to wrap it, is that the headers we
need to call it are a bit messy (as "linux/fs.h" is incompatible with
certain glibc headers). Hence add the simple helper that wraps it and
allows us to do the header mess needed in one file only.
It's also nicely symmetric to blockdev_get_sector_size().
Frantisek Sumsal [Wed, 13 Dec 2023 11:27:17 +0000 (12:27 +0100)]
test: install all necessary units & generators for LVM on Debian
And derivates.
Replaces: #30458
Luca Boccassi [Wed, 13 Dec 2023 13:50:41 +0000 (13:50 +0000)]
Merge pull request #30450 from poettering/cgroups-delegate-attr-update
cgroup: bring list of delegated cgroup attributes up-to-date with cur…
Zbigniew Jędrzejewski-Szmek [Wed, 13 Dec 2023 13:38:03 +0000 (14:38 +0100)]
Merge pull request #30232 from keszybz/ukify-imports
Use exec() to import ukify
Mike Yuan [Sun, 10 Dec 2023 17:36:22 +0000 (01:36 +0800)]
core/unit: clean up unit_log_resources
* Use a unified struct to store accounting fields/suffixes
* Use strextendf_with_separator where appropriate
* Don't mix stack and heap allocation for one iovec array
Mike Yuan [Sun, 10 Dec 2023 17:44:13 +0000 (01:44 +0800)]
core/unit: raise log level for unit_log_resources on certain memory thresholds
We already do this for all other types of accountings. Let's
make this nicer for memory accounting too.
Mike Yuan [Wed, 13 Dec 2023 11:25:40 +0000 (19:25 +0800)]
macro-fundamental: add U64_{K,M,G}B
Mike Yuan [Sun, 10 Dec 2023 16:12:30 +0000 (00:12 +0800)]
iovec-util: add missing assertion
Lennart Poettering [Wed, 13 Dec 2023 09:10:56 +0000 (10:10 +0100)]
test: test that delegation of some newer attrs that shall be delegated work
Lennart Poettering [Tue, 12 Dec 2023 09:54:55 +0000 (10:54 +0100)]
cgroup: bring list of delegated cgroup attributes up-to-date with current kernels
THis brings the list of attributes to delegate to managers of subcgroups
to the state of kernel 6.6.
We probably should unify this list, and maybe generate it automatically
from /sys/kernel/cgroup/delegate, but let's do that another time.
Lennart Poettering [Fri, 1 Dec 2023 16:59:49 +0000 (17:59 +0100)]
varlink: improve compat with varlink C reference implementation
The reference implementation seems to set the 'parameters' field for
method calls to 'null' if nothing is specified on its command line. We
so far only could deal if the parameters field was unset or set to the
empty object. Let's also accept the 'null' type.
Yu Watanabe [Wed, 13 Dec 2023 05:16:27 +0000 (14:16 +0900)]
Merge pull request #30433 from yuwata/network-nexthop-cleanups
network: introduce ManageForeignNextHops=
Yu Watanabe [Wed, 13 Dec 2023 05:15:05 +0000 (14:15 +0900)]
Merge pull request #30453 from poettering/dissect-fixes
dissect-image: various fixes
Frantisek Sumsal [Tue, 12 Dec 2023 22:01:31 +0000 (23:01 +0100)]
test: mask the mdmonitor.service
It's pulled in by one of the udev rules (63-md-raid-arrays.rules) and it
fails every time, because there's no valid email address in
/etc/mdadm.conf:
[ 5.778153] testsuite-64.sh[403]: mdadm: array /dev/md/mdmirror started.
[ 5.819137] kernel: md/raid1:md127: not clean -- starting background reconstruction
[ 5.819141] kernel: md/raid1:md127: active with 2 out of 2 mirrors
[ 5.819159] kernel: md127: detected capacity change from 0 to 129024
[ 5.821950] kernel: md: resync of RAID array md127
...
[ 5.887192] mdadm[424]: mdadm: No mail address or alert command - not monitoring.
[ 5.890772] systemd[1]: Starting mdmonitor.service...
[ 5.891718] systemd[1]: Started mdmonitor.service.
[ 5.892570] systemd[1]: mdmonitor.service: Main process exited, code=exited, status=1/FAILURE
[ 5.892618] systemd[1]: mdmonitor.service: Failed with result 'exit-code'.
And as we (re)assemble the MD devices multiple times, this gets quite
noisy, especially since we later start hitting the service start rate
limit.
Fedora has the mdmonitor.service patched, so it won't start without
/etc/mdadm.conf being present, but Arch uses the upstream unit which
doesn't have such guard.
Let's just mask the service completely, which replaces all that noise
with one warning:
[ 6.553583] testsuite-64.sh[294]: + udevadm wait --settle ...
[ 6.580700] systemd[1]: sys-devices-virtual-block-md127.device: Failed to enqueue SYSTEMD_WANTS job, ignoring: Unit mdmonitor.service is masked.
Will Springer [Tue, 12 Dec 2023 22:27:21 +0000 (14:27 -0800)]
man: make minor corrections to smbios-type-11(7)
- Correct initial version of io.systemd.credential* to 252
- Fix leftover copy-pasted heading
Lennart Poettering [Mon, 4 Dec 2023 17:07:18 +0000 (18:07 +0100)]
dissect-tool: right-align the partition number
The right-alignment was applied to the wrong column, because neither
ee8e497d249ab2e2df92aa024274f5b817270114 nor
1474d7ac2d308204e599a2502a8b5625bca76bcc updated the column count as
they should have.
David Tardon [Tue, 12 Dec 2023 14:47:33 +0000 (15:47 +0100)]
openssl-util: avoid freeing invalid pointer
Lennart Poettering [Mon, 4 Dec 2023 17:28:45 +0000 (18:28 +0100)]
dissect-image: move comment to right place
The image name is extracted from the image path originally passed in,
i.e. not the contents of the image. And the image UUID is directly
retrieved from the partition table, hence also not from the contents.
Let's hence move the comment to separate out the stuff extract from the
file systems (and thus only available when mounting/with privs/with
block devices) from the data available without any of that.
Lennart Poettering [Mon, 4 Dec 2023 17:21:23 +0000 (18:21 +0100)]
dissect-image: fix fd leak in dissected_image_acquire_metadata()
We have to go through the "finish" label to properly close all pipes in
the error path, so that we don't leak them.
Lennart Poettering [Mon, 4 Dec 2023 17:20:36 +0000 (18:20 +0100)]
dissect-image: don't try to validate an extension release file with no image name
Otherwise we might validate the OS release file instead…
Lennart Poettering [Mon, 4 Dec 2023 17:19:27 +0000 (18:19 +0100)]
dissect-image: handle 'continue' event in metadata acquisition uniformly
Let's jump to the same label in all cases, that closes the associated
pipe, systematically.
Lennart Poettering [Mon, 4 Dec 2023 17:18:48 +0000 (18:18 +0100)]
dissect-image: path[] is now defined for all metadata fields
There's no point in handling a case that never can happen.
Lennart Poettering [Wed, 6 Dec 2023 15:38:53 +0000 (16:38 +0100)]
execute: improve log message about TTY ownership reset failures
Yu Watanabe [Mon, 11 Dec 2023 18:13:09 +0000 (03:13 +0900)]
test-network: add test for ManageForeignNextHops=no
Yu Watanabe [Mon, 11 Dec 2023 18:10:28 +0000 (03:10 +0900)]
test-network: reduce indent for verification
Yu Watanabe [Mon, 11 Dec 2023 18:16:49 +0000 (03:16 +0900)]
test-network: drop redundant call of tearDown()
Yu Watanabe [Mon, 11 Dec 2023 17:29:25 +0000 (02:29 +0900)]
network/nexthop: introduce ManageForeignNextHops= boolean setting
Closes #29034.
Frantisek Sumsal [Tue, 12 Dec 2023 11:43:36 +0000 (12:43 +0100)]
test: "never" is not a valid value for Restart=
[ 154.140565] testsuite-07.sh[1014]: + systemctl start badbin_assert.socket
[ 154.738606] testsuite-07.sh[1014]: + socat - ABSTRACT-CONNECT:badbin_assert.socket
[ 154.768418] systemd[1]: Cannot find unit for notify message of PID 1021, ignoring.
[ 154.812357] systemd[1]: /run/systemd/system/badbin_assert.service:3: Failed to parse service restart specifier, ignoring: never
[ 155.347350] testsuite-07.sh[1014]: + timeout 10 sh -c 'while systemctl is-active badbin_assert.service; do sleep .5; done'
[ 155.669695] (badbin)[1045]: badbin_assert.service: Failed to execute /tmp/badbin: Exec format error
[ 155.676596] systemd[1]: badbin_assert.service: Failed with result 'exit-code'.
[ 156.081953] testsuite-07.sh[1051]: failed
[ 156.132018] testsuite-07.sh[1054]: ++ systemctl show -P ExecMainStatus badbin_assert.service
[ 156.326583] (badbin)[1050]: badbin_assert.service: Failed to execute /tmp/badbin: Exec format error
[ 156.343566] systemd[1]: badbin_assert.service: Failed with result 'exit-code'.
[ 156.904658] (badbin)[1055]: badbin_assert.service: Failed to execute /tmp/badbin: Exec format error
[ 156.913709] systemd[1]: badbin_assert.service: Failed with result 'exit-code'.
[ 157.066900] testsuite-07.sh[1014]: + [[ 0 == 203 ]]
[ 157.081588] testsuite-07.sh[618]: + echo 'Subtest /usr/lib/systemd/tests/testdata/units/testsuite-07.issue-30412.sh failed'
Follow-up for
1eeaa93de36.
Yu Watanabe [Tue, 12 Dec 2023 13:02:44 +0000 (22:02 +0900)]
Merge pull request #30445 from mrc0mmand/networkd-test-skip
Temporarily skip tests with known issues in the systemd-networkd test suite
Lennart Poettering [Wed, 6 Dec 2023 15:37:18 +0000 (16:37 +0100)]
execute: handle gracefully if we cannot lock /dev/console when resetting tty due to perms
This is the common case in --user instances, hence handle this
gracefully.
This should be safe since user instances won't get access to
/dev/console-related ttys anyway, but only their own ptys.
Yu Watanabe [Tue, 12 Dec 2023 13:00:35 +0000 (22:00 +0900)]
Merge pull request #30441 from poettering/nspawn-fixlets
nspawn: two trivial nspawn tweaklets
Yu Watanabe [Tue, 12 Dec 2023 12:59:34 +0000 (21:59 +0900)]
Merge pull request #30437 from YHNdnzj/job-start-msg
core/job: emit job start message if we're only waiting for unit state
Mike Yuan [Tue, 12 Dec 2023 08:20:32 +0000 (16:20 +0800)]
hibernate-resume: don't wait forever if hibernate info is from EFI
Frantisek Sumsal [Tue, 12 Dec 2023 11:25:47 +0000 (12:25 +0100)]
test: temporarily skip checking NFT sets in test_address_static
Until https://github.com/systemd/systemd/issues/30427 is resolved.
Frantisek Sumsal [Tue, 12 Dec 2023 11:20:41 +0000 (12:20 +0100)]
test: temporarily disable test_sysctl
Until https://github.com/systemd/systemd/issues/30056 is resolved.
Lennart Poettering [Tue, 12 Dec 2023 10:02:28 +0000 (11:02 +0100)]
nspawn: drop redundant assignments
Lennart Poettering [Tue, 12 Dec 2023 09:58:56 +0000 (10:58 +0100)]
nspawn: suffix some paths in log messages with /, as per coding style
Yu Watanabe [Tue, 12 Dec 2023 10:03:21 +0000 (19:03 +0900)]
Merge pull request #30156 from yuwata/network-mtu
network: accept arbitrary size of MTU in .network
Yu Watanabe [Tue, 12 Dec 2023 09:56:57 +0000 (18:56 +0900)]
Merge pull request #30426 from mrc0mmand/nft-shenanigans
network: show the reason why NFT operation failed
Frantisek Sumsal [Mon, 11 Dec 2023 15:16:02 +0000 (16:16 +0100)]
network: actually show the unexpected flags
The original version would yield a slightly _unexpected_ message for
this [Address] section:
[Address]
Address=10.9.3.1/24
HomeAddress=yes
ManageTemporaryAddress=yes
systemd-networkd[68396]: /run/systemd/network/25-address-static.network: unexpected address flags "n/a" were configured. Ignoring [Address] section from line 144.
Let's instead show the unexpected flags:
systemd-networkd[69160]: /run/systemd/network/25-address-static.network: unexpected address flags "home-address,manage-temporary-address" were configured. Ignoring [Address] section from line 144.
Mike Yuan [Tue, 12 Dec 2023 08:33:13 +0000 (16:33 +0800)]
core/job: emit job start message if we're only waiting for unit state
Currently, start/stop messages for device units are not used, since
job_perform_on_unit() does nothing and we simply wait for unit status
change. I think we still want some nice log messages explaining what
the start jobs for devices are doing, so let's fix this.
Mike Yuan [Tue, 12 Dec 2023 08:42:19 +0000 (16:42 +0800)]
core/device: add stopping job message
The use case for stopping a device unit is indeed narrow,
but we still want to show a clear message.
Preparation for later commits.
Oğuz Ersen [Mon, 11 Dec 2023 13:43:51 +0000 (14:43 +0100)]
po: Translated using Weblate (Turkish)
Currently translated at 100.0% (227 of 227 strings)
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/tr/
Translation: systemd/main
Yu Watanabe [Mon, 11 Dec 2023 14:58:59 +0000 (23:58 +0900)]
network: drop redundant 'struct'
Luca Boccassi [Mon, 11 Dec 2023 15:56:21 +0000 (15:56 +0000)]
Merge pull request #30363 from yuwata/analyze-find-template
analyze: also find template unit when an instance is specified
Luca Boccassi [Mon, 11 Dec 2023 01:03:39 +0000 (01:03 +0000)]
executor: don't duplicate FD array to avoid double closing
Just use ExecParam directly, as these are all internal to sd-exec now
anyway. Avoids double close when execution fails after FDs are set up
for inheritance and were already re-arranged.
Fixes https://github.com/systemd/systemd/issues/30412
Yu Watanabe [Mon, 11 Dec 2023 15:23:11 +0000 (00:23 +0900)]
Merge pull request #30422 from yuwata/network-tiny-fixes
network: tiny fixes
Frantisek Sumsal [Mon, 11 Dec 2023 13:51:25 +0000 (14:51 +0100)]
network: show the reason why NFT operation failed
Frantisek Sumsal [Mon, 11 Dec 2023 13:50:32 +0000 (14:50 +0100)]
network: add a missing space
Daan De Meyer [Sun, 10 Dec 2023 16:02:38 +0000 (17:02 +0100)]
kernel-install: Fix inspect with --root= when no version is specified
Using the kernel version from the host is incorrect in this case, so
fix the logic so it handles no version being specified correctly with
--root=.
ksaleem [Wed, 6 Dec 2023 16:44:24 +0000 (11:44 -0500)]
bootctl: fix case-sensitive comparisons in reporting bootloader entries
Fixes #30159
Yu Watanabe [Mon, 11 Dec 2023 09:37:05 +0000 (18:37 +0900)]
Merge pull request #30389 from keszybz/test-ukify-du
Remove temporary directories created by test_ukify
Daan De Meyer [Sun, 10 Dec 2023 13:20:08 +0000 (14:20 +0100)]
kernel-install: Look for uki.conf in /usr/lib/kernel as well
Yu Watanabe [Mon, 11 Dec 2023 06:44:08 +0000 (15:44 +0900)]
network: drop unused Manager.routes_foreign
Yu Watanabe [Mon, 11 Dec 2023 06:19:02 +0000 (15:19 +0900)]
network: adjust log message
The address or neighbor processed here may not be foreign.
Yu Watanabe [Fri, 8 Dec 2023 01:41:49 +0000 (10:41 +0900)]
test: add test cases for issue #30357
Yu Watanabe [Thu, 7 Dec 2023 10:29:29 +0000 (19:29 +0900)]
analyze: also find template unit when a template instance is specified
Fixes a regression caused by
2f6181ad4d6c126e3ebf6880ba30b3b0059c6fc8.
Fixes #30357.
Co-authored-by: Jeff King <peff@peff.net>
Yu Watanabe [Sun, 10 Dec 2023 07:03:52 +0000 (16:03 +0900)]
network/neighbor: add missing OOM check
JmbFountain [Sun, 10 Dec 2023 22:37:44 +0000 (23:37 +0100)]
Adding Trekstor Primebook C13 rotation to 60-sensor.hwdb (#30415)
* Adding Trekstor Primebook C13 rotation to 60-sensor.hwdb
Daan De Meyer [Sun, 10 Dec 2023 17:13:01 +0000 (18:13 +0100)]
mkosi: Copy /boot into the ESP as well
Newer mkosi will start installing UKIs to /boot so prepare for that
by making sure we also copy /boot into the ESP.
Luca Boccassi [Sun, 10 Dec 2023 18:42:24 +0000 (18:42 +0000)]
Merge pull request #30406 from yuwata/resolve-clean-exit
resolve: make resolved exit cleanly
Luca Boccassi [Sun, 10 Dec 2023 14:13:37 +0000 (14:13 +0000)]
Merge pull request #30404 from yuwata/network-peer
network/route: fix reachability check when peer address is specified
Luca Boccassi [Sun, 10 Dec 2023 12:54:17 +0000 (12:54 +0000)]
Merge pull request #30407 from yuwata/network-clean-exit
network: make networkd exit cleanly
Yu Watanabe [Wed, 6 Dec 2023 05:41:42 +0000 (14:41 +0900)]
test: update log message and use SYNTHETIC_ERRNO()
Follow-up for
ce5a6d5307568671cec7c253e984ffc0eafa726b.
Addresses https://github.com/systemd/systemd/pull/30049#discussion_r1395453408.
Mike Yuan [Sun, 10 Dec 2023 11:05:27 +0000 (19:05 +0800)]
elf2efi: remove outdated comment mentioning linker script
Follow-up for
142f0c61a37091e233b80f02375cff1114dab24a
Yu Watanabe [Sun, 10 Dec 2023 05:33:48 +0000 (14:33 +0900)]
resolve: fix wrong error cause assignment to log_debug_errno()
Fixes #30392.
Mike Yuan [Fri, 8 Dec 2023 18:22:04 +0000 (02:22 +0800)]
core/exec-invoke: sigwait() returns positive errno and never EINTR
Follow-up for
5b6319dceedd81f3f1ce7eb70ea5defaef43bcec (gosh this is
ancient), and effectively reverts
3dead8d925ea9db1fbd65b702b6b807e49ddeacf.
sigwait() is documented to "suspend execution of the calling thread
until one of the signals specified in the signal set becomes pending".
And the only error it returns is EINVAL, when "set contains an invalid
signal number". Therefore, there's no need to run it in a loop or
to check for runtime error.
Yu Watanabe [Thu, 7 Dec 2023 05:57:29 +0000 (14:57 +0900)]
test-network: check if networkd exits cleanly
Yu Watanabe [Thu, 7 Dec 2023 05:45:07 +0000 (14:45 +0900)]
network/ipv4ll: do not start sd-ipv4ll on exit
When assert_return() is critical, the following assertion is triggered
on exit:
---
#0 0x00007f8b1f6b0884 in __pthread_kill_implementation () from target:/lib64/libc.so.6
#1 0x00007f8b1f65fafe in raise () from target:/lib64/libc.so.6
#2 0x00007f8b1f64887f in abort () from target:/lib64/libc.so.6
#3 0x00007f8b208d02d6 in log_assert_failed (text=0x7f8b210009e0 "e->state != SD_EVENT_FINISHED", file=0x7f8b20fff403 "src/libsystemd/sd-event/sd-event.c",
line=1252, func=0x7f8b21004400 <__func__.154> "sd_event_add_io") at ../src/basic/log.c:948
#4 0x00007f8b208d0457 in log_assert_failed_return (text=0x7f8b210009e0 "e->state != SD_EVENT_FINISHED",
file=0x7f8b20fff403 "src/libsystemd/sd-event/sd-event.c", line=1252, func=0x7f8b21004400 <__func__.154> "sd_event_add_io") at ../src/basic/log.c:967
#5 0x00007f8b20c7d102 in sd_event_add_io (e=0x617000000080, ret=0x60c000000a20, fd=11, events=1, callback=0x7dfd85 <ipv4acd_on_packet>,
userdata=0x60c000000a00) at ../src/libsystemd/sd-event/sd-event.c:1252
#6 0x00000000007e3934 in sd_ipv4acd_start (acd=0x60c000000a00, reset_conflicts=true) at ../src/libsystemd-network/sd-ipv4acd.c:597
#7 0x00000000007e72b9 in ipv4ll_start_internal (ll=0x6080000006a0, reset_generation=true) at ../src/libsystemd-network/sd-ipv4ll.c:278
#8 0x00000000007e7462 in sd_ipv4ll_start (ll=0x6080000006a0) at ../src/libsystemd-network/sd-ipv4ll.c:298
#9 0x00000000006047a1 in dhcp4_handler (client=0x617000000400, event=0, userdata=0x61a000000680) at ../src/network/networkd-dhcp4.c:1183
#10 0x000000000075b1ed in client_notify (client=0x617000000400, event=0) at ../src/libsystemd-network/sd-dhcp-client.c:783
#11 0x000000000075bf8d in client_stop (client=0x617000000400, error=0) at ../src/libsystemd-network/sd-dhcp-client.c:821
#12 0x000000000077710f in sd_dhcp_client_stop (client=0x617000000400) at ../src/libsystemd-network/sd-dhcp-client.c:2388
#13 0x000000000065cdd1 in link_stop_engines (link=0x61a000000680, may_keep_dhcp=true) at ../src/network/networkd-link.c:336
#14 0x000000000041f214 in manager_free (m=0x618000000080) at ../src/network/networkd-manager.c:613
#15 0x00000000004124e3 in manager_freep (p=0x7f8b1c800040) at ../src/network/networkd-manager.h:128
#16 0x00000000004139f6 in run (argc=1, argv=0x7ffffe4522e8) at ../src/network/networkd.c:24
#17 0x0000000000413b20 in main (argc=1, argv=0x7ffffe4522e8) at ../src/network/networkd.c:119
---
Prompted by https://github.com/systemd/systemd/pull/30049#issuecomment-
1844087965.
Yu Watanabe [Thu, 7 Dec 2023 06:19:10 +0000 (15:19 +0900)]
test: check if resolved exits cleanly
Yu Watanabe [Thu, 7 Dec 2023 05:28:12 +0000 (14:28 +0900)]
resolve: do not trigger assertion on exit
By making assert_return() critical, we observe the following:
---
Program received signal SIGABRT, Aborted.
0x00007f01320b0884 in __pthread_kill_implementation () from /lib64/libc.so.6
(gdb) bt
#0 0x00007f01320b0884 in __pthread_kill_implementation ()
from /lib64/libc.so.6
#1 0x00007f013205fafe in raise () from /lib64/libc.so.6
#2 0x00007f013204887f in abort () from /lib64/libc.so.6
#3 0x00007f01338d02d6 in log_assert_failed (
text=0x7f01340009e0 "e->state != SD_EVENT_FINISHED",
file=0x7f0133fff403 "src/libsystemd/sd-event/sd-event.c", line=1399,
func=0x7f01340045a0 <__func__.148> "sd_event_add_time")
at ../src/basic/log.c:948
#4 0x00007f01338d0457 in log_assert_failed_return (
text=0x7f01340009e0 "e->state != SD_EVENT_FINISHED",
file=0x7f0133fff403 "src/libsystemd/sd-event/sd-event.c", line=1399,
func=0x7f01340045a0 <__func__.148> "sd_event_add_time")
at ../src/basic/log.c:967
#5 0x00007f0133c7ed83 in sd_event_add_time (e=0x617000022280,
ret=0x610000007e98, clock=7, usec=
24054941030, accuracy=0,
callback=0x4625b4 <on_announcement_timeout>, userdata=0x610000007e40)
at ../src/libsystemd/sd-event/sd-event.c:1399
#6 0x00007f0133c7f725 in sd_event_add_time_relative (e=0x617000022280,
ret=0x610000007e98, clock=7, usec=
1000000, accuracy=0,
callback=0x4625b4 <on_announcement_timeout>, userdata=0x610000007e40)
at ../src/libsystemd/sd-event/sd-event.c:1462
#7 0x0000000000464cac in dns_scope_announce (scope=0x610000007e40, goodbye=true) at ../src/resolve/resolved-dns-scope.c:1530
#8 0x0000000000504d08 in link_free (l=0x612000023d40) at ../src/resolve/resolved-link.c:83
#9 0x000000000052dbbd in manager_free (m=0x619000000a80) at ../src/resolve/resolved-manager.c:697
#10 0x0000000000562328 in manager_freep (p=0x7f012f800040) at ../src/resolve/resolved-manager.h:198
#11 0x000000000056315a in run (argc=1, argv=0x7fff22b06468) at ../src/resolve/resolved.c:25
#12 0x0000000000563284 in main (argc=1, argv=0x7fff22b06468) at ../src/resolve/resolved.c:99
---
Prompted by https://github.com/systemd/systemd/pull/30049#issuecomment-
1844087965.
Yu Watanabe [Sun, 10 Dec 2023 05:26:30 +0000 (14:26 +0900)]
Yu Watanabe [Sun, 10 Dec 2023 05:25:31 +0000 (14:25 +0900)]
Mike Yuan [Fri, 8 Dec 2023 16:06:16 +0000 (00:06 +0800)]
core/executor: do destruct static variables and selinux before exiting
I was wondering why I couldn't trigger the assertion in safe_fclose()
when submitting #30251. It turned out that the static destructor was
not run at all :/
Replace main() with a minimized version of main-func.h. This also
prevents emitting negative exit codes.
Yu Watanabe [Sun, 10 Dec 2023 05:11:05 +0000 (14:11 +0900)]
Merge pull request #30399 from YHNdnzj/memory-accounting-always-peak
systemctl-show: always show memory peak if available
Mike Yuan [Sat, 9 Dec 2023 14:34:43 +0000 (22:34 +0800)]
hibernate-util: de-duplicate clear_efi_hibernate_location
Yu Watanabe [Sun, 10 Dec 2023 05:07:37 +0000 (14:07 +0900)]
Merge pull request #30400 from bluca/coverity
Assorted coverity fixes
Yu Watanabe [Sun, 10 Dec 2023 05:04:28 +0000 (14:04 +0900)]
test-network: add test case for issue #30403
Yu Watanabe [Sun, 10 Dec 2023 04:56:46 +0000 (13:56 +0900)]
network/route: fix reachability check when peer address is specified
When an address with peer address is specified, the kernel by default
adds the prefix route for the peer address. When ManageForeignRoute=no
is set, then we also needs to check the prefix for the peer address.
Fixes #30403.
Luca Boccassi [Sat, 9 Dec 2023 13:10:18 +0000 (13:10 +0000)]
test-login: remove dead code
HANDLE_SLEEP is == _HANDLE_ACTION_SLEEP_LAST and the loop is bounded
by < _HANDLE_ACTION_SLEEP_LAST, so no need to check for it
CID#
1529414