Go to file
Franck Bui 4bb37be07b journald: make sure journal_file_open() doesn't leave a corrupted file around after failing
This can be problematic especially when there's no more free disk
space. Consider the following:.

When disk space becomes sparse, writting to the system journal can lead to
error. In this case journald attempts to make room by rotating the journals,
which consists in archiving online journals and opening new ones.

However opening new files is likely to fail too and in this case
journal_file_open() leaves half initialized file around but in online
state. Then the error is propagated and journald switches into volatile mode.

Next time a new message is received by journald, it tries to open the
persistent system journal file to switch automatically back to persistent
mode.

When opening the system journal, journal_file_open(), called by
managed_journal_file_open_reliably(), finds the persistent system journal left
previously and assumes that it was uncleanly closed and considers it as
corrupted. The error is reported to managed_journal_file_open_reliably(), which
backs the file up and attempts to create a new system file, which fails and
leaves a corrupted system file again.

Since this is done for each message received by journald, /var/log/message can
be filled with backup files pretty quickly.

To prevent this, the patch makes sure to delete the newly created file in case
of error.
2022-04-04 17:51:10 +02:00
.clusterfuzzlite ci: merge seed corpora with public OSS-Fuzz corpora on CFLite 2022-01-30 10:17:25 +00:00
.github build(deps): bump meson from 0.61.2 to 0.62.0 in /.github/workflows 2022-04-01 21:41:37 +00:00
.lgtm/cpp-queries ci: pack-ify our custom CodeQL queries and enable them in Actions 2021-12-07 14:57:09 +01:00
.semaphore test: check systemd RPM macros 2022-03-06 13:07:20 +09:00
catalog timesyncd: generate a structure log message the first time we set the clock correctly 2022-03-18 23:54:05 +01:00
coccinelle coccinelle: automatically look for timestamp_is_set candidates 2022-02-22 22:47:12 +01:00
docs Merge pull request #22649 from keszybz/symlink-enablement-yet-again-punish-me-harder 2022-03-29 21:10:03 +02:00
factory factory/locale.conf: mention systemd ownership 2021-12-23 14:18:02 +00:00
hwdb.d Merge pull request #22894 from keszybz/hwdb-update 2022-03-29 18:17:32 +02:00
LICENSES network: license all config files as CC0 2022-01-12 16:05:59 +01:00
man tree-wide: fix typo 2022-04-02 00:34:39 +09:00
mkosi.default.d mkosi: Add centos_epel config 2022-02-25 16:17:29 +00:00
modprobe.d meson: install the right README file in modprobe.d 2021-07-07 14:52:05 +02:00
network network: add example file that enables DHCP on ethernet links 2022-01-12 16:05:59 +01:00
po po: fix "sistemd" typo in it.po 2022-03-20 09:47:33 +01:00
presets units: enable systemd-network-generator by default 2021-12-16 09:49:39 +01:00
rules.d udev: add /dev/disk/by-diskseq symlink for block devices 2022-04-01 23:44:37 +09:00
shell-completion udevadm: introduce new 'wait' command 2022-04-01 15:13:18 +09:00
src journald: make sure journal_file_open() doesn't leave a corrupted file around after failing 2022-04-04 17:51:10 +02:00
sysctl.d build: preserve correct mode when generating files via jinja2 2021-11-08 12:06:48 +00:00
sysusers.d sysusers: avoid creating spurious "nobody" group 2021-11-30 16:16:25 +01:00
test Merge pull request #22926 from bluca/analyze_offline_filter 2022-04-01 23:43:18 +09:00
tmpfiles.d factory: populate /etc/locale.conf with systemd build-time setting 2021-12-23 11:01:12 +00:00
tools tools/git-contrib: list contributions not only from Weblate 2022-03-29 19:42:01 +02:00
units unit: make systemd-udev-trigger.service use --prioritized-subsystem 2022-03-22 15:27:06 +09:00
xorg xorg/50-systemd-user: add a full license header 2021-10-01 14:45:00 +02:00
.clang-format clang-format: we actually typically use 16ch continuation indentation 2022-02-22 17:32:50 +01:00
.ctags editors: Prevent ctags from following symlinks 2019-02-15 11:01:20 -08:00
.dir-locals.el scripts: use 4 space indentation 2019-04-12 08:30:31 +02:00
.editorconfig editorconfig: set maximum line length to 109 for man/*.xml files 2021-09-30 13:45:34 +02:00
.gitattributes gitattributes: introduce and use "generated" attribute 2021-10-18 09:42:55 +02:00
.gitignore gitignore: ignore mkosi.installdir 2022-03-11 09:34:04 +00:00
.lgtm.yml lgtm: disable cpp/missing-return (again) 2022-03-23 16:40:33 +00:00
.mailmap mailmap: two more names 2021-03-30 13:17:58 +02:00
.packit.yml Packit: build SRPMs in Copr 2022-03-09 09:52:41 +00:00
.vimrc scripts: use 4 space indentation 2019-04-12 08:30:31 +02:00
.ycm_extra_conf.py ycm: add doc string for all the functions in configuration file 2017-11-29 13:21:49 -07:00
configure tools: shellcheck-ify tool scripts 2021-09-30 12:27:06 +02:00
LICENSE.GPL2 relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00
LICENSE.LGPL2.1 licence: remove references to old FSF address 2012-12-17 11:41:31 +01:00
Makefile tree-wide: add spdx header on all scripts and helpers 2021-01-28 09:55:35 +01:00
meson_options.txt Use new default-user-shell option instead of hard-coding bash in nspawn and user-record 2022-03-28 14:24:46 +02:00
meson.build meson: build kernel-install man page when necessary 2022-03-31 21:12:05 +09:00
mkosi.build ci: check for failed services after boot 2021-12-10 10:25:43 +01:00
mkosi.postinst ci: check for failed services after boot 2021-12-10 10:25:43 +01:00
NEWS NEWS: specify that public headers are still C89 2022-03-29 21:54:01 +01:00
README time-util: assume CLOCK_BOOTTIME always exists 2022-03-28 16:55:41 +02:00
README.md Fix loading of graphs 2021-12-14 15:27:25 +09:00
TODO TODO 2022-04-04 16:07:26 +02:00

Systemd

System and Service Manager

Count of open issues over time Count of open pull requests over time Semaphore CI 2.0 Build Status
Coverity Scan Status
OSS-Fuzz Status
CIFuzz
CII Best Practices
Language Grade: C/C++
CentOS CI - CentOS 8
CentOS CI - Arch
CentOS CI - Arch (sanitizers)
Fossies codespell report
Coverage Status
Packaging status

Details

Most documentation is available on systemd's web site.

Assorted, older, general information about systemd can be found in the systemd Wiki.

Information about build requirements is provided in the README file.

Consult our NEWS file for information about what's new in the most recent systemd versions.

Please see the Code Map for information about this repository's layout and content.

Please see the Hacking guide for information on 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.

Stable branches with backported patches are available in the stable repo.