Bug 73942

Summary: systemd-ask-password prompt gets visually interrupted by other messages
Product: systemd Reporter: Max Liebkies <mail>
Component: generalAssignee: systemd-bugs
Status: RESOLVED MOVED QA Contact: systemd-bugs
Severity: minor    
Priority: medium CC: arthur.titeica, dennis123321, familieveerman, jvo, mail, marejde, mus.svz, Thomas.Blume, vmlinuz386
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Screenshot depicting distorted systemd-ask-password prompt
dont overwrite crypt password prompt with status messages

Description Max Liebkies 2014-01-22 18:49:29 UTC
Created attachment 92601 [details]
Screenshot depicting distorted systemd-ask-password prompt

This is not really a bug that affects any crucial functionality but more of a visual thing.
I'm running Arch Linux with systemd 208 in the initrd with my root device encrypted using dm-crypt, without plymouth. At some point systemd asks for the password to unlock the root device on the console. After 1 or 2 seconds this prompt gets "newlined" and interrupted by several other systemd messages. Typing in the password and pressing Return to confirm it works as expected, however. 

I attached a screenshot (sorry for the quality) to illustrate the problem.
Comment 1 Zbigniew Jedrzejewski-Szmek 2014-02-23 14:47:37 UTC
Ooops, that seems to be a result of the recent changes to show more status.
Comment 2 mus.svz 2014-03-16 23:35:34 UTC
@Zbigniew: just to be clear, the reporter is running 208, so it must be happening for him because he is booting without "quiet" (afaik this has always behaved like that).

Either way, the problem with the recent changes to activate output after X seconds of waiting (210?) now causes this for people running _with_ "quiet" as well. systemd.show_status=0 is a workaround, but I guess in the long term there should be some kind of exception if a job is "hanging" because of password input.
Comment 3 Max Liebkies 2014-03-20 14:34:29 UTC
Yes, the problem persists with systemd-211, quiet doesn't help (which is by the way not what I want, I want to see boot time messages)

[Something else strikes me as odd, but I'm not sure if this is a completely new bug or this one. I was trying to use systemd-gpt-auto-generator within my initrd (i.e. no fstab, no crypttab, no root=) and I'm seeing a similar thing: I'm being asked for my password, the prompt is reprinted every 5 (or so) seconds. This time the bug effectively prevents me from booting my system. See this post: https://bbs.archlinux.org/viewtopic.php?pid=1394879 ]
Comment 4 Thomas Blume 2014-05-05 14:35:04 UTC
On my tests even a boot with systemd.show_status=0 overwrites the password prompt with unit startup messages.
Attaching a patch proposal to solve this.
Comment 5 Thomas Blume 2014-05-05 14:36:24 UTC
Created attachment 98491 [details] [review]
dont overwrite crypt password prompt with status messages

proposed patch
Comment 6 jvo 2014-10-06 20:49:20 UTC
Any updates on this? It's still happening with systemd-216.
Comment 7 mus.svz 2014-10-30 11:17:17 UTC
This was only partially fixed in 217. There is no more output while the password is being queried. But when booting with quiet, the "show status after x seconds of waiting" is still triggered right after entering the password and pressing enter.
Comment 8 Zbigniew Jedrzejewski-Szmek 2014-10-30 13:11:03 UTC
(In reply to mus.svz from comment #7)
> This was only partially fixed in 217. There is no more output while the
> password is being queried. But when booting with quiet, the "show status
> after x seconds of waiting" is still triggered right after entering the
> password and pressing enter.

That's basically a race condition, where systemd does not treat the removal of an ask-password entry as a event which bumps the timestamp of the last action. This can be added. However, an alternative implementation is being discussed on the mailing list (http://lists.freedesktop.org/archives/systemd-devel/2014-October/024717.html) so things are likely to change.
Comment 9 Lennart Poettering 2017-02-10 10:10:27 UTC
This is also tracked here:

https://github.com/systemd/systemd/issues/5123

Closing this here.

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.