Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 450020 - app-emulation/virtualbox-guest-additions-4.2.6 segfaults due to missing sys-apps/dbus dependency
Summary: app-emulation/virtualbox-guest-additions-4.2.6 segfaults due to missing sys-a...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-03 16:42 UTC by Alex Barker
Modified: 2013-02-25 18:36 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
.config (.config,54.41 KB, text/plain)
2013-02-12 08:28 UTC, Alex Barker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Barker 2013-01-03 16:42:20 UTC
Calling /usr/sbin/vboxguest-service with the --foreground flag causes the application to segfault.  This happens every time /etc/init.d/virtualbox-guest-additions is started by start-stop-daemon.


Reproducible: Always

Steps to Reproduce:
1. /usr/sbin/vboxguest-service --foreground

Actual Results:  
Console output as follows:

VBoxService 4.2.6_OSE r82870 (verbosity: 0) linux.amd64 (Jan  3 2013 08:34:41) release log
00:00:00.000130 main     Log opened 2013-01-03T16:36:35.517436000Z
00:00:00.000252 main     OS Product: Linux
00:00:00.000274 main     OS Release: 3.6.11-gentoo
00:00:00.000301 main     OS Version: #1 SMP Fri Dec 21 08:40:02 PST 2012
00:00:00.000315 main     OS Service Pack: #1 SMP Fri Dec 21 08:40:02 PST 2012
00:00:00.000338 main     Executable: /usr/sbin/vboxguest-service
00:00:00.000344 main     Process ID: 10420
00:00:00.000350 main     Package type: LINUX_64BITS_GENERIC (OSE)
00:00:00.002785 main     4.2.6_OSE r82870 started. Verbose level = 0
00:00:00.008137 vminfo   rtldrNativeLoad: dlopen('libdbus-1.so.3', RTLD_NOW | RTLD_LOCAL) failed: libdbus-1.so.3: cannot open shared object file: No such file or directory
Segmentation fault


Portage 2.1.11.31 (default/linux/amd64/10.0, gcc-4.6.3, glibc-2.15-r3, 3.6.11-gentoo x86_64)
=================================================================
System uname: Linux-3.6.11-gentoo-x86_64-Intel-R-_Core-TM-_i7_CPU_950_@_3.07GHz-with-gentoo-2.1
Timestamp of tree: Sun, 30 Dec 2012 18:45:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.69
sys-devel/automake:       1.9.6-r3, 1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.3, 4.7.2
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=x86-64 -mtune=generic -Os -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=x86-64 -mtune=generic -Os -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="acl amd64 berkdb bzip2 cli cracklib crypt cxx dri gdbm gpm iconv minimal mmx modules mudflap multilib ncurses nls nptl openmp pam pcre pppd readline session sse sse2 ssl tcpd unicode urandom zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Alex Barker 2013-01-03 16:51:23 UTC
I am guessing sys-apps/dbus should be required by the guest additions.  After installing manually, it appears to be working correctly.
Comment 2 Steven Peckins 2013-01-22 15:27:00 UTC
I recently experienced this issue and came to the same resolution.  Gentoo guest on an OSX host.

localhost ~ # vboxguest-service --foreground --verbose                                                                                                                                                                            
VBoxService 4.2.6_OSE r82870 (verbosity: 1) linux.amd64 (Jan  2 2013 19:29:45) release log
00:00:00.000128 main     Log opened 2013-01-21T22:16:34.265029000Z
00:00:00.000326 main     OS Product: Linux
00:00:00.000359 main     OS Release: 3.5.0-gentoo
00:00:00.000377 main     OS Version: #8 SMP Wed Aug 29 23:06:39 EDT 2012
00:00:00.000394 main     OS Service Pack: #8 SMP Wed Aug 29 23:06:39 EDT 2012
00:00:00.000413 main     Executable: /usr/sbin/vboxguest-service
00:00:00.000422 main     Process ID: 14085
00:00:00.000427 main     Package type: LINUX_64BITS_GENERIC (OSE)
00:00:00.003083 main     4.2.6_OSE r82870 started. Verbose level = 1
00:00:00.007246 main     All services started.
00:00:00.010002 vminfo   rtldrNativeLoad: dlopen('libdbus-1.so.3', RTLD_NOW | RTLD_LOCAL) failed:
libdbus-1.so.3: cannot open shared object file: No such file or directory
Segmentation fault

localhost ~ # emerge -av dbus

localhost ~ # vboxguest-service --foreground --verbose
VBoxService 4.2.6_OSE r82870 (verbosity: 1) linux.amd64 (Jan  2 2013 19:29:45) release log
00:00:00.000193 main     Log opened 2013-01-21T22:24:12.330475000Z
00:00:00.000291 main     OS Product: Linux
00:00:00.000317 main     OS Release: 3.5.0-gentoo
00:00:00.000339 main     OS Version: #8 SMP Wed Aug 29 23:06:39 EDT 2012
00:00:00.000396 main     OS Service Pack: #8 SMP Wed Aug 29 23:06:39 EDT 2012
00:00:00.000420 main     Executable: /usr/sbin/vboxguest-service
00:00:00.000434 main     Process ID: 27027
00:00:00.000443 main     Package type: LINUX_64BITS_GENERIC (OSE)
00:00:00.004360 main     4.2.6_OSE r82870 started. Verbose level = 1
00:00:00.008717 main     All services started.
00:00:00.011885 vminfo   Error: Unable to connect to system D-Bus (1/3): Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
00:00:05.023714 vminfo   Error: Unable to connect to system D-Bus (2/3): Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
00:00:10.027228 vminfo   Error: Unable to connect to system D-Bus (3/3): Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
^C
00:00:33.062191 main     Ended.

localhost ~ # /etc/init.d/dbus start
 * Caching service dependencies ...        [ ok ]
 * Starting D-BUS system messagebus ...    [ ok ]

localhost ~ # vboxguest-service --foreground --verbose
VBoxService 4.2.6_OSE r82870 (verbosity: 1) linux.amd64 (Jan  2 2013 19:29:45) release log
00:00:00.000177 main     Log opened 2013-01-21T22:24:53.864620000Z
00:00:00.000287 main     OS Product: Linux
00:00:00.000316 main     OS Release: 3.5.0-gentoo
00:00:00.000426 main     OS Version: #8 SMP Wed Aug 29 23:06:39 EDT 2012
00:00:00.000469 main     OS Service Pack: #8 SMP Wed Aug 29 23:06:39 EDT 2012
00:00:00.000495 main     Executable: /usr/sbin/vboxguest-service
00:00:00.000508 main     Process ID: 27197
00:00:00.000515 main     Package type: LINUX_64BITS_GENERIC (OSE)
00:00:00.003899 main     4.2.6_OSE r82870 started. Verbose level = 1
00:00:00.008074 main     All services started.
^C
00:00:31.056456 main     Ended.
Comment 3 Fabio Rossi 2013-02-10 15:36:20 UTC
Confirmed also here
Comment 4 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2013-02-10 18:11:11 UTC
+*virtualbox-guest-additions-4.2.6-r1 (10 Feb 2013)
+
+  10 Feb 2013; Lars Wendler <polynomial-c@gentoo.org>
+  +virtualbox-guest-additions-4.2.6-r1.ebuild,
+  +files/virtualbox-guest-additions-8.initd:
+  Depend on sys-apps/dbus (bug #450020). Rewritten init script.
+
Can you please give virtualbox-guest-additions-4.2.6-r1.ebuild a try. I'm especially interested in the new init script functioning correctly.
Comment 5 Alex Barker 2013-02-11 07:58:39 UTC
(In reply to comment #4)
> Can you please give virtualbox-guest-additions-4.2.6-r1.ebuild a try. I'm
> especially interested in the new init script functioning correctly.

I removed dbus and then updated the guest additions and it looks like dbus was pulled in correctly.  I have tested the init script and that appears to be causing some issues on amd64.

Initially it appears to start correctly with the rest of the system, however, after attempting a restart I am presented with the following sequence of errors:

* Stopping virtualbox-guest-additions ...
* start-stop-daemon: fopen `/var/run/vboxguest-service.pid': No such file or directory                                                                     [ ok ]
* Removing kernel modules
* ERROR: virtualbox-guest-additions failed to stop

Running `start-stop-daemon --make-pidfile --pidfile /var/run/vboxguest-service.pid --background /usr/sbin/vboxguest-service -- --foreground` manually produces a PID file that appears to be correct.  When attempting to stop the service manually, it does produce an error "virtualbox-guest-additions failed to stop" but not complaining about a PID file.  My best guess is something is messed up with the auto-magic that is responsible for calling start-stop-daemon in /sbin/runscript.  If there is something I can do to debug that please let me know.

Thanks!
Comment 6 Alex Barker 2013-02-11 08:02:00 UTC
(In reply to comment #5)

Sorry one more thing.  Although it fails to stop cleanly, it appears to stop the process.  Starting the process after issuing a ZAP seems to bring it back online just fine leading me to believe the stop processes is what is messed up.  Let me know if you would like me to test any other ideas.
Comment 7 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2013-02-11 22:19:12 UTC
Dear Alex,

thanks for testing :)
Unfortunately I cannot reproduce the error you're describing. The init script works flawlessly on my Gentoo test VMs.
Out of curiosity: to what shell does your /bin/sh symlink point to?
How fast is your host system and thus your VM you see this error? Maybe it's some kind of race condition I cannot reproduce on my VMs because they are too fast/slow.
Comment 8 Fabio Rossi 2013-02-11 23:26:59 UTC
Tested, it works on my system
Comment 9 Alex Barker 2013-02-12 08:28:21 UTC
Created attachment 338672 [details]
.config
Comment 10 Alex Barker 2013-02-12 08:28:44 UTC
(In reply to comment #7)
> Dear Alex,
> 
> thanks for testing :)
> Unfortunately I cannot reproduce the error you're describing. The init
> script works flawlessly on my Gentoo test VMs.
> Out of curiosity: to what shell does your /bin/sh symlink point to?
> How fast is your host system and thus your VM you see this error? Maybe it's
> some kind of race condition I cannot reproduce on my VMs because they are
> too fast/slow.

This seems to be happening consistently for me.  I have 8 cores allocated to the vm.  2048 MB RAM  Acceleration is enabled.   Intel(R) Core(TM) i7 CPU         950  @ 3.07GHz

I did a little digging and found out its throwing that error due to exit 1 after the modprobe -r so ran the commands and go the following.

crosscompiler ~ # /sbin/modprobe -r vboxsf ; echo $?
modprobe: FATAL: Module vboxsf is in use.
1
crosscompiler ~ # /sbin/modprobe -r vboxguest ; echo $?
modprobe: FATAL: Module vboxguest is in use.
1


So, lsmod:

vboxsf                 26834  1 
ohci_hcd               15355  0 
ehci_hcd               31764  0 
usbcore               124260  2 ohci_hcd,ehci_hcd
vboxguest             135660  1 vboxsf
usb_common              1011  1 usbcore
e1000                  88241  0 

Killing the running process first does not release the module.  I was able to unload all of the modules in this way exact for those two.  Nothing in the logs... this is really strange.

After rmmod -f vboxsf it came out and left a dmesg entry.  
Feb 12 00:22:06 crosscompiler kernel: Disabling lock debugging due to kernel taint

I had to do the same for vboxguest which caused a crash.  I have attached my guest kernel config.  Following is the dump:

BUG: unable to handle kernel paging request at ffffffffa0037590
IP: [<ffffffff810caed8>] do_vfs_ioctl+0x3e8/0x43a
PGD 160d067 PUD 1611063 PMD 7d23c067 PTE 0
Oops: 0000 [#1] SMP 
Modules linked in: ohci_hcd ehci_hcd usbcore usb_common e1000 [last unloaded: vboxguest]
CPU 2 
Pid: 2578, comm: vmstats Tainted: G  R        O 3.6.11-gentoo #4 innotek GmbH VirtualBox/VirtualBox
RIP: 0010:[<ffffffff810caed8>]  [<ffffffff810caed8>] do_vfs_ioctl+0x3e8/0x43a
RSP: 0018:ffff88007a9e7ec8  EFLAGS: 00010286
RAX: ffffffffa0037550 RBX: ffff88007bfed800 RCX: 00007f34f3f7dcf0
RDX: 00000000c0105602 RSI: 00000000c0105602 RDI: 0000000000000003
RBP: 00000000ffffffe7 R08: ffff88007d059ed8 R09: 0000000000000a12
R10: 00007f34f3f7dcd0 R11: 0000000000000246 R12: 00007f34f3f7dcf0
R13: ffff88007a847100 R14: 00007f34f9082000 R15: 0000000000000003
FS:  00007f34f3f7e700(0000) GS:ffff88007fc80000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: ffffffffa0037590 CR3: 000000007ca53000 CR4: 00000000000006a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process vmstats (pid: 2578, threadinfo ffff88007a9e6000, task ffff88007c3cef00)
Stack:
 00007f34f3f7dcd0 0000000000000000 0000000000000001 0000000000000000
 0000000000000a12 ffffffff8105c6d4 00000000ffffffff ffff88007a9e7f10
 ffff88007bfed800 0000000000000003 00000000c0105602 00007f34f3f7dcf0
Call Trace:
 [<ffffffff8105c6d4>] ? sys_futex+0x11b/0x14f
 [<ffffffff810caf75>] ? sys_ioctl+0x4b/0x72
 [<ffffffff8134d022>] ? system_call_fastpath+0x16/0x1b
Code: 85 c9 74 15 4c 89 e2 48 89 df ff d1 ba e7 ff ff ff 3d fd fd ff ff 0f 44 c2 89 c5 eb 2e 48 8b 43 20 bd e7 ff ff ff 48 85 c0 74 20 <48> 8b 40 40 48 85 c0 74 17 4c 89 e2 48 89 df ff d0 89 c5 3d fd 
RIP  [<ffffffff810caed8>] do_vfs_ioctl+0x3e8/0x43a
 RSP <ffff88007a9e7ec8>
CR2: ffffffffa0037590
---[ end trace 6df7a521addb5e78 ]---
Comment 11 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2013-02-12 09:25:32 UTC
Looks like I should make the module unloading stuff optional.

What do you guys think?
Comment 12 Alex Barker 2013-02-12 16:35:05 UTC
(In reply to comment #11)
> Looks like I should make the module unloading stuff optional.
> 
> What do you guys think?

I was thinking a simple warning and terminating properly would be enough.  Even just using the return value form start-stop-daemon and ignoring the modprobe return values would be enough.

if [ $? -nq 0 ] ; then 
  ewarn "Could not remove module vboxsf."
fi
Comment 13 Alex Barker 2013-02-25 18:36:35 UTC
(In reply to comment #11)
> Looks like I should make the module unloading stuff optional.
> 
> What do you guys think?

Quick update, Looks like the modules cannot be removed because there is a vboxfs share mounted.