3D accelerated machines crash on reboot

Discussions related to using VirtualBox on Windows hosts.
Vicmal
Posts: 10
Joined: 21. Apr 2020, 23:33

3D accelerated machines crash on reboot

Post by Vicmal »

Hello,

All my VMs steadily crash while rebooting with 3D acceleration on. There's an access violation here:
error.png
error.png (13.62 KiB) Viewed 16224 times
I'm sorry if a similar topic was already discussed here. I've searched and found some close themes, but they were too old and related to ancient VirtualBox versions, so I've opened a new post.

I'm using the latest VirtualBox (6.1.6). My host system is Windows 10 Home (64 bit). The problem appears for any VM configured with 3D acceleration on and the graphic controller either VBoxSVGA or VMSVGA. It is reproduced even for a void VM (without any OS installed), so I can have tested different Linux and Windows based machines with different configurations, even without having a respective OS. For any machine, 3D on and VBoxSVGA/VMSVGA controller ensure the error (regardless of other options). The problem occurs only for pure reset, simple shutdown seems to work well.

As a simple example, I have created a new VM for Windows 7 32-bit, with 3D on. Full config is on the picture, but for me, to get the problem, no settings matter except 3D and VBoxSVGA. The VM is void: I don't install any OS and just restart the machine right off the bat, so it gives the access violation. I have attached the respective logs of this session. Will be very grateful if somebody hints me what can be wrong on my side.
config.png
config.png (27.11 KiB) Viewed 16224 times
Attachments
vicmal_logs.zip
(50.76 KiB) Downloaded 21 times
Vicmal
Posts: 10
Joined: 21. Apr 2020, 23:33

Re: 3D accelerated machines crash on reboot

Post by Vicmal »

Well, I see my theme is not quite interesting, but two small additions just for any case:

I have tried an older version (6.0.20). The same behaviour (just changed the address of access violation).

Also I have tried to suppress my antivirus during the session (a standard Win10 Windows Defender, no third party). No difference. And besides that, I'm running out of fresh ideas, unfortunately.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: 3D accelerated machines crash on reboot

Post by scottgus1 »

Looks like we missed this one. See Diagnosing VirtualBox Hardening Issues. Your hardening log has an exit code of 0xc0000005, which is covered in the linked tutorial. The hardening log shows errors on Nvidia video dll's, consistent with your guests' errors when using 3D. 3D acceleration uses the host's video drivers to process some of the guest's video.

Try the headless test suggested in the tutorial - actually do Detachable, so you still get a guest GUI to shut down the guest with, otherwise you will have to RDP into the guest to get it to shut down nicely. Headless & Detachable don't use 3D acceleration.

The Windows 10 Defender AV has never to my knowledge interfered with Virtualbox.
Vicmal
Posts: 10
Joined: 21. Apr 2020, 23:33

Re: 3D accelerated machines crash on reboot

Post by Vicmal »

Hi scottgus1,

Thank you again for your help! I appreciate it a lot. Now I've suddenly got a pile of work, but later I'll surely examine the link, try your advices and write about progress. Sorry for my annoying problems.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: 3D accelerated machines crash on reboot

Post by scottgus1 »

No problem, Vicmal, no annoyances seen.Let us know what happens.
Vicmal
Posts: 10
Joined: 21. Apr 2020, 23:33

Re: 3D accelerated machines crash on reboot

Post by Vicmal »

At last, I have read the article and examined the logs. As I've got, the cause of my problem may be some certificate discrepancy of my video card driver. And indeed, there are log records about rejecting my NVidia driver DLLs.

So I have updated my Nvidia driver from the official site to the latest possible version (clean update with total erase of old drivers and profiles). Then, to be sure, I have reinstalled VirtualBox (6.1.6). But the problem has not been changed. The same lines in a new hardening log:

supR3HardenedMonitor_LdrLoadDll: rejecting 'C:\WINDOWS\system32\DriverStore\FileRepository\nvami.inf_amd64_1474122a0ce2f241\nvinitx.dll' (C:\WINDOWS\system32\DriverStore\FileRepository\nvami.inf_amd64_1474122a0ce2f241\nvinitx.dll): rcNt=0xc0000190

supR3HardenedMonitor_LdrLoadDll: rejecting 'C:\WINDOWS\System32\DriverStore\FileRepository\nvami.inf_amd64_1474122a0ce2f241\nvumdshimx.dll' (C:\WINDOWS\System32\DriverStore\FileRepository\nvami.inf_amd64_1474122a0ce2f241\nvumdshimx.dll): rcNt=0xc0000190

The path to the driver DLLs has been changed after update. I've checked that it matches the latest installed driver. Then, I've tried the detachable start but it gives the same behaviour. I have attached the logs of both variants.

Also I tried to explicitly select the NVidia driver for VirtualBox in my NVidia control panel (there's also an embedded Intel video card, so it's possible to manually switch a card for a specific app). But no way it helped.

As I see, according to the logs, the instruction causing the access violation is called in the address range of VBoxDD.dll. This DLL had the range (7FFD23850000 - 7FFD24235FFF) when loaded, and the access error has the address 7FFD238DF99C inside this range. But then the log dumps the list of all current DLLs, and there's no VBoxDD.dll there, so it seems already unloaded. Though perhaps it's all unrelated nonsense and I missed something really essential for my problem. But I'm a bit stuck and don't know where to dig further :(
Attachments
vicmal_logs2.zip
(100.81 KiB) Downloaded 13 times
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: 3D accelerated machines crash on reboot

Post by fth0 »

The verification of the digital signature of the NVIDIA dll file(s) fails. VirtualBox rejects the dll file, and the Guru Meditation is probably a 'late' consequence of that.

Check which digital signatures are available, by using Windows Explorer, opening the file's context menu (right mouse click), go to the Digital Signatures tab. If there is only a signature from NVIDIA, you'd have to use other drivers (I'd take a WHQL variant). If there are additional signatures from Microsoft, you'd have to investigate further. A possible starting point would be the Sysinternals sigcheck program.
Vicmal
Posts: 10
Joined: 21. Apr 2020, 23:33

Re: 3D accelerated machines crash on reboot

Post by Vicmal »

Hi guys,

First of all, sorry for such a long delay. I was a bit ill and could not answer letters. I am sorry to fth0 especially, whose advice was left without response. But I really appreciate your help. Now I am back and ready to fight the problem again. Unfortunately I see that it's already lost. I have read some recent discussions in other threads, related to the same problem of poorly signed NVidia drivers, and now the problem is clear for me. Unfortunately I have an old notebook with a specific NVidia card, and its latest available driver is dated 2018 and has the same issue of outdated certificates as the previous ones. And I guess they won't update it anymore.

So, I wonder why the problem is not solvable from another side. I mean, is it so necessary to have so strict hardening rules without any options and exceptions? I'd like to have, for example, a hidden list of exclusions, i.e. modules that are trusted and free from checking, for my own risk and responsibility. Cause the situation is ridiculous. I have installed an official driver from its official source. I know that it's completely secure, my antivirus knows it, and everybody knows except VirtualBox, who continues to overprotect me without any option to change the security level.
arQon
Posts: 228
Joined: 1. Jan 2017, 09:16
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu 16.04 x64, W7

Re: 3D accelerated machines crash on reboot

Post by arQon »

There's never going to be an option to disable the hardening: that's been made clear in the past, and unless you have the sort of cash needed for a support contract it's not going to happen regardless of how wrong you think it is.

So your options are rather limited. You could try the PUEL builds, though I have no idea how much 3D support those have, if any.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: 3D accelerated machines crash on reboot

Post by scottgus1 »

Further info from fth0 here: viewtopic.php?f=6&t=99059&p=480386#p480336
Nvidia & Oracle are working on the problem.

I have heard that hardening can be turned off if you build Virtualbox from source code. [citation needed :lol: ]
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: 3D accelerated machines crash on reboot

Post by fth0 »

Vicmal wrote:First of all, sorry for such a long delay. I was a bit ill and could not answer letters. I am sorry to fth0 especially, whose advice was left without response.
No problem at all, take your time. :) While I appreciate your kind words, and also positive as well as negative feedback from nearly all users (yours included), I've not been literally sitting on my chair and desperately waiting for your answer. ;)
Vicmal wrote:I have read some recent discussions in other threads, related to the same problem of poorly signed NVidia drivers, and now the problem is clear for me.
Well, your problem could be a similar problem as the current problem, but it doesn't have to. A properly signed binary can be correctly validated (nearly) infinitely. If you'd provide me with the files in question, I could take a look.
scottgus1 wrote:I have heard that hardening can be turned off if you build Virtualbox from source code. [citation needed :lol: ]
If one day you really need the citation: Windows build instructions :)
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: 3D accelerated machines crash on reboot

