Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
System not shutting down/restarting [SOLVED - sort of]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
agent_jdh
Veteran
Veteran


Joined: 08 Aug 2002
Posts: 1783
Location: Scotland

PostPosted: Thu Oct 23, 2008 10:15 pm    Post subject: System not shutting down/restarting [SOLVED - sort of] Reply with quote

OK this is a recent occurrence - I've spent the last 24 hours or thereabouts converting my KDE 4 install away from the meta ebuilds. But as this happens when I remove xdm from starting on boot, the system can't halt/restart, so I don't think that's a factor.

Anyway, 'halt', 'reboot', or 'shutdown -r now' all bring up the usual 'INIT: The system is going down for halt/reboot now'. Then nothing. CTRL-ALT-DEL has the same effect (no surprise). The only thing that seems to progress this is by using the system unit on/off button to initiate a shutdown via ACPI. This kicks off the frozon shutdown sequence, but even this _always_ hangs at 'Unmounting network filesystems'. Need to hold the the on/off switch down for 4 secs to power off or the reset button to reboot.

However, I noticed right at the beginning of the shutdown process a message like this -

Code:
INIT: Pid 7011 [id ca] seems to hang


So what I did was reboot, drop to VT1, hit CTRL-ALT-DEL, got the 'System is going for reboot now', switched to VT2, logged in, ran top, using F then a to order processes by pid, used the gpm mouse to copy the visible processes, swithced to VT3, logged in & pasted the processes into a file. This is what I got -

Code:
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 7029 root      20   0  2844 1392  872 S  0.0  0.1   0:00.00 joe
 7025 root      20   0  5064 1760 1424 S  0.0  0.1   0:00.00 bash
 7024 root      20   0  2340 1128  884 R  0.3  0.1   0:00.02 top
 7020 root      20   0  5064 1756 1424 S  0.0  0.1   0:00.00 bash
 7017 root      20   0  1864  724  608 D  0.0  0.0   0:00.00 shutdown
 7013 root      20   0  5064 1768 1424 S  0.0  0.1   0:00.00 bash
 7011 root      20   0  1864  728  608 D  0.0  0.0   0:00.00 shutdown
 7006 root      20   0  3088  712  496 S  0.0  0.0   0:00.00 dbus-launch
 7005 root      20   0  2340  700  564 S  0.0  0.0   0:00.00 dbus-daemon
 7001 root      20   0 51428  20m  13m S  0.0  1.0   0:01.18 kdm_greet
 6998 root      20   0  3304 1136  888 S  0.0  0.1   0:00.00 kdm
 4242 root      20   0  1804  780  668 S  0.0  0.0   0:00.00 agetty
 4241 root      20   0  1804  780  668 S  0.0  0.0   0:00.00 agetty
 4240 root      20   0  1804  780  668 S  0.0  0.0   0:00.00 agetty
 4239 root      20   0  2660 1276  944 S  0.0  0.1   0:00.00 login
 4237 root      20   0  2660 1284  944 S  0.0  0.1   0:00.00 login
 4235 root      20   0  2660 1284  944 S  0.0  0.1   0:00.00 login
 4198 root      20   0  1636  192  132 S  0.0  0.0   0:00.00 vmnet-bridge


So the offending process was shutdown itself! And there are 2 shutdown entries??

I've fiddled the pid numbers above to show the pid match, and I've rebooted 3 times using this procedure to verify that it is definitely shutdown that is hanging.

I'm running ~x86 so I'm on baselayout-2/openrc. I've tried re-emerging those, to see if there was an update to the /etc/init.d/halt.sh script, and also sysvinit which contains /sbin/shutdown.

Problem still persists. I've had a look through emerge.log and apart from the kde emerging and unmerging, not much has gone on recently that immediately jumps out as having caused this.

I've looked at the following as well - may be an openrc bug?

https://bugs.gentoo.org/show_bug.cgi?id=243088

https://forums.gentoo.org/viewtopic-t-701127-highlight-sysvinit.html

https://forums.gentoo.org/viewtopic-t-711290-highlight-sysvinit.html

And the openrc support thread. Can't find any direct matches.

Anyone got a clue? Kernel hasn't changed since gentoo-sources-2.6.27 was installed. Else I will file a bug.

TIA

EDIT - Fortunately (due to vmware issues), I'd kept my 2.6.26 kernel gentoo-sources, so I reverted to 2.6.26 and everything is working again now. I'm pretty sure I didn't change anything with 2.6.27, but I'll wait for gentoo-sources-2.6.27-r1 and have another go with that.

Unless anyone knows of a new kernel option in 2.6.27 that has to be enabled/disabled, one I've obviously missed (or it may just be a bug).
_________________
Jingle Jangle Jewellery
Back to top
View user's profile Send private message
coolsnowmen
Veteran
Veteran


Joined: 30 Jun 2004
Posts: 1479
Location: No.VA

PostPosted: Tue Nov 04, 2008 9:25 pm    Post subject: Reply with quote

I have similair problems
Just for the record
KDE 4.1.71
shutdown button from kdm4 does not seem to work
kernel = 2.6.26-r2

BUT: shutdown -h now works

Its annoying but I get around by kicking off a shutdown -h 2 from a screen session and then logging out.
If you find out more, please post.
_________________
emerge: there are no ebuilds to satisfy "moo"
Back to top
View user's profile Send private message
coolsnowmen
Veteran
Veteran


Joined: 30 Jun 2004
Posts: 1479
Location: No.VA

PostPosted: Sun Nov 09, 2008 5:16 am    Post subject: Reply with quote

For the record, My 7.4 xorg install apparently was causing MUCH more of a problem with X than my kernel version. I downgraded to the stable 7.2.

The xserver was all but locking up with a vt switch and was almost an epic fail when I would try and logout/shutdown (required ssh in to fix it)
_________________
emerge: there are no ebuilds to satisfy "moo"
Back to top
View user's profile Send private message
agent_jdh
Veteran
Veteran


Joined: 08 Aug 2002
Posts: 1783
Location: Scotland

PostPosted: Mon Nov 10, 2008 12:42 am    Post subject: Reply with quote

My problem is related to hacked 2.6.27 module drivers for vmware that were pasted in bugzilla, so it looks like we've got different problems. I'm using KDE 4.1.2 from ~arch and shutdown/restart etc works fine from there (as long as I do not start the vmware service - it gives me a kernel oops when it tries to load one of the vmware modules and that triggers my "can't shut down/restart" issue).
_________________
Jingle Jangle Jewellery
Back to top
View user's profile Send private message
coolsnowmen
Veteran
Veteran


Joined: 30 Jun 2004
Posts: 1479
Location: No.VA

PostPosted: Mon Nov 10, 2008 1:58 am    Post subject: Reply with quote

alright, it appears out problems are completly unrelated as I dont even have vmware (on this pc).

Until our paths cross again,
coolsnowmen
_________________
emerge: there are no ebuilds to satisfy "moo"
Back to top
View user's profile Send private message
tranquilcool
Veteran
Veteran


Joined: 25 Mar 2005
Posts: 1179

PostPosted: Mon Nov 10, 2008 11:16 am    Post subject: Reply with quote

kdebase-live.

shutdown and reboot doesn't work with kdm.
_________________
this is a strange strange world.
Back to top
View user's profile Send private message
ok
Guru
Guru


Joined: 11 Jul 2006
Posts: 390
Location: germany

PostPosted: Sun Nov 16, 2008 2:35 pm    Post subject: Reply with quote

After updating my kernel i had that problem too, shutdown hangs at "remounting / ro".
Enable
Code:
Processor type and features  --->
   [*] Tickless System (Dynamic Ticks)
did it for me. Now I am able to shutdown.
Vanilla Kernel directly from kernel.org 2.6.27.6.
Back to top
View user's profile Send private message
ok
Guru
Guru


Joined: 11 Jul 2006
Posts: 390
Location: germany

PostPosted: Fri Nov 21, 2008 10:26 pm    Post subject: Reply with quote

Still the same with 2.6.27.7
Back to top
View user's profile Send private message
jlpoole
Guru
Guru


Joined: 01 Nov 2005
Posts: 485
Location: Salem, OR

PostPosted: Thu Sep 15, 2011 2:42 am    Post subject: Reply with quote

ok wrote:
After updating my kernel i had that problem too, shutdown hangs at "remounting / ro".
Enable
Code:
Processor type and features  --->
   [*] Tickless System (Dynamic Ticks)
did it for me. Now I am able to shutdown.
Vanilla Kernel directly from kernel.org 2.6.27.6.


Activating Tickless System as above fixed the problem of not restarting on a Dell Optiplex.
Back to top
View user's profile Send private message
ianw1974
Guru
Guru


Joined: 18 Oct 2006
Posts: 387
Location: UK and Poland

PostPosted: Thu Sep 15, 2011 12:23 pm    Post subject: Reply with quote

I had problems with this recently on a machine, and for me I needed to update the /etc/inittab because the old version was no good and I'd never updated it when updated emerges had provided a new one.

Here is current /etc/inittab:

Code:
#
# /etc/inittab:  This file describes how the INIT process should set up
#                the system in a certain run-level.
#
# Author:  Miquel van Smoorenburg, <miquels@cistron.nl>
# Modified by:  Patrick J. Volkerding, <volkerdi@ftp.cdrom.com>
# Modified by:  Daniel Robbins, <drobbins@gentoo.org>
# Modified by:  Martin Schlemmer, <azarah@gentoo.org>
# Modified by:  Mike Frysinger, <vapier@gentoo.org>
# Modified by:  Robin H. Johnson, <robbat2@gentoo.org>
#
# $Header: /var/cvsroot/gentoo-x86/sys-apps/sysvinit/files/inittab-2.87,v 1.1 2010/01/08 16:55:07 williamh Exp $

