Opened 9 years ago
Last modified 9 years ago
#14109 new defect
VBoxSVC lingering after VBoxWebSrv
Reported by: | Max D | Owned by: | |
---|---|---|---|
Component: | other | Version: | VirtualBox 4.3.26 |
Keywords: | vboxsvc vboxwebsrv linger | Cc: | |
Guest type: | all | Host type: | Windows |
Description
Context
Windows 8.1 64 bits
VirtualBox 4.3.26
Scenario
Without any VirtualBox process already running, start VBoxWebSrv in a prompt in verbose mode, wait for it to start, wait another 2 sec, then press Ctrl+C to quit.
In the Task Manager or via cygwin ps -W, check how long VBoxSVC will remain running before auto shutdown.
Issue
VBoxSVC remains running for about 6 min then auto exit
Expected behaviour
VBoxSVC remains running 5-10 sec then auto exit, like when VirtualBox.exe or VBoxManage are run.
Detection command in cygwin
while true; do sleep 1; isStarted=1; isFinished=0; while [ $isStarted -ne 0 ]; do sleep 0.5; ps -W | grep -qi vboxsvc; isStarted=$?; done; echo "VBoxSVC started"; startTime=$(date "+%s"); while [ $isFinished -eq 0 ]; do sleep 0.5; ps -W | grep -iq vboxsvc; isFinished=$?; done; echo "VBoxSVC finished"; endTime=$(date "+%s"); runTime=$(($endTime-$startTime)); echo "VBoxSVC ran for $runTime seconds"; done;
VBoxSVC average runtime as per the command above
367 sec
Extra info
Behaviour is also visible on Win 7.
Logs & memory dump of lingering VBoxSVC can be found at https://kamax.io/vbox/vboxsvc-lingering_with_vboxwebsrv.zip
Attachments (2)
Change History (5)
by , 9 years ago
Attachment: | VBoxSVC.log added |
---|
by , 9 years ago
Attachment: | vboxwebsrv.log added |
---|
comment:2 by , 9 years ago
This is the infamous 6 minute COM client death detection time. What's causing this is the lack of Ctrl+C handling in vboxwebsrv. It doesn't clean up, and I suspect something even crashes (at least that's what happens for me with 4.3.28, having a post mortem debugger installed) during process termination.
Graceful process termination doesn't cause the crash, but it also triggers the 6 minutes.
It's 99.9% annoying. The only problem know of is when one wants to uninstall VirtualBox, because the process can cause errors (e.g. when one wants to upgrade).
Fixable, but not high priority, as there's no big problem.
comment:3 by , 9 years ago
Latest state of the 5.0 repo contains an attempt at addressing this. Completely untested, and not the final state as it slows down webservice termination by quite a bit.
Redirected Stdout & Stderr of VBoxWebSrv