From: Zbigniew Jędrzejewski-Szmek Date: Mon, 15 Jul 2019 15:27:26 +0000 (+0200) Subject: systemctl: emit warning when we get an invalid process entry from pid1 and continue X-Git-Tag: v243-rc1~120^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=107c20518bb27be438996819400773e39c47c77f;p=thirdparty%2Fsystemd.git 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 --- diff --git a/src/shared/bus-unit-procs.c b/src/shared/bus-unit-procs.c index aeba2ebfd39..054a1410acc 100644 --- a/src/shared/bus-unit-procs.c +++ b/src/shared/bus-unit-procs.c @@ -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); diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 0305f611941..162650ec90f 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -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)