[Solved] Segfault on launch VirtualBox GUI

Discussions related to using VirtualBox on Mac OS X hosts.
chistomax
Posts: 4
Joined: 13. Apr 2018, 16:15

[Solved] Segfault on launch VirtualBox GUI

Post by chistomax »

Hello!
VirtualBox 5.2.8 (121009), MacOS 10.13.4 (17E199) High Sierra

After last MacOS update (I guess) can't launch any GUI — main window and VMs.
Application crashes immediately after click on app's icon. Logs zip-file attached.

When I try to run app from Terminal, I got this error:

Code: Select all

:/Applications/VirtualBox.app/Contents/MacOS$ ./VirtualBox ./VirtualBox
Unable to open Fosl library at path /usr/lib/libFosl_dynamic.dylib
Segmentation fault: 11

:/Applications/VirtualBox.app/Contents/MacOS$ ./VBoxManage list vms
"IE9 - Win7" {0b369473-a542-4d5e-b86f-926324553873}

:/Applications/VirtualBox.app/Contents/MacOS$ ./VBoxManage startvm "IE9 - Win7" 
Waiting for VM "IE9 - Win7" to power on...
VBoxManage: error: The virtual machine 'IE9 - Win7' has terminated unexpectedly during startup because of signal 11
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine
libFosl_dynamic.dylib file present and seems to be well

Code: Select all

:/usr/lib$ ls -l | grep Fosl
-rwxr-xr-x   1 root  wheel   4280208 28 mar 07:02 libFosl_dynamic.dylib
I've tried to reinstall VB, install previous versions (5.2.6 and 5.1.34) — no luck.

Can someone help me where to look? Is this VB's bug, or Apple's bug, or my personal system?

Thanks in advance!
Attachments
VirtualBox 5.2..8. crash on MacOS 10.13.4.log.zip
(17.01 KiB) Downloaded 38 times
Last edited by chistomax on 14. Apr 2018, 02:51, edited 1 time in total.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Segfault on launch VirtualBox GUI

Post by socratis »

chistomax wrote:libFosl_dynamic.dylib file present and seems to be well
Good for the library, but the problem is that VirtualBox doesn't need that library. So, I don't know why it would want to be loaded in your case. From a limited search that I did, it seems that it's a Ruby related library, I just have no clue why it would need to be loaded at the same time as VirtualBox. Do you have any Xcode, homebrew, macports or other development systems? Active system debuggers? Anything else that you can think of?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
chistomax
Posts: 4
Joined: 13. Apr 2018, 16:15

Re: Segfault on launch VirtualBox GUI

Post by chistomax »

Thanks for the reply!
socratis wrote:Do you have any Xcode, homebrew, macports or other development systems? Active system debuggers? Anything else that you can think of?
Yes, I have Xcode and Homebrew, all latest versions.
Before the last MacOS and Xcode update VirtualBox worked well.

I've uninstalled homebrew's ruby (/usr/local/bin/ruby), so now system's ruby should be used (/usr/bin/ruby) — that didn't help.

Here are installed brew packages:

Code: Select all

sudo brew list | xargs
apr apr-util aspell autoconf boost brotli c-ares curl dnsmasq doxygen fontconfig freetds freetype gd geoip gettext glib gmp ht*pd ht*pd24 icu4c imagemagick jansson jemalloc jpeg libev libevent libffi libidn2 libpng libpq libssh2 libtiff libtool libunistring libxml2 libyaml libzip mcrypt mhash midnight-commander mysql mysqltuner ngh*tp2 nmap openssl openssl@1.1 pcre php56 php56-geoip php56-imagick php56-mysqlnd_ms php56-oauth php@5.6 pkg-config readline s-lang spdylay t1utils unixodbc watch webp wget xz zlib
I guess some other utility causes segfault for VirtualBox, the question is which one?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Segfault on launch VirtualBox GUI

Post by socratis »

chistomax wrote:I guess some other utility causes segfault for VirtualBox, the question is which one?
I have no clue. As I said it's very suspect that VirtualBox would be trying to load a 3rd party library at startup, doesn't make sense.

What happens if you simply run the app as intended? From the icon? GUI?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
chistomax
Posts: 4
Joined: 13. Apr 2018, 16:15

Re: Segfault on launch VirtualBox GUI

Post by chistomax »

socratis wrote:What happens if you simply run the app as intended? From the icon? GUI?
Nothing. Just crash, see this gif h_ttps://cl.ly/2R091y000K2W

I've uninstalled Xcode and Homebrew — no luck :(
Will try to reinstall latest macos 10.13.4 combo update.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Segfault on launch VirtualBox GUI

Post by socratis »

I'm not sure a combo update will do it, but sure, why not? I'm afraid that you may have to put the knife a little deeper at the end. Something is screwed up with your paths and the linking of your system (and not) libraries.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
chistomax
Posts: 4
Joined: 13. Apr 2018, 16:15

Re: Segfault on launch VirtualBox GUI

Post by chistomax »

socratis wrote:I'm not sure a combo update will do it, but sure, why not?
Yes, combo update didn't make it, but reinstalling from recovery mode the whole OS over existing one did.
Thanks for your help!
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: [Solved] Segfault on launch VirtualBox GUI

Post by socratis »

Glad you got it going. And thank you for marking the topic as [Solved]... ;)
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
cir7777777
Posts: 4
Joined: 25. Apr 2018, 14:56

Re: [Solved] Segfault on launch VirtualBox GUI

Post by cir7777777 »

I have the same issue. I attempted to debug it by renaming lib file, so the process that looks for that lib will give me some error message(therfore it can be identified):

Code: Select all

