Crash when scanning folders on Mac OS (Mojave) and Nexis Storage

Get help for specific problems
alienlarevanche
Posts: 5
Joined: 28 Jul 2020

Post by alienlarevanche

Hello,

Am using your amazing software to backup my folders on a Nexis storage, It worked well until I upgraded the Mac Os system to Mojave, then the app crashes few seconds after it starts the folders scan.

Am using the last version of the app. I've made many tests , the copy work well between folders of hard drives connected to the computer but when I try with the Nexis storage it crashes.

Here is a trace of the activity of the thread before and after the crash. I've noticed many error messages ... but I couldn't figure out the origin of this bug ?

Hope you can help me to solve this issue. Let me know if your need more information.

Kind regards.
You do not have the required permissions to view the files attached to this post.
Last edited by alienlarevanche on 28 Jul 2020, 18:51, edited 1 time in total.
User avatar
Zenju
Site Admin
Posts: 5528
Joined: 9 Dec 2007

Post by Zenju

Do you also have a call stack for the crash?
alienlarevanche
Posts: 5
Joined: 28 Jul 2020

Post by alienlarevanche

No sorry , how can i get it ?

I added the error report if it's useful ?
User avatar
Zenju
Site Admin
Posts: 5528
Joined: 9 Dec 2007

Post by Zenju

You may have to enable the macOS crash reporting first:
https://freefilesync.org/faq.php#crash
User avatar
Zenju
Site Admin
Posts: 5528
Joined: 9 Dec 2007

Post by Zenju

FFS is crashing while trying to write to the sync.ffs_lock file. Most likely a driver bug, but maybe we can work around. Does the following version still crash?
https://www.mediafire.com/file/pe57jcbo8tze1gr/FreeFileSync_11.1_beta_macOS.zip
alienlarevanche
Posts: 5
Joined: 28 Jul 2020

Post by alienlarevanche

Thank you for this reply, I've tried with the version you sent me , it still crashes.

There are two cases :
1st it takes some time trying to access the storage like 15s then start to scan before it crashes few secondes later
when I try again, it starts immediately to scan before it crashes.
You do not have the required permissions to view the files attached to this post.
User avatar
Zenju
Site Admin
Posts: 5528
Joined: 9 Dec 2007

Post by Zenju

I suspect the crash has something to do with entitlements:
Exception Type:        EXC_CRASH (Code Signature Invalid)
Exception Codes:       0x0000000000000001, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    Namespace CODESIGNING, Code 0x2
Maybe using the Nexis Storage requires FFS to request com.apple.security.cs.allow-unsigned-executable-memory or the like. FFS however is not sandboxed, so this shouldn't apply.
User avatar
Zenju
Site Admin
Posts: 5528
Joined: 9 Dec 2007

Post by Zenju

It seems some apps set entitlements even though they are not sandboxed, while other entitlements only make sense to set when sandboxed. So let's give it a shot. The version below will set these entitlements:
com.apple.security.cs.allow-jit
com.apple.security.cs.allow-unsigned-executable-memory
com.apple.security.cs.disable-library-validation
com.apple.security.cs.allow-dyld-environment-variables
https://www.mediafire.com/file/w98ma50n6xelc3f/FreeFileSync_11.1_beta_macOS(2).zip

If this doesn't work, we need to somehow gather more information about why "EXC_CRASH (Code Signature Invalid)" occurs. Maybe details are logged somewhere.
alienlarevanche
Posts: 5
Joined: 28 Jul 2020

Post by alienlarevanche

EUREKA ! It works ! It looks like you figured out what was happening :) ! Bravo !

Do I have to keep this beta version or theses changes will be available on the next update ?

Thank you again for your quick support Zenju !
User avatar
Zenju
Site Admin
Posts: 5528
Joined: 9 Dec 2007

Post by Zenju

Wow, I had expected more complications! Now I hate cargo cult, so let's find out which of those entitlements did the trick and I'll include it for the next release. I don't think com.apple.security.cs.allow-jit was required, the other ones I'm not sure:

com.apple.security.cs.allow-unsigned-executable-memory:
https://www.mediafire.com/file/i1tu33isk8a7pz6/FreeFileSync_11.1_beta_macOS(3).zip

com.apple.security.cs.disable-library-validation:
https://www.mediafire.com/file/q9dkzvy6ky08bj3/FreeFileSync_11.1_beta_macOS(4).zip

com.apple.security.cs.allow-dyld-environment-variables:
https://www.mediafire.com/file/ht7cl7sgqwgqv6o/FreeFileSync_11.1_beta_macOS(5).zip
alienlarevanche
Posts: 5
Joined: 28 Jul 2020

Post by alienlarevanche

Hahaha, of course, so here are the results :

com.apple.security.cs.allow-unsigned-executable-memory: It worked !

com.apple.security.cs.disable-library-validation: Crash

com.apple.security.cs.allow-dyld-environment-variables: Crash
You do not have the required permissions to view the files attached to this post.
User avatar
Zenju
Site Admin
Posts: 5528
Joined: 9 Dec 2007

Post by Zenju

Perfect, fixed for the next release!