systemd-sysctl crashes when there's a comment at the end of a line

Bug #1652918 reported by Niklas Sombert
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

I have this line in /etc/sysrq.d/10-magic-sysrq.conf:

kernel.sysrq = 1 #176

This has worked in Ubuntu 14.04.

Although there are errors and warnings, the setting seems to be applied on boot.

niklas@panzersperre~> systemctl status systemd-sysctl.service
● systemd-sysctl.service - Apply Kernel Variables
   Loaded: loaded (/lib/systemd/system/systemd-sysctl.service; static; vendor preset: enabled)
   Active: failed (Result: exit-code) since Di 2016-12-27 18:31:50 CET; 16h ago
     Docs: man:systemd-sysctl.service(8)
           man:sysctl.d(5)
  Process: 770 ExecStart=/lib/systemd/systemd-sysctl (code=exited, status=1/FAILURE)
 Main PID: 770 (code=exited, status=1/FAILURE)

Dez 27 18:31:50 panzersperre systemd[1]: Starting Apply Kernel Variables...
Dez 27 18:31:50 panzersperre systemd[1]: systemd-sysctl.service: Main process exited, code=exited, stat
Dez 27 18:31:50 panzersperre systemd[1]: Failed to start Apply Kernel Variables.
Dez 27 18:31:50 panzersperre systemd[1]: systemd-sysctl.service: Unit entered failed state.
Dez 27 18:31:50 panzersperre systemd[1]: systemd-sysctl.service: Failed with result 'exit-code'.

niklas@panzersperre~> sudo /lib/systemd/systemd-sysctl
Couldn't write '1 #176' to 'kernel/sysrq', ignoring: Invalid argument

niklas@panzersperre~> sysctl kernel.sysrq
kernel.sysrq = 1

niklas@panzersperre~> lsb_release -rd
Description: Ubuntu 16.04.1 LTS
Release: 16.04

niklas@panzersperre~> env LANG=C apt-cache policy systemd
systemd:
  Installed: 229-4ubuntu13
  Candidate: 229-4ubuntu13
  Version table:
 *** 229-4ubuntu13 500
        500 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     229-4ubuntu10 500
        500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
     229-4ubuntu4 500
        500 http://de.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

niklas@panzersperre~> /lib/systemd/systemd-sysctl --version
systemd 229
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN

Revision history for this message
Niklas Sombert (ytvwld) wrote :

This seems to be fixed in systemd 231. (Tested with a recent version of Fedora.)

Dan Streetman (ddstreet)
Changed in systemd (Ubuntu):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.