VirtualBox

Opened 5 years ago

Closed 5 years ago

#18793 closed defect (fixed)

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 (8)

comment:1 by Socratis, 5 years ago

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 by Codeguard, 5 years ago

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>"

Version 0, edited 5 years ago by Codeguard (next)

comment:3 by paulson, 5 years ago

Owner: set to paulson
Status: newaccepted

comment:4 by gombara, 5 years ago

Guest type: otherOSX Server
Host type: allMac OS X

comment:5 by Socratis, 5 years ago

@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 by paulson, 5 years ago

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 by Codeguard, 5 years ago

Thanks for the fix!

comment:8 by paulson, 5 years ago

Resolution: fixed
Status: acceptedclosed
Summary: Guest Additions doesn't start on macOSGuest 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.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette