Crash on pause

Discussions related to using VirtualBox on Windows hosts.
ueli
Posts: 19
Joined: 4. Jun 2011, 18:34
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: WinXP Pro

Crash on pause

Post by ueli »

I have experienced the same thing as described in viewtopic.php?f=6&t=95293
I therefore stayed on vbox 6.0.12, putting a lot of hope into 6.1
But now it has happened again with version 6.1.2r135662 (Qt5.6.2): I clicked on the pause function, and I got a crash.
Windows says the instruction at 0x00007FFB03998201 could not write to address 0x0000000000000021.

The problem occurs only with a certain probability and cannot easily be reproduced. I have paused and resumed the VM quite a few times until it happened. This is a behavior I have also observed with 6.0.14 and 6.0.16. I even believe it has happened on 6.0.12, I'm not sure anymore. If so, then the probability on 6.0.12 was very low.

At the time of the above crash I had 2 VMs running, a 32-bit Ubuntu and WinXP. The crash occurred when pausing Ubuntu. I then tried to shut down WinXP (using the Windows start menu). Then the WinXP VM crashed too with the same error message. This might indicate that the problem is not related to a VM instance, but rather to the glue between them.

My host OS is Win10-x64 version 1903
ueli
Posts: 19
Joined: 4. Jun 2011, 18:34
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: WinXP Pro

Re: Crash on pause

Post by ueli »

It has happened again, this time with only 1 VM running, the Ubuntu. The Windows error message is slightly different. The address of the instruction in VirtualBoxVM.exe is this time 0x00007FFAEE818201. The address being written to is the same.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Crash on pause

Post by scottgus1 »

One thing that you might have noticed reading around the forum: forum gurus ask for a guest log showing the problem happening.

Start your guest from cold boot, not save state. Run until you observe the problem. If it is a problem that takes time to happen, note how many hours/minutes/seconds from the start of the guest until the problem happens, so we can find it in the log easily. Then shut down the guest from within the guest OS if possible, or close the guest window with the Power Off option set. Then zip and post the guest's vbox.log, using the forum's Upload Attachment tab.
ueli
Posts: 19
Joined: 4. Jun 2011, 18:34
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: WinXP Pro

Re: Crash on pause

Post by ueli »

Ok, I wasn't aware of the logs, but now I know.
The problem has just struck again. So this is a good moment to post logs.
From a user's point of view, this is what happened:

------------------------------------
1. Start Ubuntu guest.
2. Start WinXP guest.
3. Manually pause the Ubuntu, while WinXP keeps running.
4. Put host (Win 10) asleep.
5. Wake up the host. On wakeup, I immediately get a message notifying me of a VM crash. It turns out that the WinXP guest is gone, the paused Ubuntu guest is still there.
6. I try to manually resume the paused Ubuntu, but it crashes immediately.
------------------------------------

Obviously, I wasn't able to stop the guests in a decent way, as the host did it for me in a violent manner. But I saved the logs of both guests (after a reboot of the host) and attach them here.
Additional comment: When trying ti reboot the host, Win 10 told me that some vbox component had open connections. I clicked on ignore and reboot anyway.
Attachments
ubu3-2020-01-24-15-51-34.zip
(33.43 KiB) Downloaded 26 times
WXP_S4-2020-01-24-13-29-39.zip
(34.34 KiB) Downloaded 19 times
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Crash on pause

Post by scottgus1 »

I can't see what is going on. There's a lot of hex in those logs, other forum gurus speak hex and I don't :lol:

But I suspect step 4:
ueli wrote:4. Put host (Win 10) asleep.
If you do not put your host to sleep, do your guests stay alive through pauses?

If your guests stay stable through pauses without the host going to sleep, but reliably crash if paused while the host goes to sleep, then this could be a good candidate for the Bugtracker. Post the full story and the logs.

And until a fix comes (if one comes), don't put the host to sleep with guests running, paused or otherwise. Save-state if you don't want to fully reboot.
ueli
Posts: 19
Joined: 4. Jun 2011, 18:34
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: WinXP Pro

Re: Crash on pause

Post by ueli »

I have a habit of keeping a Windows session active for days or even weeks. When I'm not using it, I do a sleep or hibernate.
I also have a habit of keeping VM instances open all the time. Sometimes I pause one when I want to save host resources. So it's very likely that there were host suspends before I get a crash. Note: I say 'suspends' because most of the time the guests survive some suspend/resume cycles. It's just that the probability seems to have significantly increased since vbox 6.0.12 . But I can't reliably reproduce a crash.

On the other hand, I can't say that crashes never occur without host suspend/resume. I'm not doing pause that often. All I can say is that in the case with logs, one VM was active and the other paused during host suspend/resume.

In the mean time I took a short look at the logs of my previous post. I found in both logs a line reporting an uncaught exception. That makes me indeed think of a bug ..

Thanks for the suggestion of closing a VM with saving state. I will think about changing my habits ..
SmithersTheOracle
Posts: 60
Joined: 28. Dec 2019, 08:58
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Crash on pause

Post by SmithersTheOracle »

Just offering my set of eyes here. I noticed line 1427 of the log says
20:57:28.873778 Ignoring VM resume request, VM was not suspended due to host-suspend
which says the host was paused, but in your original post you were saying it happens when you pause/resume a VM. Is this maybe a separate issue? If so, then this log file might not help your original issue. On the other hand, maybe it will. Are these VMs located on external storage? Even if they're remapped, your physical hard drive(s) may not have received power yet when resuming the host and I could imagine that being the cause.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Crash on pause

Post by scottgus1 »

According to the 6.1.0 manual section 9.23 'Handling of Host Power Management Events', the guests are supposed to survive a host 'suspend'. But things in Virtualbox have broken before, or the host OS makes changes that have to be chased. Maybe that line Smithers found shows a failure in the desired host-suspend behavior? Time to hit the Bugtracker.

Good idea, Smithers, about external drives:
00:00:02.621425 File system of 'C:\Users\Ueli\VirtualBox VMs\ubu3\Snapshots' (snapshots) is ntfs
00:00:02.621435 File system of 'C:\NoBackupSSD\VirtualBox VMs\ubu8_3\ubu8_3.vdi' is ntfs
00:00:02.222635 File system of 'C:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso' (DVD) is ntfs
00:00:02.223640 File system of 'C:\Users\Ueli\VirtualBox VMs\WXP_S4\Snapshots' (snapshots) is ntfs
00:00:02.223647 File system of 'W:\WXP_S4.vdi' is ntfs
Ueli, what is the W drive?
ueli
Posts: 19
Joined: 4. Jun 2011, 18:34
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: WinXP Pro

Re: Crash on pause

Post by ueli »

The W: drive is a Truecrypt volume. A container file on physical drive C: is turned into a virtual Windows drive by means of Truecrypt drivers. It's kind of nested virtual drives: A vbox virtual disk on a Truecrypt virtual disk on physical drive C:
I can imagine that the Truecrypt components also need some time after host startup until they become fully functional. This would also explain why the problem occurs only occasionally.

But then: How can this affect the other guest, which is a plain vbox file on physical drive C: ? In most cases I experienced the problem not during Windows resume, but later on. I used the Ubuntu guest (the one on physical storage),then tried a manual pause and got a crash.
ueli
Posts: 19
Joined: 4. Jun 2011, 18:34
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: WinXP Pro

Re: Crash on pause

Post by ueli »

I just had another case that can't be explained with drive latency:

1. Start Ubuntu guest (vdi on C: physical drive)
2. Start WinXP guest (vdi on W: virtual drive)
3. Shutdown WinXP from guest UI (start button)
4. Suspend host
5. Resume host: Ubuntu guest crashes.

Note: Step 2 had everything ready. No virtual drive latency. WinXP guest performed normally, including shutdown.
Step 5: The crashing guest was the only one on the host. Its vdi was a plain file on C:

Log attached. It contains again a very suspicious line:
10:08:27.200270 !!! rtR3WinUnhandledXcptFilter caught an exception on thread 0000000000002d70!!!
Attachments
Logs.zip
(140.16 KiB) Downloaded 14 times
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Crash on pause

Post by scottgus1 »

ueli wrote:How can this affect the other guest,
If the crash feeds back into the VboxSVC process that governs all of the guests, then they might all die off.

Here's some troubleshooting steps:
1. If you only have the Ubuntu guest running, does it die off after host suspend?
2. If you only have the XP guest running, does it die off after host suspend?
3. If you move the Truecrypt-encapsulated drive file out to the C drive, and don't run Truecrypt while running Virtualbox, does host suspend cause the guests to crash?
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Crash on pause

