Skip to content

Regression after merging #14913 #15099

Closed

Description

@asavah

systemd version the issue has been seen with
systemd 245-104-gddee0e8+ running in system mode. (+PAM -AUDIT -SELINUX -IMA -APPARMOR -SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=unified)

Used distribution
own project

Expected behaviour you didn't see
journalctl --list-boots working
journalctl -b -1 --no-pager working

Unexpected behaviour you saw
journalctl crashes

 journalctl -b -1 --no-pager
Assertion 'current_file' failed at src/journal/sd-journal.c:443, function compare_with_location(). Aborting.
Aborted (core dumped)

Mar 12 20:34:56 asusb450eg systemd[1]: Started Process Core Dump (PID 889/UID 0).
Mar 12 20:34:56 asusb450eg systemd-coredump[890]: Process 888 (journalctl) of user 0 dumped core.

                                                  Stack trace of thread 888:
                                                  #0  0x00007f919114afe0 __GI_raise (libc.so.6 + 0x3afe0)
                                                  #1  0x00007f9191135528 __GI_abort (libc.so.6 + 0x25528)
                                                  #2  0x00007f9190ef9f57 n/a (libsystemd-shared-245.so + 0x58f57)
                                                  #3  0x00007f9190f0a3d1 n/a (libsystemd-shared-245.so + 0x693d1)
                                                  #4  0x000055bbe0c1f015 n/a (journalctl + 0xb015)
                                                  #5  0x000055bbe0c1a45e n/a (journalctl + 0x645e)
                                                  #6  0x00007f9191136c4b __libc_start_main (libc.so.6 + 0x26c4b)
                                                  #7  0x000055bbe0c1ceba n/a (journalctl + 0x8eba)

Steps to reproduce the problem
Run journalctl --list-boots or journalctl -b -1 --no-pager

The regression seems to be introduced by #14913
cc @georgmu

Activity

  1. georgmu commented on Mar 12, 2020

    @georgmu
    Contributor

    I will have a look into this.

  2. added
    bug 🐛
    on Mar 12, 2020
  3. georgmu commented on Mar 12, 2020

    @georgmu
    Contributor

    I would say it is safe to just delete the assertion. When implementing #14913, I didn't expect that it could be null.

    The "current_file" is only used to compare the with the file pointer in f:

        f != current_file
    
  4. georgmu commented on Mar 12, 2020

    @georgmu
    Contributor

    @asavah I tested the commands you provided and deleting the assertion fixed it.

  5. asavah commented on Mar 12, 2020

    @asavah
    ContributorAuthor

    @georgmu Thanks, after rebuilding with assertion deleted I can confirm that all the usual journalctl-fu works fine.

  6. linked a pull request that will close this issuefix journalctl regression (#15099) #15100on Mar 12, 2020
  7. added a commit that references this issue on Mar 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛journal

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions