Critical error - Guru Meditation

Discussions related to using the OSE version of VirtualBox.
Post Reply
RicV
Posts: 96
Joined: 25. Aug 2015, 17:58
Primary OS: Ubuntu other
VBox Version: OSE self-compiled
Guest OSses: Linux *.*, Win*
Location: Lake Tahoe, California

Critical error - Guru Meditation

Post by RicV »

Hi,

I have a virtual device model (USB mass storage device) plugged in to VBox 5.0.22 via PDM. It works well with a variety of Linux guests, but I need to track down a problem with Windows 10 guests. The problem is somewhat intermittent in its failure symptom, but several times now I have seen this "Guru Meditation" dialog box come up (with some of the text garbled).

It's a model of a USB mass storage device behind a PCIe switch that is plugged into the ICH9 host bus. I had formatted the device, and then attempted to copy a file onto it. When the file copy percentometer got to 23%, the Guru Meditation dialog box popped up and it was game over.

I have attached the VBox.log file. I did not see the mentioned png file from this run, but I captured a screen shot of the dialog (though I had to crop it considerably). The png file from a prior run just showed the Windows 10 desktop.

Any ideas?
Attachments
Guru Meditation dialog box with garbled text
Guru Meditation dialog box with garbled text
VBox_Win10_GuruMeditation2.png (101.36 KiB) Viewed 7865 times
VBox.log.bz2
Guru Meditation log, zipped
(48.85 KiB) Downloaded 36 times
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Critical error - Guru Meditation

Post by Perryg »

How does the guest actually access this device?
RicV
Posts: 96
Joined: 25. Aug 2015, 17:58
Primary OS: Ubuntu other
VBox Version: OSE self-compiled
Guest OSses: Linux *.*, Win*
Location: Lake Tahoe, California

Re: Critical error - Guru Meditation

Post by RicV »

I am not quite sure what you're asking, but here goes. The guest is accessing the device through PDM. I register the PCIe switch with PDM as a device plugged into the ICH9 host bus, at 0:28:0. I register the PCIe endpoint with PDM separately, at 3:00:0 (below my switch). I register the address range (as assigned by the guest in the endpoint BAR0 register) with PDM, so my callbacks are used to read and write that address range. The PCIe endpoint model drives the USB mass storage controller model.

With my Linux guests, the lspci command shows both nodes as expected. The lsusb command shows the mass storage device. I am able to partition the device, format it, copy files to it, everything you would expect from a USB memory stick. This involved innumerable MMIO reads and writes from the guest via my callbacks, innumerable DMA operations from the device model (which I send to PDM since they target system memory), and innumerable interrupts using either IRQ or MSI type interrupts.

The same device model is plugged into my Windows 10 VM in the same exact way behaves erratically, often failing with the Guru Meditation dialog, though that VM does work with a different device model.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Critical error - Guru Meditation

Post by Perryg »

Actually how it works is not a concern to me but rather how you attach it to the guest. It looks like you are using it as a USB device and are only using the OHCI drivers which are very flaky and intended for things like a mouse. EHCI or xHCI are the preferable methods but that would require the extension pack being installed. Look at the log file and it will show the lag with OHCI and more than likely your real issue.
RicV
Posts: 96
Joined: 25. Aug 2015, 17:58
Primary OS: Ubuntu other
VBox Version: OSE self-compiled
Guest OSses: Linux *.*, Win*
Location: Lake Tahoe, California

Re: Critical error - Guru Meditation

Post by RicV »

Ahhh, I get it. Actually, this is a USB3 (XHCI) device model, and I am accessing it as such as evidenced below. I am aware of the XHCI expansion pack, and have used that in the past, but my understanding is that it's for using the VirtualBox XHCI model which forwards to an actual USB device plugged into the host. That is not what I am doing, I have my own XHCI device model which is simulating a USB mass storage device.

I will try to confirm that Windows is also using an XHCI driver as well, but here is what I have with Ubuntu 16 as the guest:

From lspci -v
03:00.0 USB controller: XXXXXXXXXX Corp. Device 1282 (rev 04) (prog-if 30 [XHCI])
Subsystem: XXXXXXXXXX Corp. Device 0004
Flags: bus master, fast devsel, latency 0, IRQ 24
Memory at f0900000 (64-bit, prefetchable) [size=256K]
Capabilities: <access denied>
Kernel driver in use: xhci_hcd
From /var/log/syslog
Jan 30 18:29:25 VBox-VM kernel: [ 1.265438] xhci_hcd 0000:03:00.0: xHCI Host Controller
Jan 30 18:29:25 VBox-VM kernel: [ 1.265440] xhci_hcd 0000:03:00.0: new USB bus registered, assigned bus number 3
Jan 30 18:29:25 VBox-VM kernel: [ 1.274109] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
Jan 30 18:29:25 VBox-VM kernel: [ 1.274127] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003
Jan 30 18:29:25 VBox-VM kernel: [ 1.274129] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
Jan 30 18:29:25 VBox-VM kernel: [ 1.274131] usb usb3: Product: xHCI Host Controller
Jan 30 18:29:25 VBox-VM kernel: [ 1.274133] usb usb3: Manufacturer: Linux 4.4.0-31-generic xhci-hcd
Jan 30 18:29:25 VBox-VM kernel: [ 1.274135] usb usb3: SerialNumber: 0000:03:00.0
.
.
.
Jan 30 18:30:03 VBox-VM kernel: [ 48.528864] usb 3-1: new SuperSpeed USB device number 2 using xhci_hcd
Jan 30 18:30:03 VBox-VM kernel: [ 48.617439] usb 3-1: New USB device found, idVendor=04d6, idProduct=1115
Jan 30 18:30:03 VBox-VM kernel: [ 48.617443] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan 30 18:30:03 VBox-VM kernel: [ 48.617445] usb 3-1: Product: MSC
Jan 30 18:30:03 VBox-VM kernel: [ 48.617446] usb 3-1: Manufacturer: XXXXXXXXXX
Jan 30 18:30:03 VBox-VM kernel: [ 48.617447] usb 3-1: SerialNumber: D0123456789DF
Jan 30 18:30:03 VBox-VM mtp-probe: checking bus 3, device 2: "/sys/devices/pci0000:00/0000:00:1c.0/0000:03:00.0/usb3/3-1"
Jan 30 18:30:03 VBox-VM mtp-probe: bus: 3, device: 2 was not an MTP device
Jan 30 18:30:03 VBox-VM kernel: [ 48.764893] usb-storage 3-1:1.0: USB Mass Storage device detected
Jan 30 18:30:03 VBox-VM kernel: [ 48.766312] scsi host3: usb-storage 3-1:1.0
Jan 30 18:30:03 VBox-VM kernel: [ 48.766363] usbcore: registered new interface driver usb-storage
Jan 30 18:30:03 VBox-VM kernel: [ 48.769401] usbcore: registered new interface driver uas
(edited to fix a typo)
RicV
Posts: 96
Joined: 25. Aug 2015, 17:58
Primary OS: Ubuntu other
VBox Version: OSE self-compiled
Guest OSses: Linux *.*, Win*
Location: Lake Tahoe, California

Re: Critical error - Guru Meditation

Post by RicV »

Confirmed Windows 10 is also using the standard XHCI driver:
Attachments
VBox_Win10_XHCI-drv.png
VBox_Win10_XHCI-drv.png (66.13 KiB) Viewed 7857 times
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Critical error - Guru Meditation

Post by Perryg »

Sorry I don't do Windows someone that does will need to take over. But I am fairly sure those yellow triangles are not a good thing.
RicV
Posts: 96
Joined: 25. Aug 2015, 17:58
Primary OS: Ubuntu other
VBox Version: OSE self-compiled
Guest OSses: Linux *.*, Win*
Location: Lake Tahoe, California

Re: Critical error - Guru Meditation

Post by RicV »

Indeed, yellow triangles are scary, that is what I am trying to track down. But the Guru Meditation thing looks like a failed assertion in VBox itself, or something like that. Even if that's a side effect rather than a cause, it might yield a clue. I hope someone else has an idea, meanwhile I will keep picking at it. Thanks for trying (those "lag" messages are bothering me, now that you mention it).
Post Reply