Post by fth0 »

scottgus1 wrote:other forum gurus speak hex and I don't :lol:
On my way! ;)
WXP_S4-2020-01-24-13-29-39.log wrote:
00:00:02.245979 [/Devices/ichac97/0/LUN#0/Config/] (level 5)
00:00:02.245981   InputEnabled    <integer> = 0x0000000000000000 (0)
00:00:02.245982   OutputEnabled   <integer> = 0x0000000000000001 (1)
[...]
00:00:12.692989 Audio: Enabling input for driver 'DSoundAudio'
00:00:12.698183 Audio Mixer: Setting recording source of sink '[Recording] Line In' to '[Line-In] DirectSound'
00:00:12.702907 Audio: Disabling input for driver 'DSoundAudio'
00:00:12.738667 Audio Mixer: Setting recording source of sink '[Recording] Line In' to '<None>'
[...]
14:46:38.250159 DSound: Stopping capture buffer failed with ERROR_CALL_NOT_IMPLEMENTED 0x88780078
[...]
14:54:01.300418 DSound: Starting to capture failed with ERROR_CALL_NOT_IMPLEMENTED 0x88780078
In the VM configuration, Audio Input seems to be disabled. While the VM is running, there are a lot of events enabling/disabling audio input. When the VM is suspended and resumed for the last time, there are two error messages.
WXP_S4-2020-01-24-13-29-39.log wrote:
18:34:20.151649 !!! rtR3WinUnhandledXcptFilter caught an exception on thread 0000000000002e00!!!
18:34:20.151663 
18:34:20.151664 ExceptionCode=0xc0000005 ExceptionFlags=0x00000000 ExceptionAddress=00007ff9a82d8201
18:34:20.151672 ExceptionInformation[0]=0000000000000001
18:34:20.151678 ExceptionInformation[1]=0000000000000021
[...]
18:34:20.153376 Thread ID:   0000000000002e00
18:34:20.153387 Thread name: EMT
[...]
18:34:20.154315 Xcpt PC         : 00007ff9a82d8201 - 0x00028201 bytes into C:\Windows\System32\dsound.dll
The VirtualBox Execution Manager Thread (EMT) executes code in C:\Windows\System32\dsound.dll that tries to write (0x0000000000000001) to a small memory address (0x0000000000000021), triggering an ACCESS_VIOLATION (0xc0000005) exception.

Regarding the different suspend/resume behavior:
WXP_S4-2020-01-24-13-29-39.log wrote:
00:12:47.576074 Pausing VM execution, reason 'host suspend'
[...]
01:37:15.246488 Resuming VM execution, reason 'host resume'
[...]
18:34:20.127365 Pausing VM execution, reason 'host suspend'
The Windows XP guest is running when the host is manually suspended, so it is automatically suspended by VirtualBox. Afterwards, the host is automatically resumed and suspended several times, and VirtualBox also resumes and suspends the Windows XP guest. During one of the automatic suspensions, the Windows XP guest crashes (around 18 hours and 34 minutes).
ubu3-2020-01-24-15-51-34.log wrote:
00:00:50.522195 Console: Machine state changed to 'Paused'
[...]
01:39:02.138443 Resuming VM execution, reason 'host resume'
01:39:02.138477 Ignoring VM resume request, VM was not suspended due to host-suspend
[...]
20:57:28.873761 Resuming VM execution, reason 'host resume'
20:57:28.873778 Ignoring VM resume request, VM was not suspended due to host-suspend
[...]
20:57:50.675367 DSound: Starting to capture failed with ERROR_CALL_NOT_IMPLEMENTED 0x88780078
[...]
20:57:50.753947 Console: Machine state changed to 'Running'
The Ubuntu guest is manually suspended before the host is manually suspended. Afterwards, the host is automatically resumed and suspended several times, and VirtualBox keeps the Ubuntu guest in the suspended state. When the Ubuntu guest is manually resumed (around 20 hours and 57 minutes), it exhibits the same crash as the Windows XP VM.

Since the crashes are audio related, I suggest to try and fiddle with the audio setup. If you enable audio input in the VM configurations, do the error messages and the crashes persist?

Edit: The 3rd log file also fits the bill.

Additionally, I noticed that audio input was enabled in the Ubuntu guest and disabled in the Windows XP guest. This combination may very well be the key to reproduce the crashes ...
ueli
Posts: 19
Joined: 4. Jun 2011, 18:34
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: WinXP Pro

Re: Crash on pause

Post by ueli »

scottgus1 wrote:
Here's some troubleshooting steps:
1. If you only have the Ubuntu guest running, does it die off after host suspend?
2. If you only have the XP guest running, does it die off after host suspend?
3. If you move the Truecrypt-encapsulated drive file out to the C drive, and don't run Truecrypt while running Virtualbox, does host suspend cause the guests to crash?
Step 1 is answered by my previous post: Ubuntu crash after XP was shutdown. Answer: Yes
Steps 2 and 3: In the meantime I have had crashes for both situations. Answer: Yes
fth0 wrote: Additionally, I noticed that audio input was enabled in the Ubuntu guest and disabled in the Windows XP guest. This combination may very well be the key to reproduce the crashes ...
As I have seen crashes with only one guest running, the combination of audio input settings is unlikely to be a key issue. But I'm goint to try: First disable on both (I really don't need audio input), then enable on both.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Crash on pause

