Truncated messages in journald since systemd v244
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libvirt (Ubuntu) |
Invalid
|
Low
|
Unassigned | ||
Groovy |
Invalid
|
Low
|
Unassigned | ||
systemd (Ubuntu) |
Fix Released
|
High
|
Balint Reczey | ||
Focal |
Fix Released
|
Undecided
|
Dan Streetman | ||
Groovy |
Fix Released
|
High
|
Balint Reczey |
Bug Description
[Impact]
* since 09d0b46a "journal: refresh cached credentials of stdout streams"
in ~244 output may be trincated.
* Upstream has a fix in https:/
* Backporting the fix will avoid truncation of log output to journald
[Test Case]
* This could happen in any case, but is more likely when a program that
has output going to journald is spawning short-lived sub-programs often.
Therefore the test emphasizes on that:
- Use a test service like /etc/systemd/
[Unit]
Description=Test Truncate
After=network.
[Service]
ExecStart=
ExecStop=
Type=oneshot
RemainAfterExit=yes
StandardOutput=
TimeoutStopSec=0
[Install]
WantedBy=
- And a test script like /usr/lib/test.sh:
#!/bin/sh
gettext "This will"
echo
gettext "usually fail"
echo
gettext "and be truncated"
echo
Start/Stopping that service without the fix will look like:
Apr 30 18:56:40 f systemd[1]: Stopping Test Truncate...
Apr 30 18:56:40 f test.sh[1165]: T
Apr 30 18:56:40 f test.sh[1167]: T
Apr 30 18:56:40 f test.sh[1167]: sually fai
Apr 30 18:56:40 f test.sh[1165]: s
Apr 30 18:56:40 f test.sh[1168]: s
Apr 30 18:56:40 f test.sh[1168]: nd be truncate
Apr 30 18:56:40 f test.sh[1165]: n
Apr 30 18:56:40 f systemd[1]: test.service: Succeeded.
Apr 30 18:56:40 f systemd[1]: Stopped Test Truncate.
[Regression Potential]
* The patches are rather small, but there might be a slightly increased
memory consumption of journald for output buffers.
* Issues (if any and I couldn't find any so far) should be only to
journald output handling. Systemd is huge, this at least narrows
down the potential places of a regression a lot.
[Other Info]
* n/a
--- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
Originally reported against libvirt which happens to be one of the example-triggers
Hi,
when I shut down my machine I see messages from /usr/lib/
- 3 libvirt-guests.sh processes are run
- messages are truncated
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: libvirt-daemon 6.0.0-0ubuntu8
Uname: Linux 5.6.7-050607-
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: KDE
Date: Tue Apr 28 19:42:56 2020
SourcePackage: libvirt
UpgradeStatus: No upgrade log present (probably fresh install)
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
Related branches
- Canonical Server: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 263 lines (+229/-0)5 files modifieddebian/changelog (+9/-0)
debian/patches/lp-1875708-journald-stream-Fix-stdout-logging-when-source-PID-c.patch (+46/-0)
debian/patches/lp-1875708-journald-stream-Increase-stdout-buffer-size-sooner-w.patch (+36/-0)
debian/patches/lp-1875708-journald-stream-Refactor-stdout_stream-handling.patch (+135/-0)
debian/patches/series (+3/-0)
Changed in libvirt (Ubuntu): | |
status: | New → Triaged |
description: | updated |
Changed in libvirt (Ubuntu): | |
assignee: | Christian Ehrhardt (paelzer) → nobody |
Changed in systemd (Ubuntu): | |
importance: | Undecided → High |
assignee: | nobody → Balint Reczey (rbalint) |
status: | New → In Progress |
Changed in systemd (Ubuntu Focal): | |
assignee: | nobody → Dan Streetman (ddstreet) |
status: | New → In Progress |
no longer affects: | libvirt (Ubuntu Focal) |
Truncated messages can be seen on this screenshot.