-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
bug 🐛Programming errors, that need preferential fixingProgramming errors, that need preferential fixingpid1regression ⚠️A bug in something that used to work correctly and broke through some recent commitA bug in something that used to work correctly and broke through some recent commit
Milestone
Description
systemd version the issue has been seen with
256-rc3 and git main
Used distribution
Debian and custom embedded distro
Linux kernel version used
6.8.9
CPU architectures issue was seen on
x86_64
Component
systemd
Expected behaviour you didn't see
When a service stop systemd should print:
xxx.service: Consumed X.XXXs CPU time.
or similar in the journal
Unexpected behaviour you saw
The message no longer shows up.
Steps to reproduce the problem
Just stop any service.
Additional program output to the terminal or log subsystem illustrating the issue
Attaching a debugger shows why:
Breakpoint 2, unit_get_cpu_usage (u=u@entry=0x1d18250, ret=0xbefe32a0, ret@entry=0xbefe32e8) at ../../../../../systemd/src/core/cgroup.c:4650
4650 if (!crt || !crt->cgroup_path)
(gdb) print crt
$1 = (CGroupRuntime *) 0x0
(gdb) bt
#0 unit_get_cpu_usage (u=u@entry=0x1d18250, ret=0xbefe32a0, ret@entry=0xbefe32e8) at ../../../../../systemd/src/core/cgroup.c:4650
#1 0xb6f3e70e in unit_log_resources (u=0x1d18250) at ../../../../../systemd/src/core/unit.c:2343
#2 unit_notify (u=u@entry=0x1d18250, os=<optimized out>, ns=UNIT_INACTIVE, reload_success=<optimized out>) at ../../../../../systemd/src/core/unit.c:2697
#3 0xb6f09aa8 in service_set_state (s=s@entry=0x1d18250, state=state@entry=SERVICE_DEAD) at ../../../../../systemd/src/core/service.c:1267
#4 0xb6f0e6f8 in service_enter_dead (s=0x1d18250, f=<optimized out>, allow_restart=<optimized out>) at ../../../../../systemd/src/core/service.c:2031
#5 0xb6f0fdec in service_enter_signal (s=<optimized out>, state=<optimized out>, f=<optimized out>) at ../../../../../systemd/src/core/service.c:2172
#6 0xb6f15492 in service_sigchld_event (u=0x1d18250, pid=<optimized out>, code=1, status=0) at ../../../../../systemd/src/core/service.c:3826
#7 0xb6ef2332 in manager_invoke_sigchld_event (si=0xbefe3474, u=0x1d18250, m=<optimized out>) at ../../../../../systemd/src/core/manager.c:2870
#8 manager_dispatch_sigchld (source=<optimized out>, userdata=0x1c79b90) at ../../../../../systemd/src/core/manager.c:2932
#9 0xb6dc3e4c in source_dispatch (s=0x1c7afc8) at ../../../../../systemd/src/libsystemd/sd-event/sd-event.c:4262
#10 0xb6dc427c in sd_event_dispatch (e=<optimized out>, e@entry=0x1c7a180) at ../../../../../systemd/src/libsystemd/sd-event/sd-event.c:4843
#11 0xb6dc491c in sd_event_run (e=<optimized out>, e@entry=0x1c7a180, timeout=<optimized out>) at ../../../../../systemd/src/libsystemd/sd-event/sd-event.c:4904
#12 0xb6ef6884 in manager_loop (m=m@entry=0x1c79b90) at ../../../../../systemd/src/core/manager.c:3369
#13 0x00462c74 in invoke_main_loop (ret_error_message=0xbefe366c, ret_switch_root_init=<synthetic pointer>, ret_switch_root_dir=<synthetic pointer>, ret_fds=0xbefe3674,
ret_retval=<synthetic pointer>, saved_rlimit_memlock=0xbefe36e0, saved_rlimit_nofile=0xbefe36d0, m=<optimized out>) at ../../../../../systemd/src/core/main.c:2101The cgroup runtime is deleted first so unit_get_cpu_usage() no longer returns any valid data.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bug 🐛Programming errors, that need preferential fixingProgramming errors, that need preferential fixingpid1regression ⚠️A bug in something that used to work correctly and broke through some recent commitA bug in something that used to work correctly and broke through some recent commit