Post by scottgus1 »

Thanks for the build link, fth0! Somehow, in the back of my head, I had an inkling you'd know...
Vicmal
Posts: 10
Joined: 21. Apr 2020, 23:33

Re: 3D accelerated machines crash on reboot

Post by Vicmal »

Hello,

Thanks to all for the answers. Building the VirtualBox is a good idea, but now it's a bit extreme for me :)
Well, your problem could be a similar problem as the current problem, but it doesn't have to. A properly signed binary can be correctly validated (nearly) infinitely. If you'd provide me with the files in question, I could take a look.
fth0, thank you a lot. Sorry for bothering you with my troubles. I must confess that I don't know much about certificates, so perhaps I miss some stupid point. Well, I'm using the latest VirtualBox (6.1.12), my host OS is Win 10 Home (x64), and my NVidia driver is GeForce GT 630M v. 391.35 (just to clarify). I won't attach the session logs because nothing changed since the first time. VirtualBox rejects two DLLs: nvinitx.dll & nvumdshimx.dll. I will attach nvinitx.dll only, for nvumdshimx.dll is all the same. Sigcheck gives the following info about it:

c:\windows\system32\driverstore\filerepository\nvami.inf_amd64_1474122a0ce2f241\nvinitx.dll:
Verified: Signed
Signing date: 16:09 25/03/2018
Publisher: Microsoft Windows Hardware Compatibility Publisher
Company: NVIDIA Corporation
Description: NVIDIA shim initialization dll, Version 391.35
Product: NVIDIA D3D shim drivers
Prod version: 23.21.13.9135
File version: 23.21.13.9135
MachineType: 64-bit

Window shows the following signature list for this DLL:

NVIDIA Corporation PE Sign v2016 (certificate cannot be verified)
Microsoft Windows Hardware Compatibility Publisher (signature is ok)

Though both certificates seem to be outdated (expired in 2018). I tried to install the NVidia certificate via MMC, after that both certificates would show "signature is ok", though the behaviour of VirtualBox wouldn't change at all.
Attachments
nvinitx.zip
(112.31 KiB) Downloaded 10 times
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: 3D accelerated machines crash on reboot

Post by fth0 »

All certificate chains and signatures are ok. The only missing certificate is the one with CN = Microsoft Digital Media Authority 2005, which is missing in almost all current Windows installations, but accepted by VirtualBox and by Windows anyway. So you're not experiencing problems similar to the current problems with invalid signatures.

The rejecting of nvinitx.dll seems to happen since the VirtualBox Hardening code exists (VirtualBox 4.3.14, 2014). You can search Google with nvinitx.dll site:forums.virtualbox.org to read about those issues. Do you have any security software installed in the host OS? If so, uninstall it for a test.
Vicmal
Posts: 10
Joined: 21. Apr 2020, 23:33

Re: 3D accelerated machines crash on reboot

Post by Vicmal »

Hi fth0,

I have no third-party security software, only Windows Defender and Firewall. I tried to turn Defender off, it would not help. I have also added VirtualBox to exclusions for various exploit protections (like DLL injection protection). And also I directly assigned NVidia card as default for VirtualBox, to prevent the check for selection between NVidia and my embedded card. Of course, nothing of it works. Nevertheless, thank you for your help.
Post Reply