[Lxc-users] Running sudo shutdown -h now in container causes host to freeze/crash

brian mullan bmullan.mail at gmail.com
Wed Aug 14 12:50:26 UTC 2013


AAlso... just tried this, completely removed LXC and reinstalled it.

$ sudo apt-get purge lxc

$ sudo apt-get install lxc

then created a container

$ sudo lxc-create -t ubuntu -n my_cn1

$ sudo lxc-start -n my_cn1

after logging into the container I shut it down without doing anything else
in the container

$ sudo shutdown -h now

Again, my host freezes, no mouse, no keyboard and its hard reset time again.

Just for reference again my host PC is:

ubuntu 13.04 desktop version recently installed on this new system
16GB ram
3 - 2TB sata
BTRFS file system

So the Ubuntu install is only 2 weeks old and I've purged & reinstalled LXC
and the problem still happens.
any debug tips would be good since the machine freezes up its hard to check
at the time of the problem

brian



On Wed, Aug 14, 2013 at 8:27 AM, brian mullan <bmullan.mail at gmail.com>wrote:

> This morning I tried to shutdown a container from the host instead of from
> inside the container:
>
>               $ sudo lxc-shutdown -n my_cn
>
> and same thing happens the host becomes frozen with no mouse, keyboard etc
> and a hard reset is only recourse
>
>
>
>
> On Tue, Aug 13, 2013 at 6:52 PM, brian mullan <bmullan.mail at gmail.com>wrote:
>
>> resending...
>>
>> Ok... did the following:
>>
>> $ sudo su
>> $ shutdown -h now
>>
>> Same problem... Host PC freezes/crashes, no mouse, keyboard, only Hard
>> Boot
>>
>>
>> NOTE:   I didn't capture this before but here is the sequence I see
>> during shutdown just before the Host PC freezes/crashes.
>>
>> *The system is going down for halt NOW!
>> ubuntu at test:~$ <4>init: tty4 main process (256) killed by TERM signal
>> <4>init: tty2 main process (260) killed by TERM signal
>> <4>init: tty3 main process (262) killed by TERM signal
>> <4>init: cron main process (266) killed by TERM signal
>> <4>init: console main process (283) killed by TERM signal
>> <4>init: tty1 main process (288) killed by TERM signal
>> <4>init: hwclock-save main process (344) terminated with status 70
>> TERM environment variable not set.
>> <4>init: plymouth-upstart-bridge main process (348) terminated with
>> status 1
>>  * Asking all remaining processes to terminate...
>>    ...done.
>>  * All processes ended within 1 seconds....
>>    ...done.
>> initctl: Event failed
>>  * Deactivating swap...
>>    ...fail!
>> umount: /run/lock: not mounted
>> umount: /run/shm: not mounted
>> mount: cannot mount block device /dev/mapper/ubuntu--vg-root read-only
>>  * Will now halt
>> *
>>
>> Also doing some google searches I don't think I am the only one seeing
>> this problem  of the Host PC freezing/crashing after you issue a Shutdown
>> command in the container.
>>
>> See these for some others seeming to have similar or same problem I am:
>>
>>
>> http://superuser.com/questions/630609/lxc-container-shutdown-on-ubuntu-make-the-system-stop-to-work/631429#631429
>>
>>
>> http://permalink.gmane.org/gmane.linux.kernel.containers.lxc.general/5445
>>
>> Brian
>>
>>
>> ---------- Forwarded message ----------
>> From: Michael Fox <michaelf at heimic.net>
>> To: brian mullan <bmullan.mail at gmail.com>
>> Cc: "lxc-users at lists.sourceforge.net" <lxc-users at lists.sourceforge.net>
>> Date: Wed, 14 Aug 2013 06:20:17 +1000
>> Subject: Re: [Lxc-users] Running sudo shutdown -h now in container causes
>> host to freeze/crash
>>
>> As root what happens if you shutdown -h now in the container... let's
>> take out the use of sudo completely when running that command and sudo upto
>> root user and run it. Do you still get a crash/hang?
>>
>> Thanks
>>
>>
>> On Wed, Aug 14, 2013 at 2:06 AM, brian mullan <bmullan.mail at gmail.com>wrote:
>> I've been having this problem for a while now.   To get away from it I
>> actually did a sudo apt-get purge lxc
>> then reinstalled LXC but now the same problem is back again.
>>
>> System:  ubuntu 13.04 desktop
>>
>> I create a container:
>> *sudo lxc-create -t ubuntu -n my_cn*
>>
>> start it
>> *sudo lxc-start -n my_cn*
>>
>> *login*
>> add a desktop environment
>> *sudo apt-get install lxde*
>>
>> I also add a remote desktop config to the container so I can access the
>> desktop from the host
>> (I use x2go but I've also used vnc and others).
>>
>> remote desktop from host always works!
>>
>> but when I am done I exit the remote desktop session which kills that
>> session in the container
>>
>> I get back into the terminal session with the container and tell it to
>> shutdown:
>>
>> *sudo shutdown -h now*
>>
>> everything looks normal as the container shutsdown except it never
>> returns to the Host command prompt in the terminal
>>
>> At that point if I try to click on anything on the host (like start a 2nd
>> terminal or start a browser)...
>>
>> That 1st app on the host starts but then the entire Host freezes solid.
>>
>> No mouse, no keyboard, no activity and the only thing left to do is a
>> hard reset.
>>
>> Any ideas of how I can troubleshoot this?  or what might be happening?
>> I've been using LXC for a long time
>> and I've not had this happen before.
>>
>> thanks
>> brian
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20130814/54cc4e1e/attachment.html>


More information about the lxc-users mailing list