Bug 81744

Summary: show error on screen instead of exiting
Product: systemd Reporter: Piotr Sawuk <piotr5>
Component: generalAssignee: systemd-bugs
Status: RESOLVED WORKSFORME QA Contact: systemd-bugs
Severity: enhancement    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Piotr Sawuk 2014-07-25 12:05:54 UTC
according to the man page systemd does exit on error, but nowhere I can find what the exit-codes mean. but even if they were documented, I guess a normal user wouldn't care to look them up.

I have real_init=/usr/lib/systemd/systemd on the kernel-parameters at boot. therefore systemd is the 2nd init process and it shouldn't return ever. but if it already has to return, it really should first take control of the screen, return to text so the kernel doesn't need to, and print out a meaningful message, and wait till the user has read the message. the way it does behave now is: journalctl is missing all entries leading to the exit-code, several hours are missing. systemd just exits and leaves error-handling to the kernel.

for example 2 times already, at a random time while the computer was idle, I got (a slightly corrupted filesystem and) an uninformative message like this:

Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

CPU: 3 PID: 1 Comm: systemd Tainted: G        W    3.12.21-gentoo-r1 #1
Hardware name: Dell Inc Inspiron 1090/Inspiron 1090 BIOS A06 08/23/2011
ffffffff8167aea0 ffff88007e8d7c78 ffffffff814c5f4b 00000000000000b2
ffffffff815b77c6 ffff88007e8d7cf8 ffffffff814c278d ffff88007e8d5980
ffff880000000010 ffff88007e8d7d08 ffff88007e8d7ca8 ffffffff817d4cf0
Call Trace:
[<ffffffff814c5f4b>] dump_stack+0x46/0x58
[<ffffffff814c278d>] panic+0xba/0xc2
[<ffffffff810379c6>] do_exit+0x489/0x888
[<ffffffff81037e7f>] ? __sigqueue_free+0x36/0x3a
[<ffffffff81037ecf>] do_group_exit+0x68/0x9b
[<ffffffff81041402>] get_signal_to_deliver+0x442/0x464
[<ffffffff81002091>] do_signal+0x49/0x79a
[<ffffffff8100280a>] do_notify_resume+0x28/0x68
[<ffffffff814cb775>] retint_signal+0x3d/0x78
drm_kms_helper: panic occurred, switching back to text console
Comment 1 Lennart Poettering 2014-08-18 21:23:22 UTC
Hmm, we actually show errors usually if we exit. Actually, we never really exit to avoid kerne panics. Instead if something is really wrong we just enter a pause() loop. See src/shared/util.c in the freeze() function.

Maybe adding systemd.log_level=debug, systemd_log_target=kmsg reveals a bit more about what is going on?
Comment 2 Lennart Poettering 2016-06-07 13:10:30 UTC
Does this problem persist? If so, could you please provide more data and open a new issue on systemd github?

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.