LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-22-2014, 06:58 AM   #1
roertel
LQ Newbie
 
Registered: Apr 2010
Posts: 6

Rep: Reputation: 0
Systemd stalls on first boot after upgrade


I just performed a dist-upgrade to debian wheezy, which included switching over to systemd for init. After the upgrade, the system stalls out around the time that it's mounting the disks, but before networking is enabled.

I've managed some troubleshooting, including enabling the debug shell, but I can't figure out what's going on. Each of the currently active processes appear to have completed successfully, but it doesn't seem to go on to the next step.

From the debug shell, I cannot run any systemd commands; They just hang until I press control+C. I'm not using LVM, but I have a software raid mounted on /samba (md0). I can mount all disks manually, but they are not present at the point where systemd stalls.

I've been struggling on this for a few weeks and now I'm out of ideas. Any suggestions are appreciated.

kernel arguments:
Code:
root=UUID=92133eb5-46ac-45b5-acae-4f044532bbdb ro vga=extended systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M
dmesg, systemd --test & ps output attached.
Attached Files
File Type: txt dmesg.txt (61.6 KB, 11 views)
File Type: txt ps_auxOp.txt (4.8 KB, 9 views)
File Type: txt systemd-test.txt (57 Bytes, 7 views)

Last edited by roertel; 09-23-2014 at 09:32 AM. Reason: set to default font.
 
Old 09-22-2014, 12:48 PM   #2
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
How long are you waiting?
On my system when changed to systemd, boot logging only showed fsck, to get more info, I edited line in /etc/default/grub.
Changed command line from quiet to verbose, which enabled me to view everything at boot.
My boot time is approximately 2mins. Quite long if you ask me, however the shoutdown is a matter of seconds now.
 
Old 09-22-2014, 01:28 PM   #3
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,355

Rep: Reputation: 554Reputation: 554Reputation: 554Reputation: 554Reputation: 554Reputation: 554
I use both Debian wheezy with sysVinit and Debian jessie with systemd. I had the bug you described in jessie about a month or so ago. The system initialization would stall for a long time while populating /dev. Eventually the problem would resolve itself and jessie would continue on to a KDM login screen. The bug was eventually fixed during a routine apt-get download of package upgrades.

Since wheezy is always behind jessie in package versions you probably have hit the same bug in wheezy's systemd that jessie used to have. You might be able to fix the bug in wheezy by installing jessie's current version of systemd but that is risky.

My opinion of systemd is that it is too buggy and has too many design flaws to be using it on wheezy. I suggest that you go back to sysVinit.

----------------------
Steve Stites
 
Old 09-22-2014, 02:55 PM   #4
roertel
LQ Newbie
 
Registered: Apr 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by EDDY1 View Post
How long are you waiting?
I stopped troubleshooting last Wednesday and picked it up again on Saturday night. It was still at the same screen. I don't reboot this machine too often, but if it's going to take days to come up, that's going to be a problem :-D . I feel like there's one small thing that I'm missing, then it'll all be okay, but I'm starting to think I need to start the process of reverting back to SystemV, or restoring to the backup I actually had the foresight to make before the update.
 
Old 09-22-2014, 08:41 PM   #5
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900

Rep: Reputation: 637Reputation: 637Reputation: 637Reputation: 637Reputation: 637Reputation: 637
Quote:
Originally Posted by roertel View Post
I just performed a dist-upgrade to debian wheezy, which included switching over to systemd for init. After the upgrade, the system stalls out around the time that it's mounting the disks, but before networking is enabled.
Wheezy does not have systemd in it natively. Jessie, which is the current testing, is the first version of Debian to have systemd natively. So now that is out of the way, why did you install systemd on a system that was never designed to use it?

Also, please just use normal fonts and type setting in the forum.
 
Old 09-22-2014, 08:52 PM   #6
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,564
Blog Entries: 15

Rep: Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117Reputation: 2117
It could be any number of things. It could be a corrupted journal, bad settings in fstab (systemd can't read "default" settings well), or even any other issue.
 
Old 09-22-2014, 10:31 PM   #7
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,355

Rep: Reputation: 554Reputation: 554Reputation: 554Reputation: 554Reputation: 554Reputation: 554
Quote:
Originally Posted by roertel View Post
I stopped troubleshooting last Wednesday and picked it up again on Saturday night. It was still at the same screen. I don't reboot this machine too often, but if it's going to take days to come up, that's going to be a problem
systemd starts various initialization routines in parallel which under systemVinit are run sequentially. These threads have to have exclusive control of various resources for a while so they issue exclusive mutexes for those resources and then release them when they are finished with the resource. You can get mutex interlocks or not depending on the timing of how fast the various routines run on your machine and the order in which they ask for exclusive control of the resources they are initializing. Problems in which independent threads handle mutexes in ways which are incompatible with the way other threads running in parallel handle the same mutexes are extremely hard to debug and are usually design flaws rather than bugs.

So your delay could be a thread being held up for a long time until another thread finally finishes with a mutex they both use. Or your delay could be a mutex interlock between two or more threads in which case Linux will wait forever. The bug I described on my machine was simply a long wait that eventually resolved itself.

-------------------
Steve Stites
 
Old 09-23-2014, 09:37 AM   #8
roertel
LQ Newbie
 
Registered: Apr 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks for all the suggestions. To follow up, I did not intentionally install systemd, it came along with a dist-update. I figured Debian was moving in that direction. I ended up appending an "init=" line to my grub config and it's running good enough for now. I have systemd on a few other boxes and it works quite well, but this box has been migrated through quite a few debian releases and may have developed some quirks along the way that didn't work well with systemd.
 
Old 09-23-2014, 12:36 PM   #9
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
systemd is in backports do you have backports in sources.list?
Also it says that you can either use init=/systemd/bin or install systemd-sysv
https://packages.debian.org/wheezy-backports/systemd
 
Old 09-23-2014, 12:39 PM   #10
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
It's also a package in wheezy, although it's not installed on my wheezy machine.
https://packages.debian.org/wheezy/systemd
 
Old 09-23-2014, 03:16 PM   #11
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900

Rep: Reputation: 637Reputation: 637Reputation: 637Reputation: 637Reputation: 637Reputation: 637
Quote:
Originally Posted by roertel View Post
Thanks for all the suggestions. To follow up, I did not intentionally install systemd, it came along with a dist-update.
The only reason you would need to use dist-upgrade is if you are upgrading from Squeeze to Wheezy, Wheezy to Jessie, or have enabled backports and need to install something from backports that is installed on your system from a 3rd party repo (e.g. MATE). For normal usage you should only need to use apt-get upgrade. If you have backports enabled you installed systemd by calling dist-upgrade.

From memory the systemd in Wheezy was a really old version and was there as a technology preview. The version in Jessie is in the version number 2 hundred something while Wheezy is very low and in the 40s I think.
 
  


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
Upgrade systemd without machine restart? nixdude Linux - Server 2 03-19-2014 01:02 PM
Boot Delay 30min: systemd-analyze blame systemd-tmpfiles-setup.service BGHolmes Fedora 0 07-27-2011 09:02 AM
When I boot my comp. (dual boot sys-Suse 10.1 & Win XP) the first boot stalls. philip niedermeyer Linux - Desktop 5 11-13-2006 06:04 PM
Gentoo stalls on boot rfw62 Linux - Distributions 4 08-30-2006 06:43 AM
Stalls During Boot tyro123 Linux - Newbie 6 03-31-2005 07:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:12 PM.

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
Open Source Consulting | Domain Registration