Bug 1157350 - journalctl output silently truncated when journal is corrupt
Summary: journalctl output silently truncated when journal is corrupt
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-27 05:34 UTC by Matt McCutchen
Modified: 2015-06-29 23:03 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-29 23:03:08 UTC
Type: Bug


Attachments (Terms of Use)

Description Matt McCutchen 2014-10-27 05:34:42 UTC
Description of problem:
Somehow (system crash?) I got a corrupt systemd journal file:

$ journalctl --verify
[...]
6a9e68: invalid entry item (22/23 offset: 000000 41%
Invalid object contents at 6a9e68: Bad message
File corruption detected at /var/log/journal/6accf4e4164047c0815d5852d6dcd012/system@000505becfdc7b60-dcd7de62f2cf4c15.journal~:6a9e68 (of 8388608 bytes, 83%).
FAIL: /var/log/journal/6accf4e4164047c0815d5852d6dcd012/system@000505becfdc7b60-dcd7de62f2cf4c15.journal~ (Bad message)
[...]

Now if I run:

$ journalctl
-- Logs begin at Sun 2014-10-12 01:36:11 EDT, end at Mon 2014-10-27 01:18:07 EDT. --
[...]
Oct 18 14:36:31 fedora-20-x64 sysctl[2542]: fs.nfs.nlm_tcpport = 0
Oct 18 14:36:31 fedora-20-x64 sysctl[2542]: fs.nfs.nlm_udpport = 0

The output ends there (presumably at the time of the corruption) with no error message, even though there are more recent uncorrupted journal files.  If I limit journalctl to those files with --file, I can view their content.  This was pretty confusing.

(This is a Qubes VM, but it uses the unmodified Fedora systemd RPM, so I presume the problem is there.)

Version-Release number of selected component (if applicable):
systemd-208-22.fc20.x86_64

How reproducible:
Always with my corrupt journal file.  I can send the actual file if necessary.  I'm not sure I can reproduce the circumstances that caused the corruption.

Steps to Reproduce:
1. journalctl

Actual results:
Output is truncated with no error message.

Expected results:
An error message is displayed, and content of newer uncorrupted files is shown.

Comment 1 Graeme Vetterlein 2014-11-02 15:53:40 UTC
I see similar truncation. Checked for corruption (due to this bug) , found this 
[attempting to collect logs for another unreleated bug]

Linux real.home 3.16.6-200.fc20.x86_64 #1 SMP Wed Oct 15 13:06:51 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

(system has been updated to 3.16.6-203.fc20.x86_64, but that is failing , so booted back to here)


 [root@real Desktop]# journalctl --verify
^[[?25hInvalid tail monotonic timestamp
File corruption detected at /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/user-1000@d456920747094ea4b2e099df196c3b30-000000000000061b-0004f8\
a97ceaa935.journal:000000 (of 16777216 bytes, 0%).
FAIL: /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/user-1000@d456920747094ea4b2e099df196c3b30-000000000000061b-0004f8a97ceaa935.journal (Ba\
d message)
^[[?25hInvalid tail monotonic timestamp
File corruption detected at /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/user-42@99e272974111478182616258b68c8294-0000000000000574-0004fc57\
be93a00d.journal:000000 (of 8388608 bytes, 0%).
FAIL: /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/user-42@99e272974111478182616258b68c8294-0000000000000574-0004fc57be93a00d.journal (Bad \
message)
PASS: /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/user-1000.journal
PASS: /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/system@000505235ae0960d-1c8ce623b78cf5b9.journal~
PASS: /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/user-42@000504a90262f71d-48b2dd63b0c803ff.journal~
PASS: /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/system@3fc496e30f36431b89a73504cf258f84-00000000000158d6-0004ffd219ada1e2.journal
PASS: /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/user-42.journal
PASS: /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/system.journal
PASS: /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/user-42@99e272974111478182616258b68c8294-00000000000157f4-0004ffd21939d898.journal
PASS: /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/system@3fc496e30f36431b89a73504cf258f84-000000000001d2a1-000502ee3720d3fb.journal
PASS: /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/user-1000@000504a902ddcbc1-8ad97796e4296e8d.journal~
^[[?25hInvalid tail monotonic timestamp
File corruption detected at /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/user-42@99e272974111478182616258b68c8294-0000000000015cef-0004ffd3\
967a9ceb.journal:000000 (of 8388608 bytes, 0%).
FAIL: /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/user-42@99e272974111478182616258b68c8294-0000000000015cef-0004ffd3967a9ceb.journal (Bad \
message)
PASS: /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/user-1001.journal
PASS: /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/system@3fc496e30f36431b89a73504cf258f84-0000000000000001-0004fe6693a28375.journal
PASS: /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/system@0004fc57be8b7317-6f72340c173a98e0.journal~
PASS: /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/system@3fc496e30f36431b89a73504cf258f84-00000000000157f5-0004ffd21939e142.journal
PASS: /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/user-42@0004fc57be936d2c-c93863b639e8d6d2.journal~
PASS: /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/user-1000@d57576dcb4dd4f9ba3a3789db9e9cb88-000000000000075a-000504a902dde218.journal
PASS: /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/system@30bc32c853de4530815372fa1c0fd130-0000000000000001-000505c4e3d7540a.journal
^[[?25h220feb8: invalid entry item (17/23 offset: 000000
^[[?25h220feb8: invalid entry item (17/23 offset: 000000
Invalid object contents at 220feb8: Bad message
File corruption detected at /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/system@000505c4e4906420-2a2bff10868c7c8c.journal~:220feb8 (of 4194\
3040 bytes, 85%).
FAIL: /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/system@000505c4e4906420-2a2bff10868c7c8c.journal~ (Bad message)
PASS: /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/user-42@99e272974111478182616258b68c8294-000000000001d2a0-000502ee3720d2a5.journal
PASS: /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/system@3fc496e30f36431b89a73504cf258f84-000000000001d1c0-000502ee37192f48.journal
PASS: /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/system@000506e1d59a2725-8009dc3f1787ffe1.journal~
PASS: /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/user-992.journal
PASS: /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/system@0005040beea79127-bf4b9f13a925f552.journal~
^[[?25hInvalid object at 2cad1c8
File corruption detected at /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/system@000504a8f2bded29-7f207b8087b9ded4.journal~:2cad1c8 (of 5033\
1648 bytes, 93%).
FAIL: /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/system@000504a8f2bded29-7f207b8087b9ded4.journal~ (Bad message)
^[[?25hInvalid tail monotonic timestamp
File corruption detected at /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/user-1000@d456920747094ea4b2e099df196c3b30-00000000000158d2-0004ff\
d219ad9e93.journal:000000 (of 8388608 bytes, 0%).
FAIL: /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/user-1000@d456920747094ea4b2e099df196c3b30-00000000000158d2-0004ffd219ad9e93.journal (Ba\
d message)
PASS: /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/system@000504a9025bd8ab-f58ba5750853ee38.journal~
PASS: /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/user-99.journal
PASS: /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/system@0004fe669418bb9b-e31855c5a40a6234.journal~
PASS: /var/log/journal/5934b9ce7f98409aaa2f20ef0688f39e/system@0005040af81f87c0-602be8d9629f4846.journal~
[root@real Desktop]#

Comment 2 Zbigniew Jędrzejewski-Szmek 2014-11-02 18:25:40 UTC
There were changes to this part of code in systemd-208-25 and -26. If you could test with -26 (currently in updates-testing). Thanks.

Comment 3 Matt McCutchen 2014-11-02 19:49:40 UTC
(In reply to Zbigniew Jędrzejewski-Szmek from comment #2)
> There were changes to this part of code in systemd-208-25 and -26. If you
> could test with -26 (currently in updates-testing). Thanks.

Same problem with systemd-208-26.fc20.x86_64.

Comment 4 Fedora End Of Life 2015-05-29 13:09:56 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Fedora End Of Life 2015-06-29 23:03:08 UTC
Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.