Bug 216684 - emulators/virtualbox-ose VBox.sh sets an incomplete PATH causing other applications to intermittently fail.
Summary: emulators/virtualbox-ose VBox.sh sets an incomplete PATH causing other appli...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Virtualbox Team (Nobody)
URL: https://www.freshports.org/emulators/...
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2017-02-01 01:55 UTC by mrT
Modified: 2023-08-18 06:56 UTC (History)
3 users (show)

See Also:
grahamperrin: maintainer-feedback? (vbox)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mrT 2017-02-01 01:55:55 UTC
This issue has to do with VirtualBox-ose the part that runs on the host.

I was experiencing intermittent issues were some executeables were not found
(on the host)
I traced the issue to  /usr/local/lib/virtualbox/VBox.sh

VBox.sh hard-codes: PATH="/usr/bin:/bin:/usr/sbin:/sbin"
and launches: /usr/local/lib/virtualbox/VirtualBox

According to FreeBSD audit trails, VirtualBox launches: 'kdeinit4 Running...'
(/usr/local/bin/kdeinit4) inheriting that PATH.
Since that is the second 'kdeinit4 Running...' (and not exclusive to VirtualBox) running on my system I was experiencing some executables working OK where some would not be found.

It is not clear to me why VirtualBox is launching this second copy of
'kdeinit4 Running...' but I might suggest either getting VirtualBox to use it
for its exclusive purposes or to establish the PATH more consistent with what everything else uses.

The most obvious missing part of that PATH is '/usr/local/sbin:/usr/local/bin'
It would seem best to inherit a PATH rather than hard-code it.
I have done some testing with just committing out that hard-coded PATH
and it seems to work better.

Version info:
virtualbox-ose  5.1.12

Options        :
        ALSA           : off
        DBUS           : on
        DEBUG          : off
        GUESTADDITIONS : on
        MANUAL         : off
        NLS            : on
        PULSEAUDIO     : off
        PYTHON         : on
        QT4            : on
        QT5            : off
        R0LOGGING      : off
        UDPTUNNEL      : on
        VDE            : off
        VNC            : on
        VPX            : off
        WEBSERVICE     : on
        X11            : on
.
This version of VirtualBox-ose was compiled  on:

uname -a
FreeBSD MT2016 10.3-RELEASE-p5 FreeBSD 10.3-RELEASE-p5 #0: Thu Jun 30 03:52:15 UTC 2016     root@amd64-builder.pcbsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

KDE apps:.....4.14.3_1
KDE plasma:...4.11.21

Sincerely,
Mark T.
Comment 1 mrT 2017-02-01 02:03:12 UTC
I have seen on the web that several others have noticed some 'odd' interference between VirtualBox and other applications. I believe this bug report may shed some light on this interference.
Comment 2 Walter Schwarzenfeld freebsd_triage 2018-01-16 11:06:07 UTC
Maintainer feedback?
Comment 3 Graham Perrin freebsd_committer freebsd_triage 2023-08-18 06:56:11 UTC
I'm reminded of attention to PATH in bug 266992 comment 1, the eventual fix there focused on UserManual.pdf …

(In reply to mrT from comment #0, 2017)

Please, is this still an issue with 6.1.46_1 or greater on a currently supported version of FreeBSD?