LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 05-27-2015, 01:24 PM   #1
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,682
Blog Entries: 1

Rep: Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796
systemd-logind slow logins


Using su to change users takes 30-ish seconds to change users. Except when the network is completely down. This seems to happen to my system semi-regularly and I've been fixing it by doing a fresh install. This last time it took less than 30 days. Normally it takes 3 to 6 months.

I have managed a work around/fix it would seem.

# apt-get install --reinstall systemd
# systemctl restart systemd-logind


Before fixing the issue:

# loginctl list-seats

Would time out.

# grep -i login /var/log/syslog

May 27 12:13:14 hostname dbus[844]: [system] Failed to activate service 'org.freedesktop.login1': timed out

Are but a few of the symptoms. The main usability issue being that it takes 30-ish seconds to su to another user. Issues like this one (and others) make me a little more concerned about the security of my system(s). This seems to be an issue that spans several distros. And may be amd64 specific. And may be related to installing i386 packages on said systems. The mbrola-us3 package (for espeak) in my case. The issue does not self correct once said package(s) are uninstalled. At least not until systemd is reinstalled in my case.

Just putting this out there for the others that are affected. And to remind my aging self of a potential solution when it happens again.

Last edited by Shadow_7; 05-27-2015 at 01:26 PM.
 
Old 05-27-2015, 08:12 PM   #2
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,682

Original Poster
Blog Entries: 1

Rep: Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796
It seems that on reboot I have the same issue.

# systemctl restart systemd-logind

Seems to be the only step needed to solve it (at each boot). If done after dhclient brings the network up.
 
Old 05-28-2015, 12:32 AM   #3
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
What is your partition layout? If you are using separate /usr it will slow down boot times.
 
Old 05-28-2015, 06:11 PM   #4
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,682

Original Poster
Blog Entries: 1

Rep: Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796
/ is it's own partition, and the only partition. Boot time is not the issue. The issue is that once I bring up the network (dhclient/ethernet), when I try to su to another user, that login takes 30+ seconds (locally). As long as the network is down it's not an issue as local logins are almost instantaneous. Restarting systemd-logind fixes the login delay after bringing up the network with dhclient. (temporarily / doesn't carry over to the next boot). This isn't an issue when the install is fresh, but creaps in fairly consistently to an issue within a few months of regular updates. At least with the jessie variant, when it was still testing, and apparently now when it's the stable branch.

I tend to do fairly minimal installs via debootstrap. And boot to the console/CLI by default. At which point I do a few things manually depending on what I want to do with my computer that day. A window manager of cwm from sources, via .xinitrc and startx, and a custom kernel, 3.19+ (4.0.1 atm) are about the only exotics things with this otherwise minimal desktop-ish system.
 
Old 05-28-2015, 10:32 PM   #5
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Have you checked /var/log/messges or dmesg to reserch problems?
 
Old 05-29-2015, 09:59 AM   #6
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,682

Original Poster
Blog Entries: 1

Rep: Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796
So I rebooted to recreate the issue and check recent logs. And it's no longer an issue. Maybe it's just something that happens when you reboot after a couple weeks of uptime. It's certainly not the first time I've had this issue and probably not the last.

As mentioned in the first post, /var/log/syslog had a timeout message. And "loginctl list-seats" would time out when the issue was active. I'll check /var/log/messages the next time that it is an issue. But at the moment, not an active issue.
 
Old 06-01-2015, 03:42 PM   #7
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,682

Original Poster
Blog Entries: 1

Rep: Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796
Well it's back. /var/log/messages shows nothing of interest.

/var/log/syslog
Code:
Jun  1 15:22:30 ...hostname... dbus[841]: [system] Activating via systemd: service name='org.freedesktop.login1' unit='dbus-org.freedesktop.login1.service'
Jun  1 15:22:55 ...hostname... dbus[841]: [system] Failed to activate service 'org.freedesktop.login1': timed out
Is about the only thing of interest. This only activates after running "dhclient -4 -v eth0" and getting an outbound connection. And of course "systemctl restart systemd-logind" makes the logins spiffy again. Where ...hostname... is an edit.

Perhaps something in /etc/dbus-1/system.conf is at fault here. That seems to be the only hit of interest in /etc/* with egrep.

---------- Post added 06-01-15 at 03:43 PM ----------

Per the log, 25 seconds from activation to timed out.
 
Old 06-07-2015, 08:19 PM   #8
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,682

Original Poster
Blog Entries: 1

Rep: Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796
I suppose that I shouldn't have systemd-logind and login running at the same time. Because I do after restarting systemd-logind.

I'm starting to wonder if doing system installs via chroot (debootstrap style) is the trigger? Since I did an i386 install for the old laptop on this amd64 laptop around the same time this crept up this time. I shutdown to undo the chroot and it's mount points. Since functioning in the chroot binds the host udev and stuff when using apt to install stuff post chroot setup, like a kernel to make it bootable.
 
Old 06-11-2015, 09:14 AM   #9
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,682

Original Poster
Blog Entries: 1

Rep: Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796
It appeared that systemd and systemd-sysv were both installed. I did an apt-get remove systemd-sysv and it did that and added other new packages. This reboot there is no login delay when su-ing between users multiple times, and I didn't have to restart systemd-logind. Maybe it'll hold this time around. There was an odd message, that doesn't appear to have made it to any of the logs. It said something about an unrecognized unit for (user)@1000.service. Shortly after logging in after a cold boot. With the user id and username of the user that I was logged in with at the time.
 
Old 06-11-2015, 01:18 PM   #10
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
Quote:
Originally Posted by Shadow_7 View Post
It appeared that systemd and systemd-sysv were both installed.
The systemd-sysv package just creates a symlink from /sbin/init to /lib/systemd/systemd -- this sets systemd as PID1 (/sbin/init is called by the kernel).

I take it you are now using SysVinit as PID1?

Post the output of:
Code:
ls -l /sbin/init
cat /proc/1/comm
 
Old 06-12-2015, 09:59 AM   #11
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,682

Original Poster
Blog Entries: 1

Rep: Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796
Quote:
Originally Posted by Head_on_a_Stick View Post
I take it you are now using SysVinit as PID1?
I'm using whatever the default is for jessie as installed with debootstrap circa may 2, 2015. PID1 is init. Or at least default after manually doing apt-get remove systemd-sysv.

init-+-cgmanager

as listed with pstree
 
Old 06-12-2015, 01:36 PM   #12
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
Quote:
Originally Posted by Shadow_7 View Post
I'm using whatever the default is for jessie as installed with debootstrap circa may 2, 2015. PID1 is init. Or at least default after manually doing apt-get remove systemd-sysv.
That's my point -- the systemd-sysv packages overwrites /sbin/init with a symlink to systemd.

"PID1" is the first process called by the kernel after booting up: ie, init.

Please post the output I have requested as this will clarify which init system you are using.
 
Old 06-14-2015, 01:07 AM   #13
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,682

Original Poster
Blog Entries: 1

Rep: Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796
Quote:
Originally Posted by Head_on_a_Stick View Post
Post the output of:
Code:
ls -l /sbin/init
cat /proc/1/comm
ls -l /sbin/init
-rwxr-xr-x 1 root root 40648 Apr 6 13:44 /sbin/init

cat /proc/1/comm
init
 
Old 06-14-2015, 03:58 AM   #14
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
Quote:
Originally Posted by Shadow_7 View Post
ls -l /sbin/init
-rwxr-xr-x 1 root root 40648 Apr 6 13:44 /sbin/init

cat /proc/1/comm
init
You are no longer using systemd as your init system -- you have switched to SysVinit.

You should either re-install the systemd-sysv package to switch back or run this command to make sure the switch is complete:
Code:
# apt-get install sysvinit-core systemd-shim systemd-sysv-

Last edited by Head_on_a_Stick; 06-14-2015 at 04:00 AM. Reason: typo
 
Old 06-16-2015, 04:38 AM   #15
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,682

Original Poster
Blog Entries: 1

Rep: Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796Reputation: 796
$ dpkg -l | grep -i systemd
Code:
ii  libpam-systemd:amd64                 215-17+deb8u1                        amd64        system and service manager - PAM module
ii  libsystemd0:amd64                    215-17+deb8u1                        amd64        systemd utility library
ii  systemd                              215-17+deb8u1                        amd64        system and service manager
ii  systemd-shim                         9-1                                  amd64        shim for systemd
That's a lot of systemd for not running systemd. But sysvinit-core was installed. Odd naming convention to install systemd-sysv to ?stop? using sysv?

# apt-get install systemd-sysv

Odder still that running that mentions upstart. Debuntu? Or more of a curiousity. And more oddities, just to be sure that I'm running systemd-sysv at the next reboot.

# apt-get install --reinstall systemd-sysv systemd

Ends in:
E: Couldn't configure systemd-sysv:amd64, probably a dependency cycle.

Although:

# apt-get install --reinstall systemd-sysv

Succeeds without the E:. I guess that means that it's time to reboot and see if I have slow logins again.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Systemd-Logind Device Management For Wayland LXer Syndicated Linux News 0 08-26-2013 05:33 AM
LXer: Ubuntu Plans To Move To Systemd's Logind LXer Syndicated Linux News 0 03-07-2013 02:21 PM
Really slow SSH logins chrille112 Linux - Software 15 06-25-2009 06:31 AM
Slow Logins scottpioso Linux - General 1 09-22-2003 09:22 PM
Slow FTp Logins Rycat Linux - Networking 4 03-14-2001 02:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 04:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration