Win7 guest with "Not Attached" E1000 NIC eventually hangs

Discussions related to using VirtualBox on Linux hosts.
Post Reply
Cak
Posts: 1
Joined: 11. Oct 2018, 23:18

Win7 guest with "Not Attached" E1000 NIC eventually hangs

Post by Cak »

Hello!

I wanted to create a "clean" Windows 7 image so I created a VM with a "Not Attached" NIC. I tried to create the image many times. The VM always ended up freezing somewhere in the process of installing additional software. However, to reproduce the issue it's sufficient to just install Windows and let it idle on the desktop.

When the VM freezes, it uses 100% CPU. The screen is stuck, and it doesn't react to Ctrl-Alt-Del or ACPI shutdown. In gdb I can that it's the "EMT" thread using CPU. I wasn't able to single-step thru the code because I seemed to trigger some VirtualBox watchdog. In strace the EMT thread is mostly doing a ton of "ioctl(4, _IOC(0, 0x56, 0xc1, 0x00), 0) = 0" to run the VCPU. I think VirtualBox makes the guest's E1000 driver misbehave, freezing the guest.

I have tried a few things:
  • Different NIC fixes the problem (PCnet-FAST III)
  • Creating an empty Linux bridge and attaching the E1000 NIC fixes the problem
  • Creating a Ubuntu Live-CD VM. It did not freeze, but the e1000 driver complains a lot about "Detected Tx Unit Hang" (see attached log).
How can I fix this problem?

System Info:
  • VirtualBox 5.2.18 from the virtualbox,org repository. When debugging I used VirtualBox-5.2.18.tar.bz2 to get debug symbols.
  • Freezes with and without Guest Additions installed in the guest. With GA the log ends with "VMMDev: vmmDevHeartbeatFlatlinedTimer: Guest seems to be unresponsive. Last heartbeat received 4 seconds ago".
  • Host: Debian 9, 32GB RAM
  • Guest: Windows 7 SP1, 2GB RAM
Attachments
e1000-ubuntu-dmesg.txt
(98.81 KiB) Downloaded 40 times
e1000-Win7-VBox.log
I cannot find any interesting lines in this log.
(77.33 KiB) Downloaded 26 times
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Win7 guest with "Not Attached" E1000 NIC eventually hangs

Post by socratis »

00:00:01.146643 [/Devices/ich9pci/0/] (level 3)
00:00:01.146645   Trusted <integer> = 0x0000000000000001 (1)
No... do not modify the defaults! There's a really good reason that the defaults are what they are. Especially when ICH9 is clearly marked as experimental, and for OSX guests only!

If you want to prove that a particular scenario is failing, stick with the defaults. Notable exceptions include:
  • CPUs, depending on the cores of your host, must be HostCores > vCPUs, that is leave always 1 core for the host,
  • RAM, depending on the available host RAM,
  • VRAM, you usually you max it out (at least I do) and
  • Networking options, not the NIC type, the "Attached to" option.
So, can you please try the experiment again, but sticking to the default PIIX3 this time?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Cake
Posts: 2
Joined: 20. Oct 2018, 11:26

Re: Win7 guest with "Not Attached" E1000 NIC eventually hangs

Post by Cake »

I upgraded to VirtualBox 5.2.20 and redid the experiment per your instructions: the only change I made to the VM was setting the NIC to "Not Attached".
I observed the same behavior as in the initial post. The VM was frozen the next day.

I didn't let Ubuntu run as long this time, so you can see the beginning of the kernel log. The Linux kernel started complaining a few seconds after booting.
Attachments
ubuntu1604-e1000-dmesg.txt
(50.69 KiB) Downloaded 26 times
ubuntu1604-e1000-VBox.log
(111.08 KiB) Downloaded 31 times
win7-e1000-VBox.log
(105.1 KiB) Downloaded 24 times
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Win7 guest with "Not Attached" E1000 NIC eventually hangs

Post by socratis »

I can't seem to reproduce it with a Win7 (32bit) VM and an Ubuntu 16.04 (32bit) VM. I'm not sure if it's the bitness, but I highly doubt it. Could you give me a complete step-by-step guide to reproducing the problem?

From "insert the installation CD" to "watch it crash and burn"? ;)

PS. I should have mentioned it from your first post, but you should ZIP your logs. It helps save a (virtual) tree or two...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Cake
Posts: 2
Joined: 20. Oct 2018, 11:26

Re: Win7 guest with "Not Attached" E1000 NIC eventually hangs

Post by Cake »

I borrowed a Windows 10 1803 64bit host. It had the same problem:
  • Windows 7 32-bit: Eventually hangs
  • Windows 7 64-bit: Eventually hangs
  • Ubuntu1604 32-bit: dmesg complains about Tx problem
  • Ubuntu1805 64-bit: dmesg complains about Tx problem
Here is how I reproduce it. Note that Windows must sit on the desktop for some time (usually hangs in less than 3 hours). Ubuntu's linux kernel starts complaining about the network immediately.
Reproduce Windows
  • (VirtualBox main window)
    Machine -> New
  • (Create Virtual Machine dialog box)
    Name: Test2-Win7
    Press "Create"
  • (Create Virtual Hard Disk)
    Press "Create"
  • (Test2-Win7 Settings)
    Select the "Network" pane
    Attached to: Not Attached
    (Cable Connected is checked by default)
  • Start the VM
  • Insert the Windows 7 SP1 Ultimate ISO.
  • (Install Windows)
    Next
    Install Now
    (x) I accept the license terms
    Custom
    Disk 0, Next
    Username: Superman, Next
    Blank password, Next
    Skip product key
    Use recommended settings for updates
    Use default timezone, Next
    Public Network
  • Windows is now installed, and idles at the desktop
  • Go to sleep. When you wake up the next day, it has frozen!
Reproduce Ubuntu
  • (VirtualBox main window)
    Machine -> New
  • (Create Virtual Machine dialog box)
    Name: Test2-Ubuntu
    Hard Disk: (x) Do not add a virtual hard disk
    Press "Create"
  • (Test2-Ubuntu Settings)
    Select the "Network" pane
    Attached to: Not Attached
    (Cable Connected is checked by default)
  • Start the VM
  • Insert the ubuntu-16.04.5-desktop-i386.iso.
  • Press the "Try Ubuntu" button
  • Open terminal, run "dmesg". (Note that the Ubuntu VM does not freeze, it just complains a lot about "Detected Tx Unit Hang" every few seconds)
Post Reply