Bug 173925 - emulators/virtualbox-ose-additions 4.1.22 VBoxService shutdown without core dump
Summary: emulators/virtualbox-ose-additions 4.1.22 VBoxService shutdown without core dump
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-26 04:40 UTC by FreeBSD Proponent
Modified: 2015-09-16 23:43 UTC (History)
1 user (show)

See Also:


Attachments
VBoxService.gdb.bt (28.94 KB, text/plain; charset=us-ascii)
2012-12-23 09:10 UTC, FreeBSD Proponent
no flags Details
VBoxService.gdb.bt.bz2 (2.02 KB, application/octet-stream)
2012-12-25 07:40 UTC, FreeBSD Proponent
no flags Details
VBoxService.symbols.bz2 (19.21 KB, application/octet-stream)
2012-12-25 07:40 UTC, FreeBSD Proponent
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description FreeBSD Proponent 2012-11-26 04:40:00 UTC

/usr/local/etc/rc.d/vboxservice script has no proper stop/shutdown process which causes core dumps each time the virtual guest is shut down

Fix: 

#!/bin/sh

# $FreeBSD: ports/emulators/virtualbox-ose-additions/files/vboxservice.in,v 1.3 2012/01/14 08:55:41 dougb Exp $

# PROVIDE: vboxservice
# REQUIRE: DAEMON vboxguest
# BEFORE: LOGIN
# KEYWORD: shutdown

# Define vboxservice_enable in /etc/rc.conf[.local] to enable it.
#
# vboxservice_enable (bool):  Set to "NO" by default.
#                             Set it to "YES" to enable VBoxService.

. /etc/rc.subr

name="vboxservice"
rcvar=vboxservice_enable
command="/usr/local/sbin/VBoxService"
start_cmd="vboxservice_start"
stop_cmd="vboxservice_stop"

load_rc_config $name

vboxservice_start() {
  PID=`/bin/ps -ax|/usr/bin/grep VBoxService|/usr/bin/grep -v grep|/usr/bin/awk '{print $1}'`
  if [ "X$PID" != "X" ]; then
    echo "*** VBoxService already started"
    exit 2
  else
    $command ${vboxservice_flags}
    if [ $? -eq 0 ]; then echo "--- VBoxService started";fi
  fi
}

vboxservice_stop() {
  PID=`/bin/ps -ax|/usr/bin/grep VBoxService|/usr/bin/grep -v grep|/usr/bin/awk '{print $1}'`
  if [ "X$PID" = "X" ]; then
    echo "*** VBoxService not started"
    exit 2
  else
    kill -2 $PID
    if [ $? -eq 0 ]; then echo "--- VBoxService stopped"; fi
  fi
}
run_rc_command "$1"
Comment 1 Tilman Keskinoz freebsd_committer freebsd_triage 2012-11-30 16:36:19 UTC
Responsible Changed
From-To: freebsd-ports-bugs->vbox

over to maintainer
Comment 2 FreeBSD Proponent 2012-12-11 08:02:35 UTC
One mistake: the "kill -2" should really be "kill -9". "kill -2" did
occasionally work, but still sometimes lead to a core dump. After having
tried other SIGNALS, "kill -9" has been consistently good in NOT
producing any core dumps.
Comment 3 Bernhard Froehlich freebsd_committer freebsd_triage 2012-12-20 14:29:54 UTC
This looks like a bug in VBoxService itself. It probably somehow crashes at
shutdown and does not terminate properly. Please send a backtrace of the
coredump so that we can fix the actual problem.

-- 
Bernhard Froehlich
http://www.bluelife.at/
Comment 4 FreeBSD Proponent 2012-12-23 09:10:20 UTC
Sample core dump backtrace attached.


On 11/25/12 22:40, FreeBSD-gnats-submit@FreeBSD.org wrote:
> Thank you very much for your problem report.
> It has the internal identification `ports/173925'.
> The individual assigned to look at your
> report is: freebsd-ports-bugs. 
> 
> You can access the state of your problem report at any time
> via this link:
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=173925
> 
>> Category:       ports
>> Responsible:    freebsd-ports-bugs
>> Synopsis:       ports/virtualbox-ose-additions-4.1.22 VBoxService shutdown without core dump
>> Arrival-Date:   Mon Nov 26 04:40:00 UTC 2012
> 
> 

Comment 5 FreeBSD Proponent 2012-12-25 07:40:51 UTC
Recompiled VBox-ose-additions for FBSD-8.3 guest with "--build-debug"
where VBoxService core dumps on reboot. Recompiled VBox-ose and
VBox-ose-kmod with "--build-debug" for FBSD-8.3 host running VBox.
Started Guest and rebooted without killing VboxService: core dump.
However, the gdb backtrace still shows no symbols. Attached is the
latest core dump backtrace and VboxService symbols (from "nm -s").



On 11/25/12 22:40, FreeBSD-gnats-submit@FreeBSD.org wrote:
> Thank you very much for your problem report.
> It has the internal identification `ports/173925'.
> The individual assigned to look at your
> report is: freebsd-ports-bugs. 
> 
> You can access the state of your problem report at any time
> via this link:
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=173925
> 
>> Category:       ports
>> Responsible:    freebsd-ports-bugs
>> Synopsis:       ports/virtualbox-ose-additions-4.1.22 VBoxService shutdown without core dump
>> Arrival-Date:   Mon Nov 26 04:40:00 UTC 2012
> 
> 

Comment 6 Carlo Strub freebsd_committer freebsd_triage 2014-08-29 22:27:12 UTC
back to pool