1
0
mirror of https://github.com/systemd/systemd.git synced 2025-08-02 04:22:27 +03:00

systemctl: emit warning when we get an invalid process entry from pid1 and continue

Output looks like this:
Invalid process description in GetUnitProcesses reply: cgroup="machine.slice/machine-rawhide.scope/payload/system.slice/systemd-journald.service" pid=638367 command="/usr/lib/systemd/systemd-journald", ignoring: Invalid argument
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2019-07-15 17:27:26 +02:00
parent 8eb0cafeb0
commit 107c20518b
2 changed files with 6 additions and 2 deletions

View File

@ -387,8 +387,11 @@ int unit_show_processes(
break;
r = add_process(cgroups, path, pid, name);
if (r < 0)
if (r == -ENOMEM)
goto finish;
if (r < 0)
log_warning_errno(r, "Invalid process description in GetUnitProcesses reply: cgroup=\"%s\" pid="PID_FMT" command=\"%s\", ignoring: %m",
path, pid, name);
}
r = sd_bus_message_exit_container(reply);

View File

@ -4548,7 +4548,8 @@ static void print_status_info(
show_cgroup_and_extra(SYSTEMD_CGROUP_CONTROLLER, i->control_group, prefix, c, extra, k, get_output_flags());
} else if (r < 0)
log_warning_errno(r, "Failed to dump process list for '%s', ignoring: %s", i->id, bus_error_message(&error, r));
log_warning_errno(r, "Failed to dump process list for '%s', ignoring: %s",
i->id, bus_error_message(&error, r));
}
if (i->id && arg_transport == BUS_TRANSPORT_LOCAL)