mirror of
https://github.com/systemd/systemd.git
synced 2024-11-06 16:59:03 +03:00
The systemd System and Service Manager
96d4d0244b
It might happen that we try to bisect through a chain of offset arrays in the journal whose last element was just allocated but no item yet written to. In that case that array will be all NUL, but it might still end up in our array chain cache. If it does, we cannot use it for bisection, since for bisection we need to know the value of the first entry in that array, but if it's uninitialized it does not have a first value. Hence, as a simple fix, in this unlikely case, simply ignore the chain cache. This is supposed to fix the issue pointed out in #8432, but in a more permissive way, as this case isn't strictly a badly formatted journal but actually a valid state (though one within a very short time window), and we should make the best of it, and handle it gracefully. Background: in each journal file entries are linked up in large arrays of offsets. In each array the entries are strictly ordered by the offsets of the entries, which permits search by bisection. These arrays are allocated with a fixed size and then filled up as entries are added to the journal file. If an array is fully filled up, a new array (double in size as the old one) is appended to the journal file, and linked up. This means, the journal file will contain a series of chained up arrays, each time doubling in size, and strictly ordered. When looking for an entry we maintain a "chain cache", which allows us to bypass traversing the chain in full if we look for entries close to each other in a short time. With the fix above we make sure we don't erroneously use a chain cache item that doesn't carry enough information for this bisection to work. Original issue identified (with patch) by @Kxuan. Replaces: #8432 |
||
---|---|---|
.github | ||
.mkosi | ||
catalog | ||
coccinelle | ||
doc | ||
docs | ||
factory/etc | ||
hwdb | ||
man | ||
modprobe.d | ||
network | ||
po | ||
presets | ||
rules | ||
shell-completion | ||
src | ||
sysctl.d | ||
sysusers.d | ||
test | ||
tmpfiles.d | ||
tools | ||
travis-ci | ||
units | ||
xorg | ||
.dir-locals.el | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.mailmap | ||
.travis.yml | ||
.vimrc | ||
.ycm_extra_conf.py | ||
configure | ||
LICENSE.GPL2 | ||
LICENSE.LGPL2.1 | ||
Makefile | ||
meson_options.txt | ||
meson.build | ||
mkosi.build | ||
mkosi.default | ||
NEWS | ||
README | ||
README.md | ||
TODO | ||
zanata.xml |
systemd - System and Service Manager
Details
General information about systemd can be found in the systemd Wiki.
Information about build requirements are provided in the README file.
Consult our NEWS file for information about what's new in the most recent systemd versions.
Please see the HACKING file for information how to hack on systemd and test your modifications.
Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.
When preparing patches for systemd, please follow our Coding Style Guidelines.
If you are looking for support, please contact our mailing list or join our IRC channel.