# Weird hang, not sure where to start

## Shink

Sometime over the last two weeks two of my "systems" (Virtualbox guest installs on Windows 7 hosts) started to randomly hang.  One uses the desktop profile, one uses the server profile, both mostly run stable, except with the virtualbox related stuff ~arch.

The symptoms are:

1) The network stops responding.

2) I can no longer log in from console, although I do get prompted for username and password.  After entering my password, I just get a "last login blah blah blah..." message, but never a bash shell - it just hangs there.  I can switch through the PTYs, but none let me log in.

This is more of a problem with my server install, since it acts as my DNS server, squid proxy, dhcp server, etc.  It doesn't have X installed, and runs amd64.  The desktop instance (x86) crashes more frequently, but it doesn't seem to be X related since it happens when I don't have X running.

I originally suspected the latest Virtualbox update (3.2.6) caused it, but Ubuntu and Windows XP work like a champ.  Then I suspected the 2.6.34 kernel, but was able to trigger it with 2.6.33.

Being that I'm totally locked out of the system when this happens, is there any way I can try to figure out what's causing it?

----------

## BradN

Those symptoms sound a bit like what happens if the hard drive stops responding - input to things already running works ok until the disk is needed, then stuff hangs or crashes.  You should try an older (or newer, as this is a pretty serious problem it should get fixed) virtualbox to see if that helps any.

----------

## Shink

Yep, I'm pretty sure it was the hard drive that stopped working.  My server (core2duo) stopped hanging - I think I was seeing a coincidence as a symptom.  My desktop (i7) continued to hang, fairly quickly when compiling software.  Looking for a difference, I realized my i7 has nested paging and the core2duo did not.  Disabled netsed paging in virtualbox and so far things look good.

I don't have this problem running Ubuntu in a VM with the same settings (actually used a chrooted environment in ubuntu to build my base gentoo install), leading me to believe it might be some kernel setting I'm missing.

UPDATE: Nope still hangs without nested paging, and the virtualbox forums indicate that at least one Arch user is having a similiar problem.  I'm guessing a bug in Virtualbox.

----------

## Shink

OK, figured out what the problem was, but not the fix.

The core i7's will shut off cores when it feels that it can.  The virtual machine doesn't seem to know how to deal with that and just kind of hangs.  Sometimes, the core will "wake up" and everything will continue where it left off.  Sometimes, it does not.  I detected the behavior by watching "top" and noticing that some cores were going to 0% utilization and 0% idle.  If I set the virtual machine to 1 cpu, it works like a charm.

This has to be a kernel option I'm missing - any help?

----------

## idella4

Shink

 *Quote:*   

> 
> 
> I don't have this problem running Ubuntu in a VM with the same settings (actually used a chrooted environment in ubuntu to build my base gentoo install)
> 
> 

 

I don't know what yje cores are, but could you post your /etc/make.conf to check your CFLAGS comes to mind.

If you can get into ubuntu vm, why don't you go to its kernel config in boot, and you have a working kernel config to model to copy into your gentoo kernel.

After the hang occurs, shutdown, go into ubuntu and acquire and post the gentoo's dmesg.

----------

## Shink

 *Quote:*   

> I don't know what yje cores are, but could you post your /etc/make.conf to check your CFLAGS comes to mind. 
> 
> If you can get into ubuntu vm, why don't you go to its kernel config in boot, and you have a working kernel config to model to copy into your gentoo kernel. 
> 
> After the hang occurs, shutdown, go into ubuntu and acquire and post the gentoo's dmesg.

 

The hang is only temporary...  Given enough time, the core eventually wakes up and things proceed for another few seconds.  Others are having similar problems with Arch also starting with 3.2.6, so I'm thinking its a Virtualbox thing.  I'll hold out until the next maintenance release.

----------

