VirtualBox

Opened 10 years ago

Closed 7 years ago

#13671 closed defect (obsolete)

Application Error on guest VM requested power-off with Linux Guest Additions 4.3.20

Reported by: Daniel.Glasser Owned by:
Component: guest additions Version: VirtualBox 4.3.20
Keywords: guest power down, application error Cc:
Guest type: Linux Host type: Windows

Description

I recently upgraded my VirtualBox installation from 4.3.12 to 4.3.20 r96997 on a Windows 7 Enterprise. For full configuration details, please see the saved virtual box logs in attached .zip file. On the same day, I installed the 4.3.20 Guest Additions and some Ubuntu updates within the Ubuntu guest VM.

Now, whenever I shut down my guest VM from within the guest OS, I get a dialog titled "VirtualBox.exe - Application Error" with text similar to "The instruction at 0x69866f99 referenced memory at 0x00000000. The memory could not be read. Click on OK to terminate the program". The instruction address and referenced address are not always the same (usually all 0s or all Fs for the referenced address). When I start the guest VM and then select "shutdown" from the system menu on the login screen, without logging in, the VM shuts down cleanly, but if I've logged in and requested the shut-down from the system menu under the Unity desktop, the exception is always present for this VM, and that if I log back out before requesting shut-down, it still has the exception. When the Application Error dialog is displayed, the GUI "Oracle VM Virtual Box Manager" shows "Stopping" for the status of the VM, and once the dialog is dismissed, this becomes "Aborted".

I have found through experimentation that a VM running the same version of Ubuntu Linux that has not had the Guest Additions updated from 4.3.12 to 4.3.20 does not exhibit this problem at all.

In the attached .zip file, there are several files:

  • "ubuntu-14.04-x64-desktop-2014-11-26-12-33-39.log" - the VBox.log file for the last session of the guest before the update of VirtualBox and the Linux Guest Additions from 4.3.12 to 4.3.20. There was no application error dialog on exit.
  • "ubuntu-14.04-x64-desktop-2014-12-04-09-14-21.log" - a VBox.log file for a session of the guest after I had done the upgrade of both VirtualBox and the Linux Guest Additions to 4.3.20. This had been an extended session with several reboots within the guest VM. There was an application error dialog on exit.
  • "ubuntu-14.04-x64-desktop-2014-12-04-11-13-10.log" - a VBox.log file for a session of the updated guest where I didn't log in (described above). There was no application error dialog on exit.
  • "ubuntu-14.04-x64-desktop-2014-12-04-11-14-23.log" - a VBox.log file for a session of the updated guest where I logged in and immediately selected shutdown from the system menu. There was an application error dialog on exit.
  • "ubuntu-14.04-x64-desktop-2014-12-04-12-05-51.log" - a VBox.log file for a session of the updated guest where I logged in, immediately logged out, then selected shutdown from the system menu in the login screen. There was an application error dialog on exit.
  • "Freescale SDK-2014-12-04-10-36-58.log" - a VBox.log file for a different guest VM running under VirtualBox 4.3.20 that has not been upgraded to use Linux Guest Additions 4.3.20 (still using 4.3.12). I logged in and then selected shutdown. There was no application error dialog on exit.
  • "vbox-memexception.png" - a screenshot of one of the Application Error dialogs.

Note that the VM can reboot without exhibiting an error.

Each of the log files that resulted in a memory access exception ends at a line that reads: Console::powerDown(): A Request to power off the VM has been issued (mMachineState=Stopping, InUninit=0)

On the clean exits, there is a considerable amount of information logged following the matching line in the log file.

This problem appears to be only present when the guest VM has requested a power-down. The result is that my VM, after having been shut down, always says "Aborted".

This began as a posting in the forums: https://forums.virtualbox.org/viewtopic.php?f=6&t=64976

Site moderator "mpack" recommended raising a BugTracker ticket, so that's what I've done.

Attachments (1)

Vbox-Shutdown.zip (162.9 KB ) - added by Daniel.Glasser 10 years ago.
Log files, screen shot

Download all attachments as: .zip

Change History (12)

by Daniel.Glasser, 10 years ago

Attachment: Vbox-Shutdown.zip added

Log files, screen shot

comment:1 by Daniel.Glasser, 10 years ago

On a suggestion from site moderator Perryg in the thread at "https://forums.virtualbox.org/viewtopic.php?f=6&t=64976", I disabled 3D acceleration for the guest VM, and the exception goes away. I re-enable 3D acceleration, and it returns.

So a work-around is to disable 3D acceleration for the guest VM at the expense of performance in some applications.

comment:2 by Frank Mehnert, 10 years ago

Thank you for the log files. But I fear we can do nothing unless you can provide an application dump, see here.

in reply to:  2 comment:3 by Daniel.Glasser, 10 years ago

Replying to frank: This doesn't work under Windows 7, which is my host. Will a dump generated using this method work?

comment:4 by Daniel.Glasser, 10 years ago

Never mind, no crash dump is created for the Application Errors in question. I wrote a C program that deferences a NULL pointer, compiled it with MingW, and ran it, and that creates a crash dump. It seems that something in VirtualBox.exe prevents this from happening. When I attempt to dump the process from Windows Task Manager while the AE dialog is displayed, but I get "The operation could not be completed. Access is denied." Not how to get around that.

comment:5 by Daniel.Glasser, 10 years ago

In attempting to get a process dump, I have observed some interesting patterns in the instruction and memory addresses.

Occasionally, the instruction address and the referenced address are the same, and when that happens the address is always 0x00746553 (so far, at least), and the dialog says "written" rather than "read".

This looks very much like either program stack corruption, longjmp through a corrupted jmpbuff, or a function pointer (and likely stuff surrounding it) getting corrupted. The exception is occurring within the Windows process under which the VM is executing. The exception is not in the guest code, since the guest OS has stopped at least 10ms (according to the log). I don't know what happens normally between printing

00:00:46.791940 Console::powerDown(): A request to power off the VM has been issued (mMachineState=Stopping, InUninit=0)

and

00:00:46.793705 Changing the VM state from 'OFF' to 'DESTROYING'.

but that's where to look for trouble. The cause occurs while the guest is active; perhaps something in the fast path between the guest and host data structures used for the OpenGL fast path, or some code related to that, is the cause. Whatever it is that's getting corrupted, it's not used until after the first line from above is logged and before it reaches the point of logging the change from 'OFF' to 'DESTROYING', since that line doesn't appear in the logs when the exception occurs.

It's also worth examining what happens differently when a user logs in. Perhaps the Ubuntu log-in screen doesn't use the 3GL, thus the 3D acceleration features, but the Unity desktop does. Compare the two logs files "ubuntu-14.04-x64-desktop-2014-12-04-11-13-10.log" and "ubuntu-14.04-x64-desktop-2014-12-04-11-14-23.log". The first is from a session where I did not log in and there was no exception during shutdown, the second is from a session where I logged in before shutting down the guest and got the exception. I'm using "Beyond Compare". I believe that I logged in in the latter session between the 00:00:25.87 (line 1366) and 00:00:32:66 (line 1367) time stamps, then initiated shut down from the systems menu around the 00:00:51.25 timestamp (line 1414). In the former, I initiated shut down from the log-in screen between 00:00:27.82 (line 1362) and 00:00:36.78 (line 1363). The two sessions logs converge at lines 1364 and 1414, respectively.

If you have any suggestions as to how I might provide you with better information, please don't hesitate to make them.

Thanks,

Daniel Glasser

comment:6 by Mihai Hanor, 10 years ago

This is a most likely a duplicate of bug #12772. If you'll try Ubuntu 13.xx with the VirtualBox 4.3.12 guest additions, you'll surely encounter the crash when shutting down the VM (either from within the guest, or from the host). This is because 3D acceleration doesn't really work in Ubuntu 14.xx with the old guest additions, just look at the slow fade animation in the Ubuntu menu. The crash occurs while having 3D enabled, having guest additions installed and being logged in the guest OS. The crash will be triggered if you ever took a screenshot of the VM screen (after guest login), either by some key combinations (such as Host+Q and Host+E) or by having the VM selected with the preview enabled, in the VirtualBox Manager.

Last edited 10 years ago by Mihai Hanor (previous) (diff)

comment:7 by h-w, 10 years ago

Ticket #12772 appears to be a problem on machines with AMD/ATI video hardware. It may be a code regression(1). Are you running an AMD/ATI GPU? On my machine the smoking gun is that the last line in VBox.log is:

Console::powerDown(): A request to power off the VM has been issued (mMachineState=Stopping, InUninit=0)

At this point the VM crashes and there are no more messages posted to the log file.

(1) Possibly a missing cleanup call? Has this been investigated?

Last edited 10 years ago by h-w (previous) (diff)

in reply to:  7 comment:8 by Daniel.Glasser, 10 years ago

Replying to h-w:

Ticket #12772 appears to be a problem on machines with AMD/ATI video hardware. It may be a code regression(1). Are you running an AMD/ATI GPU? On my machine the smoking gun is that the last line in VBox.log is:

Console::powerDown(): A request to power off the VM has been issued (mMachineState=Stopping, InUninit=0)

At this point the VM crashes and there are no more messages posted to the log file.

Yes, the workstation has an AMD Radeon HD 7470.

00:00:02.735563 OpenGL Info: This is an ATI card, taking care of fullscreen..
00:00:02.735666 OpenGL Info: ATI Fullscreen qwirk SUCCEEDED!
00:00:02.735678 OpenGL Info: ATI Fullscreen qwirk SUCCEEDED!
00:00:02.736065 OpenGL Info: Render SPU: GL_VENDOR:   ATI Technologies Inc.
00:00:02.736071 OpenGL Info: Render SPU: GL_RENDERER: AMD Radeon HD 7470

I tried it on another PC that has an Nvidia adapter and didn't have this problem. Looks very much as though it's related to interaction with the ATI/AMD driver software and/or device.

I'd be happy to install and test an instrumented version of the host additions and/or VirtualBox.exe, but I'm not sure I can do much more to help solve this at this time. Please let me know if there is.

Last edited 10 years ago by Daniel.Glasser (previous) (diff)

comment:9 by TechScout, 10 years ago

Just in case this might be helpful to others. I experienced the same problem (Host: Windows 7 / 64 bit with Linux guests of any type: Ubuntu, LinuxMint, Fedora, ... with 3D acceleration enabled / doesn't happen with CPU Rendering, ... )

Considered it odd that this occurred on every distro but doesn't seem to happen (ever) on a similarly configured host. I thought I was running the same video drivers but a quick check told me otherwise. http://support.amd.com/en-us

Once I updated the drivers to the current AMD Catalyst Driver (14.12) (same as the other host) the problem was resolved.

Tested On Fedora 21 32 bit / 64 bit Ubuntu 32 bit / 64 bit LinuxMint 32 bit / 64 bit

Everything works properly.

comment:10 by Mihai Hanor, 10 years ago

Attach a log for one of those VMs. I think that you've spoken too soon.

comment:11 by Frank Mehnert, 7 years ago

Resolution: obsolete
Status: newclosed
Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette