Bug 964008 - Segmention fault in journalctl
Segmention fault in journalctl
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
17
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Michal Schmidt
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-16 23:18 EDT by David Strauss
Modified: 2013-08-01 14:38 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-01 14:38:06 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Strauss 2013-05-16 23:18:43 EDT
This code may be completely different in current journalctl implementations, but here's what I found. Presumably, f->path could be NULL at the time this log item tries to print.

[straussd@endpoint21d5d347 tmp]$ sudo gdb -ex "set pagination 0" -ex "thread apply all bt" -batch `which journalctl` coredump.journalctl.18997.endpoint21d5d347.1367282164
[New LWP 18997]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `journalctl -o json -f'.
Program terminated with signal 11, Segmentation fault.
#0  remove_file (j=j@entry=0x25d4010, prefix=prefix@entry=0x25e3130 "/run/log/journal/05046d45ef454d85af397025b312cff6", filename=filename@entry=0x7fff0f05db20 "system@201ef05c466b406c850e566a32d5b798-0000000000f1db50-0004db85e667f988.journal", dir=0x0) at src/journal/sd-journal.c:1018
1018	        log_debug("File %s got removed.", f->path);

Thread 1 (Thread 0x7f6eaa97c780 (LWP 18997)):
#0  remove_file (j=j@entry=0x25d4010, prefix=prefix@entry=0x25e3130 "/run/log/journal/05046d45ef454d85af397025b312cff6", filename=filename@entry=0x7fff0f05db20 "system@201ef05c466b406c850e566a32d5b798-0000000000f1db50-0004db85e667f988.journal", dir=0x0) at src/journal/sd-journal.c:1018
#1  0x0000003e0d60564b in process_inotify_event (e=<optimized out>, j=<optimized out>) at src/journal/sd-journal.c:1565
#2  sd_journal_process (j=0x25d4010) at src/journal/sd-journal.c:1644
#3  0x000000000040292e in main (argc=<optimized out>, argv=<optimized out>) at src/journal/journalctl.c:368
Comment 1 David Strauss 2013-05-16 23:20:16 EDT
Here's the version that box has installed.

Installed Packages
Name        : systemd
Arch        : x86_64
Version     : 44
Release     : 24.fc17
Comment 2 David Strauss 2013-05-16 23:21:32 EDT
Correction: Presumably, f could be NULL at the time this log item tries to print. The printf-like functionality behind log_debug will work around f->path being NULL if f isn't.
Comment 3 Michal Schmidt 2013-05-17 04:44:07 EDT
We cannot access f->path after journal_file_close(f). This got fixed upstream in:

commit 44a5fa34d9f9a5050cdf4a497e6ccf5af2d1678d
Author: Lennart Poettering <lennart@poettering.net>
Date:   Tue Oct 16 22:59:28 2012 +0200

    sd-journal: fix bad memory access
Comment 4 Fedora End Of Life 2013-07-04 02:57:21 EDT
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. 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 WONTFIX if it remains open with a Fedora 
'version' of '17'.

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 prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 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 to Fedora 17's end of life.

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 2013-08-01 14:38:11 EDT
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 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.

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.