VirtualBox: Error -610 in supR3HardenedMainInitRuntime!
VirtualBox: dlopen("/Applications/VirtualBox.app/Contents/MacOS/VBoxRT.dylib",) failed: dlopen(/Applications/VirtualBox.app/Contents/MacOS/VBoxRT.dylib, 10): Library not loaded: /usr/lib/libFosl_dynamic.dylib
  Referenced from: /System/Library/Frameworks/CoreImage.framework/Versions/A/CoreImage
  Reason: image not found

VirtualBox: Tip! It may help to reinstall VirtualBox.
Turns out that libFosl_dynamic.dylib is indirectly used by virtualbox. Any idea how it can be fixed? I would appretiate any help :)
Additionally I also use valgrind - that works like a charm and if i'm not mistaken uses virtualbox underneath. That makes me even more confused..
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: [Solved] Segfault on launch VirtualBox GUI

Post by socratis »

cir7777777 wrote:Turns out that libFosl_dynamic.dylib is indirectly used by virtualbox.
No it is not. I do not have that library at all in my system and I've never had a message like that. Neither did the thousands and thousands of VirtualBox users on OSX, except you and the OP (chistomax). And that BTW, leaves just you, since when the OP did a clean re-install of OSX, that lib is not needed anymore.

Can you identify any programs like Homebrew/Macports, Ruby, or any other development library? Because what I believe happens, is that one of the key system libraries (/System/Library/Frameworks/CoreImage.framework/Versions/A/CoreImage), is "replaced" by a version of the same library that has dependencies on "/usr/lib/libFosl_dynamic.dylib".

Please list all 3rd party software (and I don't mean things like TextWrangler or Firefox) that you have installed. Actually, it's even better if you post the output of the following commands:
  • ls -al /Applications
    ls -al /usr/local/lib
    echo $PATH
    kextstat | grep -v com.apple
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
cir7777777
Posts: 4
Joined: 25. Apr 2018, 14:56

Re: [Solved] Segfault on launch VirtualBox GUI

Post by cir7777777 »

Thanks for a fast and detaild answer :)
Because what I believe happens, is that one of the key system libraries (/System/Library/Frameworks/CoreImage.framework/Versions/A/CoreImage), is "replaced" by a version of the same library that has dependencies on "/usr/lib/libFosl_dynamic.dylib".
Good analysis, it is fair assumption that CoreImage library was replaced by 3rd party application with the version that uses libFosl_dynamic.dylib. Unfortunetly I have no good clue what could have done that. I have executed the comands you proposed and placed the results in a file below(I don't want to make a super long post). It would be very nice if you could take a look :)
Attachments
issueWithVboxcir7777777.zip
list of 3rd party software used
(7 KiB) Downloaded 41 times
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: [Solved] Segfault on launch VirtualBox GUI

Post by socratis »

WOW!!! That's a heavily modified OSX installation! I'm talking... really, really, really modified.

And I'm not talking about the fact that you have VirtualBox, Parallels, DOSBox, Vagrant installed in parallel. I'm talking about MacPorts, Homebrew, WINE, 3 versions of Python, Ruby; those system-wide modifying ones.

For example, while the only kexts that you have loaded are the VirtualBox ones (that's quite unexpected with so much additional low level software), your PATH looks really messed up and maybe that's where the problem comes from (the indented ones are the default for OSX 10.13):
echo $PATH
/opt/local/bin:
/opt/local/sbin:
/anaconda3/bin:
/Users/secretUserName/.rvm/gems/ruby-2.3.1/bin:
/Users/secretUserName/.rvm/gems/ruby-2.3.1@global/bin:
/Users/secretUserName/.rvm/rubies/ruby-2.3.1/bin:
    /usr/local/bin:
    /usr/bin:
    /bin:
    /usr/sbin:
    /sbin:
/Library/TeX/texbin:
/opt/X11/bin:
/Users/secretUserName/.rvm/bin
I don't honestly understand why a browser (Anaconda) needs to be in the system path!?! But, something is really messed up in your system. I don't know who's the culprit, most probably Ruby, because that's the only place I find any reference about "libFosl_dynamic.dylib".

You need to seriously clean up the system... VirtualBox is a program that uses system libraries only. If you don't even have that, don't expect VirtualBox to run...


PS. "secretUserName"? Seriously?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
cir7777777
Posts: 4
Joined: 25. Apr 2018, 14:56

Re: [Solved] Segfault on launch VirtualBox GUI

Post by cir7777777 »

Thank you very much for taking a look on my mess :oops: Yes, I know my system is quite a bit modified - but I need most of that.

I have removed MacPorts. Went back to using system ruby(uninstalled other rubies using rvm), I also made sure that the system ruby is used. I executed some cleanups with brew, reinstalled virtualbox and unfortunetly error is stil there.

Do you think it make sense to try replacing CoreImage with a stock verison of the framework? or will it brake my os?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: [Solved] Segfault on launch VirtualBox GUI

Post by socratis »

I don't know who's the culprit there. But, if a program compromises the system, and replaces one of the key libraries? Something is not right about that program. Problem is that neither of us knows which program that is!

I would suggest not simply a replacement of the CoreImage library, but a complete re-install from the recovery partition! You never know what else is compromised in your system. I mean, I wouldn't even want to think what has happened to the ACLs in your system. If a program is ruthless enough to mess with the "/System" contents (which carry a big-red flag), I don't know what else it could have done to the system...

All I know is that this is NOT an OSX installation anymore...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
cir7777777
Posts: 4
Joined: 25. Apr 2018, 14:56

Re: [Solved] Segfault on launch VirtualBox GUI

Post by cir7777777 »

Now you scared me quite seriously :cry: Do you think there is any other option than re-install?
I'm currently away(till june) from my backup disk(time capsule) and I'm afraid of loosing my files..

Thank you very much for all the help! :)
Post Reply