[Solved] crash after quitting vm

Discussions related to using VirtualBox on Mac OS X hosts.

[Solved] crash after quitting vm

Postby rpmilius » 21. Apr 2018, 18:01

VirtualBox is crashing after I close a VM.

host = Mac OS 10.13.4 (8GB RAM)
MacBook Pro, late 2016, no touchbar

VirtualBox Version 5.2.10 r122088 (Qt5.6.3)
Oracle_VM_VirtualBox_Extension_Pack-5.2.10.vbox-extpack

guest = Windows 10, happens whether the guest is 32-bit or 64-bit.
32-bit, 2GB RAM
64-bit, 4GB RAM
guest OS additions installed

I can run the VM for both 32bit and 64bit.
I can exit the VM and have save the state for both.
No difference if I just shutdown the VM without saving state.

Upon exit, I get a segfault from VirtualBox - not always, but most of the time.
The crash doesn't seem to affect the saved state. I can start it again and it remembers the state of the VM, so it's mostly an annoyance right now.

I'm attaching the crash log.

Hope someone can help..

bob
Attachments
virtualbox_crash.txt
(63.39 KiB) Downloaded 44 times
Last edited by socratis on 22. Apr 2018, 16:55, edited 1 time in total.
Reason: Marked as [Solved].
rpmilius
 
Posts: 7
Joined: 21. Apr 2018, 17:44

Re: crash after quitting vm

Postby socratis » 21. Apr 2018, 18:29

So, let me see if I get the conditions right:
  • Start VirtualBox, quit VirtualBox, no crash.
  • Start VirtualBox, launch a VM, close VM in one or another way, quit VirtualBox, VirtualBox segfaults.
Also,
  • Is this the first VirtualBox version that you've noticed that, or this was happening before?
  • Is this the current OSX version that you've noticed that, or this was happening before?
  • Can you please list the connected peripherals on your Mac? USB devices, ext. HDs, speakers/mics, monitors?
  • Do you use any of those peripherals when you're running your VM? Be it USB devices, or ext. HDs, or speakers/mics, or monitors?
Can you post the output of the following command:
    kextstat | grep -v com.apple
The reason I'm asking for so many information is that you're the first one that I recall in the past 10 years to report a segfault when quitting VirtualBox.

Oh, and finally, any antivirus, system-wide-monitoring, system-wide-altering software installed?


PS. For future reference you should ZIP your logs. It helps save a (virtual) tree or two... ;)
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 25272
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: crash after quitting vm

Postby rpmilius » 21. Apr 2018, 18:54

socratis wrote:So, let me see if I get the conditions right:
  • Start VirtualBox, quit VirtualBox, no crash.

yes
  • Start VirtualBox, launch a VM, close VM in one or another way, quit VirtualBox, VirtualBox segfaults.

  • almost. I don't have a chance to quit VirtualBox. It segfaults after the VM closes.
    Also,
    • Is this the first VirtualBox version that you've noticed that, or this was happening before?
    • Is this the current OSX version that you've noticed that, or this was happening before?

    A year ago I ran VirtualBox on a this MacBook Pro with Ubuntu 16.04 LTS as a guest. No problems then.
    I don't remember the version of the VirtualBox or the version of Mac OS, but both were current at the time.
  • Can you please list the connected peripherals on your Mac? USB devices, ext. HDs, speakers/mics, monitors?
  • Do you use any of those peripherals when you're running your VM? Be it USB devices, or ext. HDs, or speakers/mics, or monitors?

  • nothing else connected. Just the MacBook Pro on my lap.
    Can you post the output of the following command:
      kextstat | grep -v com.apple

    Code: Select all   Expand viewCollapse view
    $ kextstat | grep -v com.apple
    Index Refs Address            Size       Wired      Name (Version) UUID <Linked Against>
      190    3 0xffffff7f85cf5000 0x64000    0x64000    org.virtualbox.kext.VBoxDrv (5.2.10) B172CB4D-2DAC-34A3-B1ED-8927A492021C <7 5 4 3 1>
      191    0 0xffffff7f85d59000 0x8000     0x8000     org.virtualbox.kext.VBoxUSB (5.2.10) 18BFD538-2E5A-328C-B8BF-DF95DFDDFC6F <190 153 50 7 5 4 3 1>
      192    0 0xffffff7f85d61000 0x5000     0x5000     org.virtualbox.kext.VBoxNetFlt (5.2.10) 97411DA8-28E3-3954-85D4-10B616336375 <190 7 5 4 3 1>
      193    0 0xffffff7f85e15000 0x6000     0x6000     org.virtualbox.kext.VBoxNetAdp (5.2.10) 4A140B73-8C07-3948-8928-D8700E8C7F8B <190 5 4 1>

    The reason I'm asking for so many information is that you're the first one that I recall in the past 10 years to report a segfault when quitting VirtualBox.

    Great... I'm a first! :)
    Oh, and finally, any antivirus, system-wide-monitoring, system-wide-altering software installed?

    no antivirus running
    I have Dropbox, Evernote, Adobe Creative Cloud, coconutBattery, and Zulip in my toolbar.
    PS. For future reference you should ZIP your logs. It helps save a (virtual) tree or two... ;)

    will do!

    Thanks!
    bob
    rpmilius
     
    Posts: 7
    Joined: 21. Apr 2018, 17:44

    Re: crash after quitting vm

    Postby socratis » 21. Apr 2018, 19:15

    Damn! Nothing? :?

    OK, here's what I'd like you to do. Open a Terminal and enter the command:
      VBoxBugReport "<VMname>"
    where "<VMname>" is the actual name of the VM that just crashed VirtualBox. This will generate a "YYYY-MM-DD-hh-mm-ss-bugreport.tgz" file in the current directory (most probably your home directory. Attach that file in your response. See the "Upload attachment" tab below the reply form.
    If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
    Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
    socratis
    Site Moderator
     
    Posts: 25272
    Joined: 22. Oct 2010, 11:03
    Location: Greece
    Primary OS: Mac OS X other
    VBox Version: PUEL
    Guest OSses: Win(*>98), Linux*, OSX>10.5

    Re: crash after quitting vm

    Postby rpmilius » 21. Apr 2018, 19:33

    attached

    thanks,
    bob
    Attachments
    2018-04-21-17-31-47-bugreport.tgz
    (127.21 KiB) Downloaded 15 times
    rpmilius
     
    Posts: 7
    Joined: 21. Apr 2018, 17:44

    Re: crash after quitting vm

    Postby rpmilius » 21. Apr 2018, 19:45

    fyi, the last four times I tried reproducing this, it behaved normally three of them (no segfault).
    The bugreport I attached was captured after a segfault occurred.

    Annoying that it isn't more reproducible than this. I was happening pretty much every time before.

    bob
    rpmilius
     
    Posts: 7
    Joined: 21. Apr 2018, 17:44

    Re: crash after quitting vm

    Postby socratis » 21. Apr 2018, 23:10

    I'm starting to believe I know why; memory over-commitment:
    00:00:01.856698 Host RAM: 8192MB (8.0GB) total, 3308MB (3.2GB) available
    00:00:02.086555 RamSize <integer> = 0x0000000100000000 (4 294 967 296, 4 096 MB, 4.0 GB)
    00:00:02.087100 VRamSize <integer> = 0x000000000A000000 (134 217 728, 128 MB)

    You are assigning memory to your guest, that you do not have available. Either close some applications on the host, buy more RAM for the host, or reduce the amount of RAM assigned to the guest. Remember that simple rule:
    • Total CPUs for your guests + 1 Host CPUs.
    • Total RAM+vRAM+overhead for your guests Host available RAM + some.
    Can I suggest a couple of applications, so that you know what's available on your system at any given time? What I do, is to have several monitor tools running at all times. Your preference may vary, but you can use either of them (I use all of them concurrently):
    BTW, when submitting a log, you should always follow a "start the VM from cold-boot" (not from a paused or saved state) / "observe error" / "shutdown the VM" (not paused, not saved state, full shutdown). That gives us a complete picture.

    The high memory requirements from the guest can actually explain why sometimes it crashes, sometimes it doesn't. It depends on what else you're running on your host. If you don't have Safari, Chrome and Firefox running, with a combined total of 391 tabs open, you have enough memory to accommodate the guest. So, check out those tools that I told you before. They're all worth it.

    The funny thing in your case is the segfault. I don't remember seeing that before...
    If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
    Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
    socratis
    Site Moderator
     
    Posts: 25272
    Joined: 22. Oct 2010, 11:03
    Location: Greece
    Primary OS: Mac OS X other
    VBox Version: PUEL
    Guest OSses: Win(*>98), Linux*, OSX>10.5

    Re: crash after quitting vm

    Postby rpmilius » 22. Apr 2018, 16:19

    That makes sense.
    The only other thing I was thinking is that is it had something to do with the Windows in the VM was still in the process of updating right after the install. When I started looking at the Task Manager in them, I noticed that the CPU utilization in the VM was 95-100%, and then saw that updates were still occurring. I was shutting down the VM during this process without really knowing it. But that could be all a coincidence and just a red herring.

    I'll keep a better watch on memory usage. It's behaving the last few times I've been testing it. Thanks for the links to the tools.
    And thanks for the deep dive into this. Much appreciated.

    Bob
    rpmilius
     
    Posts: 7
    Joined: 21. Apr 2018, 17:44

    Re: crash after quitting vm

    Postby socratis » 22. Apr 2018, 16:55

    rpmilius wrote:But that could be all a coincidence and just a red herring.
    As red, as red herrings come... :D

    rpmilius wrote:It's behaving the last few times I've been testing it.
    Great! Keep an eye on them for a week or so and come back and let us know how it went. For the moment I'm going to mark the topic as [Solved]. I hope it stays like that... ;)

    Because I can tell you, I haven't seen a cleaner OSX/VirtualBox/VM installation, and it was a little baffling why it was getting a "segfault at VM exit". Usually the VM would crash in the middle of executing, not when it was actually freeing memory. I'll have a chat in the developer channel to see if they have any ideas...
    If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
    Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
    socratis
    Site Moderator
     
    Posts: 25272
    Joined: 22. Oct 2010, 11:03
    Location: Greece
    Primary OS: Mac OS X other
    VBox Version: PUEL
    Guest OSses: Win(*>98), Linux*, OSX>10.5

    Re: [Solved] crash after quitting vm

    Postby klowenst » 8. Feb 2019, 15:24

    I am experiencing the same issue. I am running VirtualBox 6.0.4 on Mac Mojave. I can open and close VB with no issues but if I start a VM and power it off at any time VB crashes with a segmentation fault
    klowenst
     
    Posts: 1
    Joined: 8. Feb 2019, 15:06

    Re: [Solved] crash after quitting vm

    Postby socratis » 8. Feb 2019, 17:51

    klowenst wrote:I am experiencing the same issue.
    But you didn't follow the same diagnostic procedures. Tsk, tsk, tsk... ;)
    Where's your VBoxBugreport?
    If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
    Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
    socratis
    Site Moderator
     
    Posts: 25272
    Joined: 22. Oct 2010, 11:03
    Location: Greece
    Primary OS: Mac OS X other
    VBox Version: PUEL
    Guest OSses: Win(*>98), Linux*, OSX>10.5

    Re: [Solved] crash after quitting vm

    Postby frigo » 10. Feb 2019, 16:21

    Hello!

    I have the same problem. Every time a guest window is closing (may it be clicking the close button, or halting the guest OS) Virtualbox crashes. It is not virtual machine specific, I have multiple and it happens with each of them(I chose one randomly for the bug report). I experienced the same behaviour with Virtualbox 6 that is why I downgraded to 5.2.x, but same thing.

    Actually the same problem was already reported 8 months ago https://www.virtualbox.org/ticket/17842 (sorry site won't let me post URLs) but no activity over there.
    Attachments
    2019-02-10-14-10-34-bugreport.tgz
    (104.72 KiB) Downloaded 11 times
    virtualbox_crashlog.txt
    (62.96 KiB) Downloaded 13 times
    Last edited by socratis on 10. Feb 2019, 19:46, edited 1 time in total.
    Reason: Fixed obfuscated URLs.
    frigo
     
    Posts: 3
    Joined: 10. Feb 2019, 16:06

    Re: [Solved] crash after quitting vm

    Postby socratis » 10. Feb 2019, 21:42

    @frigo
    I can't see anything wrong with your setup. A question here and there, but I don't think it's earth shuttering. I'm going to ask in any event otherwise it's going to bug me... why do you have 4 HostOnly networks?

    frigo wrote:may it be clicking the close button, or halting the guest OS
    What if you shutdown the guest from within the guest, you know, normally?

    frigo wrote:with Virtualbox 6 that is why I downgraded to 5.2.x, but same thing
    So, you're crashing regardless of the VirtualBox version? Interesting...

    Anything connected to your MacBookPro11,3 hardware-wise? External monitors/keyboards/mice/docks/other?
    If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
    Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
    socratis
    Site Moderator
     
    Posts: 25272
    Joined: 22. Oct 2010, 11:03
    Location: Greece
    Primary OS: Mac OS X other
    VBox Version: PUEL
    Guest OSses: Win(*>98), Linux*, OSX>10.5

    Re: [Solved] crash after quitting vm

    Postby frigo » 10. Feb 2019, 23:28

    Hi @socratis!

    I have four host-only networks because I am simulating some real world application where two redundant connections are used for sensitive data transfer, a third one for handling a distributed database for "normal" data. The fourth one is used to control the distributed testing system I am using to run tests on the virtual machines. Hope this soothes the itch :D.

    What if you shutdown the guest from within the guest, you know, normally?

    That is what I meant by halting it. To clarify: I am running a Debian 9.6 installation and I run
    Code: Select all   Expand viewCollapse view
    shutdown -h now

    The system shuts down and when the window of the guest disappears the main window does too and the crashlog window arrives after some time.

    Usually I have an external monitor connected, but I don't think it is a factor since the crash also happens if I only use the display of the MacBook with no monitor attached. Sometimes there is also a Thunderbolt Ethernet adapter connected, but the same rule applies.

    I am pretty sure it is something since 5.2.x because I have been using earlier versions of Virtualbox for years and I never had this problem.
    frigo
     
    Posts: 3
    Joined: 10. Feb 2019, 16:06

    Re: [Solved] crash after quitting vm

    Postby socratis » 10. Feb 2019, 23:42

    frigo wrote:I am pretty sure it is something

    The question is "what" is that something that's causing this? It's very sporadic as you can see, and I'm trying to figure out what's the common denominator in all of this. Because there are a couple of reports only and it's difficult to find 1) what's different in your setup, 2) what's common in the setup of the reporters.
    If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
    Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
    socratis
    Site Moderator
     
    Posts: 25272
    Joined: 22. Oct 2010, 11:03
    Location: Greece
    Primary OS: Mac OS X other
    VBox Version: PUEL
    Guest OSses: Win(*>98), Linux*, OSX>10.5

    Next

    Return to VirtualBox on Mac OS X Hosts

    Who is online

    Users browsing this forum: No registered users and 14 guests