Assertion failure in journal-remote-parse.c

Bug #1698388 reported by Ruud van Asseldonk
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Medium
Dan Streetman

Bug Description

[impact]

assertion failure in systemd-journal-remote

[test case]

only happens under specific circumstances, which is unclear exactly how to reproduce it

[regression potential]

any regression would likely result in the failure/crash of systemd-journal-remote program while processing data from a remote source.

[scope]

this is needed only for x.

this is fixed by commit 9ba37525d0ef3d144a50ed5fd4710573e92b7ec1 which is included upstream starting in v230, so this is already included in b and later.

[original description]

I am observing the following assertion failure in systemd-journal-remote:

Assertion 'source->filled <= source->size' failed at ../src/journal-remote/journal-remote-parse.c:95, function get_line(). Aborting.

Systemd version:

systemd 229
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN

Ubuntu release:

Description: Ubuntu 16.04.1 LTS
Release: 16.04

Package version:

systemd:
  Installed: 229-4ubuntu13
  Candidate: 229-4ubuntu17

It looks like this issue has been fixed upstream in v230, specifically in commit 9ba37525d0ef3d144a50ed5fd4710573e92b7ec1. Could this particular commit be backported?

Revision history for this message
Ruud van Asseldonk (ruuda-channable) wrote :

Upstream bug report, which indeed shows the same assertion failure, and which is fixed by the commit mentioned above: https://github.com/systemd/systemd/pull/3086.

tags: added: id-594d08756bf06c332683f3a6
Revision history for this message
Balint Reczey (rbalint) wrote :

Fixed in Bionic and later.

Changed in systemd (Ubuntu):
status: New → Fix Released
Changed in systemd (Ubuntu Xenial):
status: New → Confirmed
Dan Streetman (ddstreet)
description: updated
Changed in systemd (Ubuntu Xenial):
assignee: nobody → Dan Streetman (ddstreet)
importance: Undecided → Medium
status: Confirmed → In Progress
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

It's a bit unfortunate that we don't have a test case for this assertion failure. That being said, the fix for it seems rather safe and sane. Still, I would like us to try and contact with the original reporter and ask him to test it, if possible.

Changed in systemd (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-xenial
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Ruud, 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.29 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, what testing has been performed on the package 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, 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/229-4ubuntu21.29)

All autopkgtests for the newly accepted systemd (229-4ubuntu21.29) for xenial have finished running.
The following regressions have been reported in tests triggered by the package:

systemd/229-4ubuntu21.29 (i386, amd64)

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/xenial/update_excuses.html#systemd

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

Thank you!

Revision history for this message
Dan Streetman (ddstreet) wrote :

@ruuda-channable are you able to test this?

Revision history for this message
Ruud van Asseldonk (ruuda-channable) wrote :

I’m sorry, we stopped using systemd-journal-remote a few months after I opened this issue, I am no longer able to reproduce.

Revision history for this message
Dan Streetman (ddstreet) wrote :

I at least verified the update doesn't appear to cause any obvious regression:

start server:

ubuntu@lp1698388-x:~$ dpkg -l |grep systemd-journal-remote
ii systemd-journal-remote 229-4ubuntu21.29 amd64 tools for sending and receiving remote journal logs
ubuntu@lp1698388-x:~$ mkdir /tmp/journal-test
ubuntu@lp1698388-x:~$ /lib/systemd/systemd-journal-remote -o /tmp/journal-test --listen-http=127.0.0.1:7000

then in separate terminal:

ubuntu@lp1698388-x:~$ /lib/systemd/systemd-journal-upload -u http://127.0.0.1:7000

then check if uploaded:

ubuntu@lp1698388-x:~$ ls -l /tmp/journal-test/
total 8196
-rw-r----- 1 ubuntu ubuntu 8388608 Sep 10 17:03 remote-127.0.0.1.journal
ubuntu@lp1698388-x:~$ journalctl --file /tmp/journal-test/remote-127.0.0.1.journal | wc -l
1842

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.29

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

  [ Dan Streetman ]
  * d/p/lp1881312/0001-core-don-t-dispatch-load-queue-when-setting-Slice-fo.patch,
    d/p/lp1881312/0002-run-make-slice-work-in-conjunction-with-scope.patch:
    - run new scope unit in specified slice (LP: #1881312)
    https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=b5a778c3cd93e3d684602146f281f315f30778a8
  * d/p/lp1877176-sd-dhcp-client-validate-hostnames-stricter-7308.patch:
    - strictly validate hostname sent to dhcp server (LP: #1877176)
    https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=7a1f1c41dcd860fcba6be42a2153cfe4315ebf17
  * d/e/rules-ubuntu/40-vm-hotadd.rules:
    - Hotadd only offline memory and CPUs
      (LP: #1876018)
    https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=43357bd260a1c3e7b4951d33cbacaebda1d086b3
  * d/p/lp1698388-journal-remote-Ensure-reallocation-of-source-buf-doe.patch:
    - Fix assertion failure when journald source->filled < source->size
      (LP: #1698388)
    https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=d1cc15b88113510227e5a76654e103ef54a8b8f3

  [ Heitor Alves de Siqueira ]
  * d/p/lp1876600-sd-bus-deal-with-cookie-overruns.patch:
    - deal with dbus cookie overruns (LP: #1876600)
    https://git.launchpad.net/~ubuntu-core-dev/ubuntu/+source/systemd/commit/?id=8dc9ef188944349169044d8974a4ffa55c66be9d

 -- Heitor Alves de Siqueira <email address hidden> Tue, 07 Jul 2020 17:28:11 -0400

Changed in systemd (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for systemd has completed successfully and the package is now being 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.

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.