Bug 73194 - journal: Missing byte order conversions break chain cache on big endian
Summary: journal: Missing byte order conversions break chain cache on big endian
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-31 20:40 UTC by George McCollister
Modified: 2014-01-05 14:43 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description George McCollister 2013-12-31 20:40:26 UTC
Running 'journalctl -f' on big endian machines results in only 1 line of history rather than default of 10. gdb shows that the begin argument is not being converted to host byte order prior to being passed to chain_cache_put.

(gdb) bt full
#0  chain_cache_put (h=0x6122c, ci=0x0, first=124424, array=788904, begin=16719626810752499712, total=1052, last_index=1727) at src/journal/journal-file.c:1381
        __PRETTY_FUNCTION__ = "chain_cache_put"
        __PRETTY_FUNCTION__ = "chain_cache_put"
#1  0x0002938c in generic_array_get (f=0x731f8, first=124424, i=1727, ret=0xbed2ca50, offset=0xbed2ca48) at src/journal/journal-file.c:1455
        o = 0x402dd9a8
        p = 1819888
        a = 788904
        t = 1052
        r = 0
        ci = 0x0
        __PRETTY_FUNCTION__ = "generic_array_get"
        __PRETTY_FUNCTION__ = "generic_array_get"
#2  0x00043fac in journal_file_next_entry (f=0x731f8, o=0x0, p=0, direction=DIRECTION_UP, ret=0xbed2ca50, offset=0xbed2ca48) at src/journal/journal-file.c:1992
        i = 2779
        n = 2780
        r = 1075868232
        __PRETTY_FUNCTION__ = "journal_file_next_entry"
        __PRETTY_FUNCTION__ = "journal_file_next_entry"
#3  0x0004031c in find_location_with_matches (j=0x61008, f=0x731f8, direction=DIRECTION_UP, ret=0xbed2ca50, offset=0xbed2ca48) at src/journal/sd-journal.c:769
        r = -1093481916
        __PRETTY_FUNCTION__ = "find_location_with_matches"
        __PRETTY_FUNCTION__ = "find_location_with_matches"
#4  0x0003fe1c in next_beyond_location (j=0x61008, f=0x731f8, direction=DIRECTION_UP, ret=0xbed2ca94, offset=0xbed2ca80) at src/journal/sd-journal.c:832
        c = 0xbed2ca98
        cp = 0
        r = 397524
        __PRETTY_FUNCTION__ = "next_beyond_location"
        __PRETTY_FUNCTION__ = "next_beyond_location"
#5  0x0003fae4 in real_journal_next (j=0x61008, direction=DIRECTION_UP) at src/journal/sd-journal.c:885
        found = 8
        f = 0x731f8
        new_file = 0x0
        new_offset = 0
        o = 0x0
        p = 6079658578380408352
        i = 0xffffffff
        r = 161416
        __PRETTY_FUNCTION__ = "real_journal_next"
        __func__ = "real_journal_next"
        __PRETTY_FUNCTION__ = "real_journal_next"
        __func__ = "real_journal_next"
#6  0x000259a0 in real_journal_next_skip (j=0x61008, direction=DIRECTION_UP, skip=10) at src/journal/sd-journal.c:944
        c = 0
        r = 162204
        __PRETTY_FUNCTION__ = "real_journal_next_skip"
        __PRETTY_FUNCTION__ = "real_journal_next_skip"
#7  0x00025868 in sd_journal_previous_skip (j=0x61008, skip=10) at src/journal/sd-journal.c:963
No locals.
#8  0x0004505c in main (argc=2, argv=0xbed2cd14) at src/journal/journalctl.c:1643
        r = 0
        j = 0x61008
        need_seek = false
        previous_boot_id = {bytes = "\000\000\254\224\000\004\342\350@ {x\000\004", <incomplete sequence \342\234>, qwords = {189751655457512, 4620828973008741020}}
        previous_boot_id_valid = false
        first_line = true
        n_shown = 0
        ellipsized = false
        __func__ = "main"
        __func__ = "main"

I am submitting a patch to the systemd-devel mailing list with the subject:
[PATCH] journal: Add missing byte order conversions
Comment 1 Zbigniew Jedrzejewski-Szmek 2014-01-05 14:43:24 UTC
Commit http://cgit.freedesktop.org/systemd/systemd/commit/?id=af13a6b.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.