journald forwards to syslog with facility=KERN on everything

Bug #1613751 reported by Nathan Dorfman
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
systemd
Fix Released
Unknown
systemd (Debian)
Confirmed
Unknown
systemd (Ubuntu)
Fix Committed
Low
Unassigned

Bug Description

NetworkManager's copious syslog output is for some reason making its way into my /var/log/kern.log file. This includes a couple dozen <info> lines at startup and a similar amount when connecting to WiFi with DHCP.

The NM man page states that the default facility should be DAEMON, as does the NM wiki -- see http://manpages.ubuntu.com/manpages/xenial/man8/NetworkManager.8.html and https://wiki.gnome.org/Projects/NetworkManager/Debugging

Hopefully, it goes without saying that the KERN facility is reserved for the kernel and shouldn't be messed with by anything from userland.

Nothing in the rsyslog configs references kern.log except the one expected line:
/etc/rsyslog.d/50-default.conf:kern.* -/var/log/kern.log

Nothing in NetworkManager.conf references syslog or its facilities. Oh, and these messages do also correctly make it to syslog.log. I've no idea how or why they also end up in kern.log, though.

This doesn't happen on Ubuntu 14.04:
% zgrep -cv kernel: /var/log/kern.log*
/var/log/kern.log:0
/var/log/kern.log.1:0
/var/log/kern.log.2.gz:0
/var/log/kern.log.3.gz:0
/var/log/kern.log.4.gz:0

On Ubuntu 16.04.1, NM is the major culprit, although there were also a few lines from gnome-session:
% zgrep -cv kernel: /mnt/var/log/kern.log*
/mnt/var/log/kern.log:402
/mnt/var/log/kern.log.1:722
% zgrep -v kernel: /mnt/var/log/kern.log* | grep -vc NetworkManager
17
% zgrep -v kernel: /mnt/var/log/kern.log* | fgrep -cve NetworkManager -e 'gnome-session-binary'
0

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: network-manager 1.2.0-0ubuntu0.16.04.3
ProcVersionSignature: Ubuntu 4.4.0-31.50-generic 4.4.13
Uname: Linux 4.4.0-31-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
CurrentDesktop: Unity
Date: Tue Aug 16 06:53:42 2016
IfupdownConfig:
 # interfaces(5) file used by ifup(8) and ifdown(8)
 auto lo
 iface lo inet loopback
InstallationDate: Installed on 2016-08-13 (3 days ago)
InstallationMedia: Ubuntu 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
IpRoute:
 default via 192.168.0.1 dev wlp3s0 proto static metric 600
 169.254.0.0/16 dev wlp3s0 scope link metric 1000
 192.168.0.0/24 dev wlp3s0 proto kernel scope link src 192.168.0.5 metric 600
NetworkManager.state:
 [main]
 NetworkingEnabled=true
 WirelessEnabled=true
 WWANEnabled=true
SourcePackage: network-manager
UpgradeStatus: No upgrade log present (probably fresh install)
nmcli-dev:
 DEVICE TYPE STATE DBUS-PATH CONNECTION CON-UUID CON-PATH
 wlp3s0 wifi connected /org/freedesktop/NetworkManager/Devices/1 86180F 674c9d27-1bb1-4055-a6e4-07de9abbb586 /org/freedesktop/NetworkManager/ActiveConnection/0
 enp0s25 ethernet unavailable /org/freedesktop/NetworkManager/Devices/2 -- -- --
 lo loopback unmanaged /org/freedesktop/NetworkManager/Devices/0 -- -- --
nmcli-nm:
 RUNNING VERSION STATE STARTUP CONNECTIVITY NETWORKING WIFI-HW WIFI WWAN-HW WWAN
 running 1.2.0 connected started full enabled enabled enabled enabled enabled

Revision history for this message
Nathan Dorfman (ndorf) wrote :
Changed in network-manager (Ubuntu):
assignee: nobody → Aron Xu (happyaron)
Changed in gnome-session (Ubuntu):
importance: Undecided → Low
Changed in network-manager (Ubuntu):
importance: Undecided → Low
Revision history for this message
Nathan Dorfman (ndorf) wrote :

This is actually getting worse in Debian stretch, and there affects almost 2 dozen packages, so it might not even be the packages' (NetworkManager, gnome-session) fault. Anyway, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=858399

Nathan Dorfman (ndorf)
summary: - NM and gnome-session seem to be syslogging with facility KERN
+ journald forwards to syslog with facility=KERN on everything
affects: gnome-session (Ubuntu) → systemd (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in network-manager (Ubuntu):
status: New → Confirmed
Changed in systemd (Ubuntu):
status: New → Confirmed
Changed in systemd:
status: Unknown → New
Changed in systemd (Debian):
status: Unknown → Confirmed
Aron Xu (happyaron)
Changed in network-manager (Ubuntu):
status: Confirmed → Incomplete
Nathan Dorfman (ndorf)
no longer affects: network-manager (Ubuntu)
Changed in systemd:
status: New → Fix Released
Revision history for this message
Nathan Dorfman (ndorf) wrote :

Same issue exists in Zenial. However, the fix has just been merged into upstream master. It's a trivial one-line change.

tags: added: zesty
Revision history for this message
Nathan Dorfman (ndorf) wrote :

Ugh, I meant Zesty in my previous comment, not "Zenial."

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I totally missed this bug report, however, I have opened a new one at https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1682484

Good news, is the fix for this issue is now in zesty-proposed. I have verified that it fixes above problem. (No new / additional NetworkManager or gnome-session-binary spam in kern.log)

Changed in systemd (Ubuntu):
status: Confirmed → Fix Committed
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.