/lib/systemd/systemd-journald:6:fsync:fsync_directory_of_file:journal_file_rotate:do_rotate:server_rotate

Bug #1773148 reported by errors.ubuntu.com bug bridge
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd
New
Unknown
systemd (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned
Bionic
Fix Released
High
Unassigned
Cosmic
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

 * systemd aborts journald, upon watchdog expiry and generates lots of crash reports
 * it appears that journald is simply stuck in fsync
 * it has been agreed to disable watchdog timer on journald

[Test Case]

 * watch drop-off of errors w.r.t. watchdog timer

[Regression Potential]

 * Potentially journald does get stuck, and thus is no longer automatically restarted with a sigabrt crash. However, so far, it is not known to do that.

[Other Info]

 * Original bug report

The Ubuntu Error Tracker has been receiving reports about a problem regarding systemd. This problem was most recently seen with package version 237-3ubuntu10, the problem page at https://errors.ubuntu.com/problem/ff29f7ff39be0e227f0187ad72e5d458e95f6fcf contains more details, including versions of packages affected, stacktrace or traceback, and individual crash reports.
If you do not have access to the Ubuntu Error Tracker and are a software developer, you can request it at http://forms.canonical.com/reports/.

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

journald appears to sigabort upon rotating systemd journal file, in fsync... 😱

#0 0x00007f6d47f7c237 in fsync (fd=46) at ../sysdeps/unix/sysv/linux/fsync.c:27
        resultvar = 0
        sc_cancel_oldtype = 0
        sc_ret = <optimized out>
#1 0x00007f6d47abf6a0 in fsync_directory_of_file.lto_priv.56 (fd=<optimized out>) at ../src/journal/journal-file.c:483
        path = 0x55c0f3ce1540 "/var/log/journal/<valid uuid>/system@<valid uuid>-0000000000<suffix>-000<another-suffix>.journal"
        dn = 0x55c0f3cda680 "/var/log/journal/<same uuid>"
        dfd = 46
        st = {st_dev = 64768, st_ino = 29360293, st_nlink = 1, st_mode = 33184, st_uid = 0, st_gid = 101, __pad0 = 0, st_rdev = 0, st_size = 134217728, st_blksize = 4096, st_blocks = 262152, st_atim = {tv_sec = 1523965107, tv_nsec = 217770755}, st_mtim = {tv_sec = 1523965108, tv_nsec = 564627151}, st_ctim = {tv_sec = 1523965108, tv_nsec = 564627151}, __glibc_reserved = {0, 0, 0}}
        r = <optimized out>
#2 0x00007f6d47b347a7 in journal_file_rotate (f=0x7fffc919e0c0, compress=<optimized out>, seal=<optimized out>, deferred_closes=0x55c0f3cd2e00) at ../src/journal/journal-file.c:3496
        p = 0x55c0f3ce1470 "/var/log/journal/<valid uuid>/system@<valid uuid>-0000000000<suffix>-000<another-suffix>.journal"
        l = <optimized out>
        old_file = 0x55c0f3d27760
        new_file = 0x0
        r = <optimized out>
        __PRETTY_FUNCTION__ = "journal_file_rotate"
#3 0x000055c0f2c80f71 in do_rotate (s=<optimized out>, f=0x7fffc919e0c0, name=0x55c0f2c8bae7 "system", seal=<optimized out>, uid=0) at ../src/journal/journald-server.c:466
#4 0x000055c0f2c810ce in server_rotate (s=0x7fffc919e020) at ../src/journal/journald-server.c:488
#5 0x000055c0f2c8372b in write_to_journal (priority=6, n=21, iovec=0x7fffc919a880, uid=0, s=0x7fffc919e020) at ../src/journal/journald-server.c:717
#6 dispatch_message_real (s=0x7fffc919e020, iovec=0x7fffc919a880, n=21, m=<optimized out>, c=<optimized out>, tv=<optimized out>, priority=6, object_pid=0) at ../src/journal/journald-server.c:877
#7 0x000055c0f2c83a78 in server_driver_message (s=0x7fffc919e020, object_pid=<optimized out>, message_id=<optimized out>, format=<optimized out>) at ../src/journal/journald-server.c:911
#8 0x000055c0f2c88692 in dev_kmsg_record (l=163, p=<optimized out>, s=0x7fffc919e020) at ../src/journal/journald-kmsg.c:160
#9 server_read_dev_kmsg (s=<optimized out>, s=<optimized out>) at ../src/journal/journald-kmsg.c:346
#10 0x00007f6d47abb160 in source_dispatch (s=s@entry=0x55c0f3cd44d0) at ../src/libsystemd/sd-event/sd-event.c:2303
#11 0x00007f6d47abb3fa in sd_event_dispatch (e=<optimized out>, e@entry=0x55c0f3cd3f10) at ../src/libsystemd/sd-event/sd-event.c:2663
#12 0x00007f6d47abb589 in sd_event_run (e=<optimized out>, timeout=18446744073709551615) at ../src/libsystemd/sd-event/sd-event.c:2723
#13 0x000055c0f2c78b16 in main (argc=<optimized out>, argv=<optimized out>) at ../src/journal/journald.c:110

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

I wonder if systemd is actually killing journald, whilst it is stuck fsyncing....

Changed in systemd (Ubuntu Cosmic):
status: New → Fix Committed
Changed in systemd (Ubuntu Bionic):
status: New → In Progress
description: updated
Changed in systemd (Ubuntu Xenial):
status: New → Confirmed
Changed in systemd (Ubuntu Xenial):
status: Confirmed → In Progress
Revision history for this message
Robie Basak (racb) wrote :

Note: the Cosmic fix for this is in the unapproved queue, and could in theory be rejected by the release team. The Xenial SRU should land in updates only once Cosmic is resolved.

Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello errors.ubuntu.com, or anyone else affected,

Accepted systemd into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/systemd/229-4ubuntu21.5 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-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. 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 Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-xenial
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemd - 239-7ubuntu10

---------------
systemd (239-7ubuntu10) cosmic; urgency=medium

  * units: Disable journald Watchdog (LP: #1773148)
  * Add conflicts with upstart and systemd-shim. (LP: #1773859)

 -- Dimitri John Ledkov <email address hidden> Thu, 04 Oct 2018 15:58:51 +0100

Changed in systemd (Ubuntu Cosmic):
status: Fix Committed → Fix Released
Revision history for this message
Dimitri John Ledkov (xnox) wrote :
tags: added: verification-done verification-done-xenial
removed: verification-needed verification-needed-xenial
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemd - 229-4ubuntu21.5

---------------
systemd (229-4ubuntu21.5) xenial; urgency=medium

  [ Dimitri John Ledkov ]
  * systemctl: correctly proceed to immediate shutdown if scheduling fails
    (LP: #1670291)
  * hwdb: update micmute on Dell laptops. (LP: #1738153)
  * hwdb: Use wlan keycode for all Dell systems. (LP: #1762385)
  * units: Disable journald Watchdog (LP: #1773148)

  [ Mauricio Faria de Oliveira ]
  * core: Fix for service to enter the 'failed' state (rather than 'inactive') after it repeatedly fails restart.
    (LP: #1795658)

  [ Dimitri John Ledkov ]
  * Disable dh_installinit generation of tmpfiles for the systemd package.
    (LP: #1748147)

 -- Dimitri John Ledkov <email address hidden> Mon, 08 Oct 2018 16:10:42 +0100

Changed in systemd (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Robie Basak (racb) 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
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello errors.ubuntu.com, or anyone else affected,

Accepted systemd into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/systemd/237-3ubuntu10.8 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-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

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

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in systemd (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic
removed: verification-done
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello errors.ubuntu.com, or anyone else affected,

Accepted systemd into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/systemd/237-3ubuntu10.10 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-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

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

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

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

There are no journald crashes reported for the 10.8 and the 10.10 uploads of systemd which included this change.

There are crashes reported against the security update 10.9 which does not have this patch in.

Thus this is verified.

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Changed in systemd:
status: Unknown → New
Changed in systemd (Ubuntu Bionic):
importance: Undecided → High
Revision history for this message
Steve Langasek (vorlon) wrote :

Hello errors.ubuntu.com, or anyone else affected,

Accepted systemd into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/systemd/237-3ubuntu10.30 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-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

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

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

tags: added: verification-needed verification-needed-bionic
removed: verification-done verification-done-bionic
Revision history for this message
Steve Langasek (vorlon) wrote :

Hello errors.ubuntu.com, or anyone else affected,

Accepted systemd into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/systemd/237-3ubuntu10.31 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-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

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

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (systemd/237-3ubuntu10.31)

All autopkgtests for the newly accepted systemd (237-3ubuntu10.31) for bionic have finished running.
The following regressions have been reported in tests triggered by the package:

gvfs/1.36.1-0ubuntu1.3.3 (ppc64el, amd64)
netplan.io/0.97-0ubuntu1~18.04.1 (amd64)
apt/1.6.12 (arm64, ppc64el)
pulseaudio/unknown (armhf)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/bionic/update_excuses.html#systemd

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Balint Reczey (rbalint) wrote :

Verified with systemd/237-3ubuntu10.31:

root@x-lp1773859:~# systemctl show systemd-journald.service | grep Watch
WatchdogUSec=0
WatchdogTimestamp=Tue 2019-10-08 16:06:56 UTC
WatchdogTimestampMonotonic=176241732389
root@x-lp1773859:~# dpkg -l systemd
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-======================-================-================-==================================================
ii systemd 237-3ubuntu10.31 amd64 system and service manager

The fix is applied in .31, but the crash was still be observed once:
https://errors.ubuntu.com/?release=Ubuntu%2018.04&package=systemd&period=month&version=237-3ubuntu10.31

This seem to have been misreported against the version, since the ExecutableTimestamp is 1567655991 (date -d @1567655991 : Thu Sep 5 03:59:51 UTC 2019) , which matches the timestamp of /lib/systemd/systemd-journald in 237-3ubuntu10.29 .

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

This bug was fixed in the package systemd - 237-3ubuntu10.31

---------------
systemd (237-3ubuntu10.31) bionic; urgency=medium

  [ Dimitri John Ledkov ]
  * Add conflicts with upstart and systemd-shim. (LP: #1773859)
  * d/p/debian/UBUNTU-units-disable-journald-watchdog.patch
    - units: Disable journald Watchdog (LP: #1773148)
  * d/p/cryptsetup-add-support-for-sector-size-option-8881.patch
    - cryptsetup: add support for sector-size= option (LP: #1776626)
  * d/p/systemctl-correctly-proceed-to-immediate-shutdown-if-sche.patch
    - systemctl: correctly proceed to immediate shutdown if scheduling fails
      (LP: #1670291)
  * d/p/networkd-add-support-to-configure-IPv6-MTU-8664.patch
    - networkd: add support to set IPv6MTUBytes (LP: #1671951)

 -- Balint Reczey <email address hidden> Mon, 30 Sep 2019 17:23:17 +0200

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