systemd: Logging from gnome session is passed on to all syslog facilities

Bug #1682484 reported by Dimitri John Ledkov
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
systemd
Fix Released
Unknown
systemd (Ubuntu)
Fix Released
High
Dimitri John Ledkov
Zesty
Fix Released
High
Dimitri John Ledkov

Bug Description

[Impact]

 * untagged messages in journal do not have any syslog facility specified, this may result in spamming logs.
 * The solution is to cherrypick upstream fix which sanity checks and provides default syslog facility, e.g. it sets user facility on user/desktop session syslog/journal entries.

[Test Case]

 * launch gnome terminal
 * check output of $ journalctl -o verbose -e
 * entries from gnome-terminal (e.g. "Allocating size to GtkBox without calling gtk_widget_get_preferred_width/height()....") should have a syslog facility listed as one of the variables.

[Regression Potential]

 * We are changing (fixing regression) in logging, thus release images have those messages untagged, and may require different filtering rules before this update is applied.

[Other Info]

 * Original bug report from debian.

Bug imported from Debian https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=837893

Package: systemd
Version: 231-6
Severity: normal

Since recently, log messages from programs running under the gnome
session have started appearing in all logs in /var/logs, including
/var/logs/kern.log, even though my rsyslog configuration has not
changed, and correctly only routes kern.* there.

This is very annoying since it fills the logs with messages that don't
belong there, and makes running logcheck tedious.

It seems this is a recent regression, since before I was able to route
these messages to a low-priority log using the following rsyslog
configuration:

  user.=info;user.=notice;\
          user.=warn -/var/log/user-low.log

If I look at the messages directly with journalctl -o verbose, it seems
they do not set the syslog facility, which should make them end up with
user facility, but doesn't.

Changed in systemd (Ubuntu):
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Dimitri John Ledkov (xnox)
description: updated
Revision history for this message
Adam Conrad (adconrad) wrote : Please test proposed package

Hello Dimitri, or anyone else affected,

Accepted systemd into zesty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/systemd/232-21ubuntu3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in systemd (Ubuntu Zesty):
status: Confirmed → Fix Committed
tags: added: verification-needed
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Easier test is from https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1613751

$ grep -e NetworkManager -e gnome-session-binary /var/log/kern.log

Before it would have loads of messages

$ sudo rm /var/log/kern.log
# upgrade to -proposed package

Now with new package there is only two audit messages from apparmor about NetworkManager and that's it.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemd - 232-21ubuntu3

---------------
systemd (232-21ubuntu3) zesty; urgency=medium

  [ Martin Pitt ]
  * resolved: Disable DNSSEC by default on stretch and zesty.
    Both Debian stretch and Ubuntu zesty are close to releasing, switch to
    DNSSEC=off by default for those. Users can still turn it back on with
    DNSSEC=allow-downgrade (or even "yes"). (LP: #1682499)

  [ Michael Biebl ]
  * journal: fix up syslog facility when forwarding native messages.
    Native journal messages (_TRANSPORT=journal) typically don't have a
    syslog facility attached to it. As a result when forwarding the
    messages to syslog they ended up with facility 0 (LOG_KERN).
    Apply syslog_fixup_facility() so we use LOG_USER instead. (Closes: #837893)
    (LP: #1682484)

  [ Dimitri John Ledkov ]
  * networkd: cherry-pick support for setting bridge port's priority.
    This is a useful feature/bugfix to improve feature parity of networkd with
    ifupdown. This matches netplan's expectations to be able to set bridge port's
    priorities via networked. This featue is to be used by netplan/MAAS/OpenStack.
    (LP: #1668347)
  * TEST-12: cherry-pick upstream fix for compat with new netcat-openbsd.
    (LP: #1672542)
  * udev.postinst: preserve virtio interfaces names on upgrades, on s390x.
    New udev generates stable interface names on s390x kvm instances, however, upon
    upgrades existing ethX names should be preserved to prevent breaking networking
    and software configurations. (Closes: #860246) (LP: #1682437)

 -- Dimitri John Ledkov <email address hidden> Thu, 13 Apr 2017 18:10:33 +0100

Changed in systemd (Ubuntu Zesty):
status: Fix Committed → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote : Update Released

The verification of the Stable Release Update for systemd has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemd - 232-21ubuntu3

---------------
systemd (232-21ubuntu3) zesty; urgency=medium

  [ Martin Pitt ]
  * resolved: Disable DNSSEC by default on stretch and zesty.
    Both Debian stretch and Ubuntu zesty are close to releasing, switch to
    DNSSEC=off by default for those. Users can still turn it back on with
    DNSSEC=allow-downgrade (or even "yes"). (LP: #1682499)

  [ Michael Biebl ]
  * journal: fix up syslog facility when forwarding native messages.
    Native journal messages (_TRANSPORT=journal) typically don't have a
    syslog facility attached to it. As a result when forwarding the
    messages to syslog they ended up with facility 0 (LOG_KERN).
    Apply syslog_fixup_facility() so we use LOG_USER instead. (Closes: #837893)
    (LP: #1682484)

  [ Dimitri John Ledkov ]
  * networkd: cherry-pick support for setting bridge port's priority.
    This is a useful feature/bugfix to improve feature parity of networkd with
    ifupdown. This matches netplan's expectations to be able to set bridge port's
    priorities via networked. This featue is to be used by netplan/MAAS/OpenStack.
    (LP: #1668347)
  * TEST-12: cherry-pick upstream fix for compat with new netcat-openbsd.
    (LP: #1672542)
  * udev.postinst: preserve virtio interfaces names on upgrades, on s390x.
    New udev generates stable interface names on s390x kvm instances, however, upon
    upgrades existing ethX names should be preserved to prevent breaking networking
    and software configurations. (Closes: #860246) (LP: #1682437)

 -- Dimitri John Ledkov <email address hidden> Thu, 13 Apr 2017 18:10:33 +0100

Changed in systemd (Ubuntu):
status: Fix Committed → Fix Released
Changed in systemd:
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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