VirtualBox

Ticket #18793 (closed defect: fixed)

Opened 4 months ago

Last modified 2 months ago

Guest Additions doesn't start on macOS = fixed in SVN/6.0.12

Reported by: Codeguard Owned by: paulson
Component: guest additions Version: VirtualBox 6.0.10
Keywords: Cc:
Guest type: OSX Server Host type: Mac OS X

Description

Due to an error in VBoxClient.cpp, it will try to use '<NULL>' as default log filename. As far as I understand it, the full path is '/<NULL>', and macOS returns EACCES for that.

See https://www.virtualbox.org/svn/vbox/trunk/src/VBox/Additions/darwin/VBoxClient/VBoxClient.cpp

In main(): static char *szLogFileName = NULL;

In vbclInitLogger(): Calls RTLogCreateEx with "%s", pszLogFileName

I think that the problem was introduced in https://www.virtualbox.org/changeset/69752/vbox

Change History

comment:1 Changed 4 months ago by socratis

I'm sorry, but I can't quite link the title of the ticket with what you're describing, can you explain the problem with the GAs a little bit further?

comment:2 Changed 4 months ago by Codeguard

  1. After installing Guest Additions on macOS, let's say 10.14, they fail to start.
  2. GA fails to start because it tries to open file named '<NULL>' for log file, and macOS returns EACCES, and GA gives up and error-quits.
  3. The reason for opening file named '<NULL>' is bug in GA's code:

In main(): static char *szLogFileName = NULL;

In vbclInitLogger(): Calls RTLogCreateEx with "%s", pszLogFileName

so ("%s", NULL) becomes string "<NULL>"

Last edited 4 months ago by Codeguard (previous) (diff)

comment:3 Changed 4 months ago by paulson

  • Owner set to paulson
  • Status changed from new to accepted

comment:4 Changed 3 months ago by gombara

  • Host type changed from all to Mac OS X
  • Guest type changed from other to OSX Server

comment:5 Changed 3 months ago by socratis

@paulson,
Do you think that this is the source of what I'm seeing in #18658? Maybe you could hash it out between you and 'pentagonik' and close #18658 as a Duplicate or ... Side-effect? ;)

comment:6 Changed 3 months ago by paulson

Thanks for the detailed bug report CodeGuard! You correctly identified a changeset which introduced a similar regression in the Guest Additions:

r69752 | vboxsync | 2017-11-19 14:14:46 +0000 (Sun, 19 Nov 2017) | 1 line
RTLogCreateEx[V] format annotations; fixed unsafe use in VBoxService.

=> https://www.virtualbox.org/changeset/69752/vbox

but it was fixed the following day:

r69779 | vboxsync | 2017-11-20 18:14:01 +0000 (Mon, 20 Nov 2017) | 1 line
VGSvcLogCreate: Fix case where pszLogFile is NULL.

=> https://www.virtualbox.org/changeset/69779/vbox

However the same type of regression was introduced in the MacOS Guest Additions more recently:

r77565 | vboxsync | 2019-03-05 12:51:42 +0000 (Tue, 05 Mar 2019) | 1 line
darwin/VBoxClient: build fix

=> https://www.virtualbox.org/changeset/77565/vbox

and this has now been fixed in trunk but the vboxsync process is a bit behind at the moment so it isn't yet visible at https://www.virtualbox.org/browser/vbox/trunk. However the latest test builds for both 6.0.x (currently at 132749) and the development snapshot (currently at 132760) do contain the fix and are available here:

https://www.virtualbox.org/wiki/Testbuilds

This MacOS Guest Additions-specific regression made it into 6.0.6. The fix has also been backported to the 6.x branch so it will be part of the next official 6.0.x release as well. This issue doesn't apply to the 5.2.x branch.

Note to @socratis, yes this issue does look to be the root cause of #18658. I'll update that ticket as well. Thanks for bringing it to my attention.

comment:7 Changed 3 months ago by Codeguard

Thanks for the fix!

comment:8 Changed 2 months ago by paulson

  • Status changed from accepted to closed
  • Resolution set to fixed
  • Summary changed from Guest Additions doesn't start on macOS to Guest Additions doesn't start on macOS = fixed in SVN/6.0.12

In summary, this issue has been fixed in trunk revision r80061:

https://www.virtualbox.org/changeset/80061/vbox

and the fix was included in VirtualBox 6.0.x revision r132500 which made it into VirtualBox 6.0.12.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use