Bug 787664

Summary: systemd: stuck login prompt
Product: [openSUSE] openSUSE 12.2 Reporter: Jiri Slaby <jslaby>
Component: BasesystemAssignee: Frederic Crozat <fcrozat>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: dmesg with debug info
dmesg with debug info

Description Jiri Slaby 2012-11-01 08:27:15 UTC
Every time I boot my system, for the first time, the login password prompt is stuck on the serial console. I am able to enter login, it is printed twice, but password query does not respond to my typing (enter does nothing). It's like:
linux-u8yo login: root
root
Password: <stuck>

Then it writes "login: timed out after 60 seconds" and I'm able to log in normally. The cure is also to press enter with blanc name to start a new login prompt. It looks like getty is started twice on ttyS0?

# cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-3.6.5-1-desktop root=UUID=2a083c62-4eca-44f4-b3f9-61cc420b9887 video=1024x768 console=tty0 console=ttyS0,115200 splash=silent quiet showopts

# ll /etc/systemd/system/getty.target.wants/
total 0
lrwxrwxrwx 1 root root 34 Aug 24 21:48 getty@tty1.service -> /lib/systemd/system/getty@.service
lrwxrwxrwx 1 root root 41 Sep 12 20:53 serial-getty@ttyS0.service -> /lib/systemd/system/serial-getty@.service
Comment 1 Frederic Crozat 2012-11-26 13:29:18 UTC
is it still valid with systemd 195+ ?
Comment 2 Jiri Slaby 2012-11-26 13:34:04 UTC
Oops, I picked wrong project. This is on 12.2. I don't know how to test 195 there...
Comment 3 Frederic Crozat 2012-11-26 14:11:34 UTC
ok, so forget my question ;)
Comment 4 Frederic Crozat 2012-11-26 14:58:52 UTC
could you try removing /etc/systemd/system/getty.target.wants/serial-getty@ttyS0.service ? 

it is not needed, it is autogenerated in /run/systemd/generators at startup when systemd reads /proc/cmdline.

I don't have the issue on my 12.2 test VM.
Comment 5 Jiri Slaby 2012-11-26 15:04:29 UTC
(In reply to comment #4)
> could you try removing
> /etc/systemd/system/getty.target.wants/serial-getty@ttyS0.service ? 

It does not help. It still gets stuck. What is weird is the output of the name for teh second time after I press enter:
linux-u8yo login: root
root                          <---- this?
Password: <stuck>
Comment 6 Frederic Crozat 2012-11-26 15:37:45 UTC
since I can't reproduce this, could you try to boot with systemd.log_level=debug systemd.log_target=kmsg and attach dmesg output ?
Comment 7 Jiri Slaby 2012-11-26 15:40:49 UTC
Created attachment 514497 [details]
dmesg with debug info

(In reply to comment #6)
> since I can't reproduce this, could you try to boot with
> systemd.log_level=debug systemd.log_target=kmsg and attach dmesg output ?

Attached.
Comment 8 Frederic Crozat 2012-11-26 16:02:15 UTC
did you try to login on serial console ? I don't see anything relevant there..
Comment 9 Jiri Slaby 2012-11-30 16:48:39 UTC
Created attachment 515291 [details]
dmesg with debug info

(In reply to comment #8)
> did you try to login on serial console ? I don't see anything relevant there..

I hope so. For sure, I'm attaching a new one. The dmesg is taken at this state:
linux-u8yo login: Started System Logging Service                                         [  OK  ]
Starting ACPI Event Daemon...                                                  
Starting D-Bus System Message Bus...                                           
Started D-Bus System Message Bus                                       [  OK  ]
Started ACPI Event Daemon                                              [  OK  ]
Starting LSB: X Display Manager...                                             
Started Avahi mDNS/DNS-SD Stack                                        [  OK  ]
Started Login Service                                                  [  OK  ]
Started LSB: X Display Manager                                         [  OK  ]
root
root
Password: login: timed out after 60 seconds

Welcome to openSUSE 12.2 "Mantis" - Kernel 3.6.8-1-desktop (ttyS0).


linux-u8yo login:
Comment 10 Frederic Crozat 2012-11-30 17:19:21 UTC
[   81.969291] systemd[1]: Received SIGCHLD from PID 419 (login).
[   81.969344] systemd[1]: Got SIGCHLD for process 419 (login)
[   81.969413] systemd[1]: Child 419 died (code=exited, status=0/SUCCESS)
[   81.969422] systemd[1]: Child 419 belongs to serial-getty@ttyS0.service
[   81.970342] systemd[1]: serial-getty@ttyS0.service: main process exited, code=exited, status=0
[   81.970492] systemd[1]: serial-getty@ttyS0.service changed running -> auto-restart
[   81.970516] systemd[1]: Running GC...
[   81.970614] systemd[1]: serial-getty@ttyS0.service holdoff time over, scheduling restart.
[   81.970622] systemd[1]: serial-getty@ttyS0.service changed auto-restart -> dead

it looks like login got blocked somehow.. No idea how to debug this beast..
Comment 11 Frederic Crozat 2013-03-12 14:07:24 UTC
still valid on 12.3 ?
Comment 12 Jiri Slaby 2013-03-14 09:08:29 UTC
(In reply to comment #11)
> still valid on 12.3 ?

Nope. I actually fixed it in 12.2, but don't remember how anymore.