Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
shutdown -h h:m broken, shuts down the system immediately #1120
Comments
|
@jsynacek this is probably for you |
|
Works for me on Fedora Rawhide:
Is the action blocked by AppArmor? Is there anything interesting in the logs? Maybe polkit is blocking the action? |
|
AppArmor is not enabled. As for polkit: I issued that command as root, so I don't think it should have any effect. |
Why does a failed wall message trigger an immediate shutdown? That sounds wrong. |
|
fwiw, this is from a minimal chroot, no desktop session or polkit agent running. |
|
I'm also seeing this in the journal, when that happens:
|
|
and the backtrace
|
mbiebl
added
login
regression
labels
Sep 4, 2015
|
@jsynacek I'm able to reproduce the problem in a fedora rawhide VM with systemd v225 as well. |
|
Confirming as well on Ubuntu with systemd v225 (225-1ubuntu1) where systemd-logind segfault when you shutdown at any giving time as soon as the wall message prints. |
|
I can reproduce this as well, the important part is that there is no polkit installed. |
poettering
added
the
needs-reporter-feedback
label
Sep 4, 2015
|
@poettering I applied both patches, but they didn't help. Assertion 's' failed at src/basic/util.c:1520, function cescape(). Aborting. I don't know why, but, at least on my machine, after SetWallMessage is called over dbus, the method_set_wall_message() handler in logind-dbus.c calls "sd_bus_message_read(message, "sb", &wall_message, &enable_wall_messages);", which for some reason passes but leaves wall_message undefined. Any idea why that might happen? |
mbiebl
added
the
release-critical
label
Sep 5, 2015
poettering
added this to the v226 milestone
Sep 5, 2015
|
This should fix it: diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
index 7cc68d4..beae75e 100644
--- a/src/login/logind-dbus.c
+++ b/src/login/logind-dbus.c
@@ -1796,9 +1796,11 @@ static int update_schedule_file(Manager *m) {
if (r < 0)
return log_error_errno(r, "Failed to create shutdown subdirectory: %m");
- t = cescape(m->wall_message);
- if (!t)
- return log_oom();
+ if (!isempty(m->wall_message)) {
+ t = cescape(m->wall_message);
+ if (!t)
+ return log_oom();
+ }
r = fopen_temporary("/run/systemd/shutdown/scheduled", &f, &temp_path);
if (r < 0)
|
|
Btw., this is a regression from:
|
added a commit
to dvdhrm/systemd
that referenced
this issue
Sep 5, 2015
|
@dvdhrm confirmed fixed with those patches applied, thanks! Closing the bug report. |
mbiebl
closed this
Sep 5, 2015
|
@dvdhrm Thanks for fixing this! |
huguesb
referenced this issue
in coreos/bugs
Dec 2, 2015
Closed
Shutdown issues in CoreOS 835.8.0 #1009
added a commit
to pbx0/systemd
that referenced
this issue
Dec 3, 2015
quequotion
commented
Feb 1, 2016
|
Still broken or reverted: Not sure how this is possible. |
|
This is fixed with commit 0671d7f. This will be part of the next release. In the meantime, could you try the current git head, or ask your distribution to cherry-pick the commit, please? |
mbiebl commentedSep 2, 2015
Version: 225
Bug-Debian: http://bugs.debian.org/797763
After upgrading systemd from 224-2 to 225-1 shutdown at a scheduled time (shutdown h:m) shuts down the system immediately, not at
the scheduled time.
Using systemd 224-2 it works correctly, shutting down at the scheduled time according to /var/run/systemd/shutdown/scheduled.
A git bisect shows 9ef1502 as the faulty commit and reverting that indeed fixes the issue.