# Default runlevel.
id:3:initdefault:

# System initialization, mount local filesystems, etc.
si::sysinit:/sbin/rc sysinit

# Further system initialization, brings up the boot runlevel.
rc::bootwait:/sbin/rc boot

l0:0:wait:/sbin/rc shutdown
l0s:0:wait:/sbin/halt -dhp
l1:1:wait:/sbin/rc single
l2:2:wait:/sbin/rc nonetwork
l3:3:wait:/sbin/rc default
l4:4:wait:/sbin/rc default
l5:5:wait:/sbin/rc default
l6:6:wait:/sbin/rc reboot
l6r:6:wait:/sbin/reboot -dk
#z6:6:respawn:/sbin/sulogin

# new-style single-user
su0:S:wait:/sbin/rc single
su1:S:wait:/sbin/sulogin

# TERMINALS
c1:12345:respawn:/sbin/agetty 38400 tty1 linux
c2:2345:respawn:/sbin/agetty 38400 tty2 linux
#c3:2345:respawn:/sbin/agetty 38400 tty3 linux
#c4:2345:respawn:/sbin/agetty 38400 tty4 linux
#c5:2345:respawn:/sbin/agetty 38400 tty5 linux
#c6:2345:respawn:/sbin/agetty 38400 tty6 linux

# SERIAL CONSOLES
#s0:12345:respawn:/sbin/agetty 9600 ttyS0 vt100
#s1:12345:respawn:/sbin/agetty 9600 ttyS1 vt100

# What to do at the "Three Finger Salute".
ca:12345:ctrlaltdel:/sbin/shutdown -r now

# Used by /etc/init.d/xdm to control DM startup.
# Read the comments in /etc/init.d/xdm for more
# info. Do NOT remove, as this will start nothing
# extra at boot if /etc/init.d/xdm is not added
# to the "default" runlevel.
x:a:once:/etc/X11/startDM.sh


I've only commented out terminals tty3-tty6 because I don't need them, but when I started using this, it fixed my shutdown problems. You can compare it with the one you have, you'll notice the differences.
_________________
Ian Walker

Light travels faster than sound. This is why some people appear bright until you hear them speak.........

Linux Systems Limited | Masternode Monitoring
Back to top
View user's profile Send private message
jlpoole
Guru
Guru


Joined: 01 Nov 2005
Posts: 485
Location: Salem, OR

PostPosted: Thu Sep 15, 2011 3:52 pm    Post subject: Reply with quote

ianw1974 wrote:
I had problems with this recently on a machine, and for me I needed to update the /etc/inittab because the old version was no good and I'd never updated it when updated emerges had provided a new one.

For what it is worth, h[/code]ere is current /etc/inittab:
<snip>

I've only commented out terminals tty3-tty6 because I don't need them, but when I started using this, it fixed my shutdown problems. You can compare it with the one you have, you'll notice the differences.


I copied the inittab and compared with mine:
Code:
hip tmp # diff ianw1974 /etc/inittab
23c23
< l0:0:wait:/sbin/rc shutdown
---
> l0:0:wait:/sbin/rc shutdown
41,44c41,44
< #c3:2345:respawn:/sbin/agetty 38400 tty3 linux
< #c4:2345:respawn:/sbin/agetty 38400 tty4 linux
< #c5:2345:respawn:/sbin/agetty 38400 tty5 linux
< #c6:2345:respawn:/sbin/agetty 38400 tty6 linux
---
> c3:2345:respawn:/sbin/agetty 38400 tty3 linux
> c4:2345:respawn:/sbin/agetty 38400 tty4 linux
> c5:2345:respawn:/sbin/agetty 38400 tty5 linux
> c6:2345:respawn:/sbin/agetty 38400 tty6 linux
58a59
>
hip tmp #


Of course, I have my kernel modified as indicated in my posting of yesterday. I'm not sure what the impact is of the sequence "41,44c41,44" is. Perhaps that was causing my machine not to reboot?
Back to top
View user's profile Send private message
ianw1974
Guru
Guru


Joined: 18 Oct 2006
Posts: 387
Location: UK and Poland

PostPosted: Fri Sep 16, 2011 5:26 am    Post subject: Reply with quote

Those four lines as mentioned are just the tty's, so they won't be the problem. Looks like your /etc/inittab is fine. Mine was the cause of my problem, but just thought I would share just in case.
_________________
Ian Walker

Light travels faster than sound. This is why some people appear bright until you hear them speak.........

Linux Systems Limited | Masternode Monitoring
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum