Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new static libs that do not require the MacFuse compat layer #28

Merged
merged 5 commits into from
Nov 1, 2018

Conversation

tessus
Copy link
Collaborator

@tessus tessus commented Oct 18, 2016

I've created new static libs with the latest upstream code and third party libs:

SSHFS version 2.8 OSXFUSE 3.5.2 FUSE library version: 2.9.7
curlftpfs 0.9.2 libcurl/7.50.3 fuse/2.9

I even added a fallback mode as a safeguard.

@ElDeveloper
Copy link
Member

After pulling down this branch and testing, I'm seeing the following message in the log viewer:

(SSHServerFS, [redacted], 10/23/16, 1:44 PM) 2016-10-23 13:44:47.750955 new_sshfs_askpass[10072:1768229] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '[NOTE: this exception originated in the server.]
No tokens available, internal inconsistency, please restart your machine and try again'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fffb3ba67bb __exceptionPreprocess + 171
    1   libobjc.A.dylib                     0x00007fffc8313a2a objc_exception_throw + 48
    2   Foundation                          0x00007fffb55af28f -[NSConnection sendInvocation:internal:] + 4004
    3   CoreFoundation                      0x00007fffb3b19db8 ___forwarding___ + 536
    4   CoreFoundation                      0x00007fffb3b19b18 _CF_forwarding_prep_0 + 120
    5   MFCore                              0x0000000103a8ab97 mfsecGetFilesystemForToken + 94
    6   new_sshfs_askpass                   0x0000000103a7421f main + 303
    7   libdyld.dylib                       0x00007fffc8bef255 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

I thought this was a problem in my machine, but after restarting, I can't seem to be able to fix this problem.

Everything seems to be working just fine with the current pre-release though. Not sure what's going on.


To test this branch, I uninstalled fuse, then re-installed fuse and made sure that I didn't add the compatibility layer. After noticing this error, I uninstalled fuse, reinstalled with the compatibility layer, ran the old version (i.e. the pre-release) and everything works fine.

@tessus
Copy link
Collaborator Author

tessus commented Oct 24, 2016

I've just tested it on my machine again and it works perfectly.

screen_shot_2016-10-24_at_12_05_54
screen shot 2016-10-24 at 12 06 04
screen shot 2016-10-24 at 12 06 12

(SSHServerFS, test, 2016-10-24, 12:11) Mounting
(MFClient, test, 2016-10-24, 12:11) Note status changed for fs <MFClientFS: 0x6000000e3280> (test) to Waiting to Mount
(SSHServerFS, test, 2016-10-24, 12:11) Task launched OK
(MFClient, test, 2016-10-24, 12:11) Note status changed for fs <MFClientFS: 0x6000000e3280> (test) to Mounted

@tessus
Copy link
Collaborator Author

tessus commented Oct 24, 2016

@ElDeveloper
Copy link
Member

@tessus, just for the record I tried the binary and I still saw the same error. It's rather odd, the interface will appear as if it had "mounted" i.e. the icon goes green, and then it immediately goes gray. The error shows up in the log viewer. Note that this time I didn't remove the compatibility layer, so I suspect it has to do something with some of the other changes going on here (not sure what would that be though).

Maybe someone else reading this can try this out in their system?

@tessus
Copy link
Collaborator Author

tessus commented Oct 30, 2016

My icon goes green and stays green. Maybe there's a problem with the server. The error message you are receiving is still strange: [NOTE: this exception originated in the server.]. Why would you get this message with one binary, but not with the other.

Is there any chance you can use the sshfs-static binary from the command line (without Macfusion at all) and log all issues? Maybe we can narrow it down this way.

If anybody else would like to try it, please go ahead. I have a compiled Macfusion binary as well.

@tessus
Copy link
Collaborator Author

tessus commented Nov 1, 2016

I've noticed bizarre dependencies in the project and got rid of them. Here are 2 new binaries to test:
https://evermeet.cx/pub/macosx/macfusion/Macfusion.app.b2-dyn.tar.gz
https://evermeet.cx/pub/macosx/macfusion/Macfusion.app.b3-sta.tar.gz

I'm wondering, if either one fixes your crash.

@ElDeveloper
Copy link
Member

@tessus, thanks for posting these. Both of them are still failing for me with the same error.

@tessus
Copy link
Collaborator Author

tessus commented Nov 5, 2016

This is interesting. They actually worked for @fsigworth in #27

But I have noticed some other troubling issues that have to do with sshfs. Its behavior has changed (since the one that is bundled is several years old) and I have found a bug in fuse_unmount. Unless we fix these issues first it makes no sense to continue with this project at all. We can't rely on a bundled binary that is years old and has a dependency on something that will soon be obsolete. Let's discuss this offline.

@ElDeveloper
Copy link
Member

Sounds good! I am wondering if it's something to do with my computer, haven't really had a chance to test in someone else's machine.

@166MMX
Copy link
Contributor

166MMX commented Jan 2, 2017

Please bare with me if I am telling you guys nothing new. But just want to make sure you are not being confused by the IPC.

@ElDeveloper did you make sure that you were not mixing MacFusion versions? I mean that you are trying to use a new_sshfs_askpass of @tessus in combination of an already running MacFusion agent build by your software? the message [NOTE: this exception originated in the server.] is generated by the IPC NSconnection Framework. It tells you to look at the Agent process and investigate the logs on the agent side.

This is my current guess. Please bare with me if you already thought of that. just wanted to make sure you guys have it on your radar.

@ElDeveloper
Copy link
Member

Good idea, @166MMX I did check that a while ago, and just tried again. Doesn't seem to be working eitherway. I would be happy to merge this if someone else can confirm this is working for them. I know my computer is a bit flaky these days, so it could very well be something about my machine.


Just in case someone can spot something immediately wrong with what I'm doing, these are the steps I just tried:

Pull down the latest branch:

  • git checkout -b sshfs-ftpfs
  • git pull origin sshfs-ftpfs

Verify there's no agent running:

  • ps aux | grep -i macfusion

Go to System Preferences and uninstall Fuse for macOS:

# installed version 3.5.2
# update available 3.5.4

Go to the Fuse for macOS website, download and install version 3.5.4, do not check macfuse compatibility layer.

Go to Xcode, clean and build the target.

87 warnings

macfusion agent process not started ...

Create and mount filesystem:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '[NOTE: this exception originated in the server.]
No tokens available, internal inconsistency, please restart your machine and try again'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fffbe6120db __exceptionPreprocess + 171
	1   libobjc.A.dylib                     0x00007fffd32a4a2a objc_exception_throw + 48
	2   Foundation                          0x00007fffc0030c2f -[NSConnection sendInvocation:internal:] + 4004
	3   CoreFoundation                      0x00007fffbe585098 ___forwarding___ + 536
	4   CoreFoundation                      0x00007fffbe584df8 _CF_forwarding_prep_0 + 120
	5   MFCore                              0x00000001041f2b97 mfsecGetFilesystemForToken + 94
	6   new_sshfs_askpass                   0x00000001041d721f main + 303
	7   libdyld.dylib                       0x00007fffd3b86255 start + 1
	8   ???                                 0x0000000000000002 0x0 + 2
)

I checked with sshfs that I could mount the filesystem and with the current version of MacFusion that I could still mount the filesystem.

@tessus tessus mentioned this pull request Oct 26, 2018
@ElDeveloper ElDeveloper merged commit 69fa6d5 into master Nov 1, 2018
@ElDeveloper
Copy link
Member

Thanks @tessus for putting this together and @wcgall for confirming things are working!

@tessus tessus deleted the sshfs-ftpfs branch November 1, 2018 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants