[vbox-dev] SVN builds Leaving zombie processes on shutdown of guest

Klaus Espenlaub klaus.espenlaub at oracle.com
Tue Jun 4 14:58:52 GMT 2013

Hi Perry,

On 04.06.2013 14:23, Perry Halbert wrote:
> Good day Klaus,
> Strange indeed.  As I said I didn't notice this before but can't promise
> exactly when It started.  I don't usually need to trace why excessive
> idle CPU ticks are present.  I did check the released (4.2.12) and it
> does not produce this behavior.

Not strange any more after finding the cause, as usual. This was a very 
well hidden regression which sneaked in when adding the default VM 
frontend setting in trunk (which included simplifying the frontend 
handling). It resulted in an empty string being stored in the session 
type, which means "we didn't start this client process", suppressing the 
process reaping. Now it's clear why it only happened for GUI VMs and not 
headless ones...

> I do have backups of my builds and can if needed to see where it
> started. (at least to the middle of March)

No need, was easy enough to find.

Will be in the repository soon...


> Question if I may,  what is the purpose of the %U in the startup command
> (VirtualBox %U)
> Perry
> On 06/04/2013 04:06 AM, Klaus Espenlaub wrote:
>> Hi Perry,
>> On 03.06.2013 23:10, Perry Halbert wrote:
>>> More research on this shows that using VBoxHeadless -s <guest> or shift
>>> start from the main manager does not produce the zombies.
>>> Only normal starting from the main manager or shortcut does.
>> Very very strange, I'm not aware of any intentional code changes in this
>> area for approx. a year, and actually I have no idea why VBoxHeadless
>> processes would consistently behave differently. The distinction should
>> be "VM started through the API" (i.e. anything in the GUI, and
>> VBoxManage startvm) or "VM started directly" (i.e.
>> VirtualBox/VBoxHeadless/VBoxSDL --startvm foo). In the latter case
>> VBoxSVC is not the parent and thus isn't responsible for waiting for the
>> process exit result.
>> I can reproduce, so will investigate what's causing this behavior change.
>> Thanks for letting us know...
>> Klaus
>>> On 06/01/2013 11:56 AM, Perry Halbert wrote:
>>>> Strange behavior the last few weeks.
>>>> Stopping ( even saved state ) a guest leaves a zombie process on the
>>>> host.
>>>> Each new start and it uses a new pid and the zombie is still there.
>>>> Stop all guests and the main manager and all processes including the
>>>> zombie processes finally clear.
>>>> Host = Ubuntu 12.04 LTS guest = any.
>>>> perry     9538  6.0  0.0      0     0 ?        Z    11:36   0:34
>>>> [VirtualBox] <defunct>
>>>> perry     9934  4.3  0.0      0     0 ?        Z    11:37   0:22
>>>> [VirtualBox] <defunct>
>>>> Normally I would not have seen this but the processor was doing work
>>>> when it should have been idle. I have never seen a zombie process
>>>> using CPU ticks before.  Wait long enough and the %CPU will finally
>>>> get to zero but it seems to take like 20 to 30 minutes to do so.

More information about the vbox-dev mailing list