Skip to main content
Topic: login has become slow? (Read 1090 times) previous topic - next topic
0 Members and 9 Guests are viewing this topic.

login has become slow?

Since maybe a couple of months ago, logging into a tty has become strangely laggy. After entering my username, it can take several seconds before it asks for the password. The delay varies, though. Online searches only suggested that people have this problem with SSH logins, but I'm talking about a local login. It also only seems to happen with the first login after boot, but I'm not entirely sure about that.

This might be related to changes in OpenRC. I seem to recall pstree showing 'agetty' entries post login in the past, but now it shows just 'supervise-deamo's:
Code: [Select]
     ├─supervise-daemo───login───startx───xinit─┬─Xorg───5*[{Xorg}]
     │                                          └─dwm─┬─sh───sleep
I suppose few people anymore login in this way, what with the various display and login managers (that, IMHO as an outside observer, seem to create more issues than they solve, but now I digress).

Re: login has become slow?

Reply #1
I suggest to first try and compare with a new user, without any setup and first.

artist

Re: login has become slow?

Reply #2
Well, this is proving out to be frustrating to test.
I created a new user 'foobar', did a warm reboot and logged in as foobar: no delay.
But today, after a cold reboot, delay again when logging in as foobar. So, the same empty user, not a completely new one; since I'd logged in as foobar once before, openrc had done for foobar whatever user service caching it does these days. But this might not be relevant at all. Obviously a newly created user has no user services enabled (nor does my own user).
No delay with my own account if I first log in as another user.
I'll do more testing, I guess.

In the meantime, I peeked at the source code for the login program. After receiving the username and before asking for the password it seems to do some PAM stuff. But then that might be a red herring, as other processes & threads are also running. I do not have rc_parallel enabled, though.

There is nothing of interest in dmesg (like I/O failure).

I thought maybe I could temporarily change /etc/init.d/agetty.tty1 so as to debug or strace the login call, but I'm not sure how to actually accomplish that. Maybe I need to peek at the agetty source, too...

At this point, I'm just as or even more interested in learning why this is happening as I am in getting it fixed.