Post by scottgus1 »

ueli wrote:Step 1 is answered by my previous post: Ubuntu crash after XP was shutdown
The 'previous post' said:
ueli wrote:1. Start Ubuntu guest (vdi on C: physical drive)
2. Start WinXP guest (vdi on W: virtual drive)
3. Shutdown WinXP from guest UI (start button)
4. Suspend host
5. Resume host: Ubuntu guest crashes.
Notice that at one point both guests are running at the same time.

I asked:
Scottgus1 wrote:1. If you only have the Ubuntu guest running, does it die off after host suspend?
2. If you only have the XP guest running, does it die off after host suspend?
This is not referring to at one point both guests were running then one is shut down and the other crashes over host suspend.

I meant:
0. Start host fresh. Leave XP guest off.
1. Start Ubuntu guest (vdi on C: physical drive)
2. Suspend host
3. Resume host.
Does the Ubuntu guest ever crash?
and
0. Start host fresh. Leave Ubuntu guest off.
1. Start XP guest (vdi on W: virtual drive)
2. Suspend host
3. Resume host.
Does the XP guest ever crash?
ueli wrote:Steps ... 3: In the meantime I have had crashes for both situations.
Please confirm you actually did move/copy the XP virtual drive out of the Truecrypt volume onto your C drive, you set the guest to use the C drive copy instead of the W drive original, and that you still get the XP guest crashing due to host suspend.
ueli wrote:As I have seen crashes with only one guest running
This needs to be confirmed via my instructions above.
ueli wrote:the combination of audio input settings is unlikely to be a key issue
fth0 got a lot further diagnosing this issue than I ever could have, the logs do actually point to audio crashes, and you had to ask what's up from the beginning, so I wouldn't poo-poo anything until actual experiment confirms otherwise.
ueli wrote:But I'm goint to try:
This is a very good idea. Also check on the situations I posted above.
ueli
Posts: 19
Joined: 4. Jun 2011, 18:34
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: WinXP Pro

Re: Crash on pause

Post by ueli »

In the mean time I have tried quite a few things, all based on the assumption that the problem is related to audio. I have run both guests with audio in disabled, then both guests with audio in and out disabled, and finally only Ubuntu with audio in/out disabled. Eventually I got crashes with all these setups. I post here logs of the least complex case: Ubuntu being the only guest, with all audio off, I never did a manual pause, but several host suspend/resume cycles (including both sleep and hibernate).

And something else which I haven't mentioned yet because I thought it was insignificant: I'm not the only user of the host PC. My wife also uses it (not running any VMs though), so host suspend/resume sometimes includes a user change. My guests keep running in the background while my wife is the active user. This may be relevant for audio, because I think that Windows allocates audio resources to the currently active user. But on the other hand, my guests survive many of these situations.
The attached logs document a crash that happened after host suspend/resume without Windows user change.

I can't see if the crash occurs when suspending the host or when resuming it. But I once heard an audio signal from the host at the time of suspending it, which was probably related to the message box of the process crash. The host display was already off, and the message box was there when resuming the host.
Attachments
Logs.zip
(153.35 KiB) Downloaded 14 times
Post Reply