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

Support sleep/wake and standby/wake or ssh connection cut or aid the situation with auto unmount/remount for remote filesystems #678

Closed
porg opened this issue May 12, 2022 · 5 comments

Comments

@porg
Copy link

porg commented May 12, 2022

Reproduction 1

  1. Mount remote filesystem via macFUSE — In my case sshfs.
  2. Put Mac to sleep — In my case via System Menu (Apple Symbol) > Sleep
  3. Wake it shortly later (8min) — I can confirm it indeed slept with pmset -g log
2022-05-12 18:26:00 +0200 Sleep                 Entering Sleep state due to 'Software Sleep pid=163': Using AC (Charge:100%) 504 secs  
2022-05-12 18:34:24 +0200 Wake                  Wake from Normal Sleep [CDNVA] : due to XHC1/HID Activity Using AC (Charge:100%)
  • Expected: You can continue browsing the remote webspace in Finder or in Terminal.
  • Actual: It works that way.

Reproduction 2

  • Ad 3) Sleep longer (hours) And then wake.
  • Actual: My Mac is only half responsive. Most apps still react. But Finder hangs. After 2-3min or so (a timeout?) the sshfs network volume disappears in the Finder and Finder is fully responsive again.

Another fact: macFUSE does not publish any "stay awake assertions"

as other similar background processes do which do not or can not support sleep

$ pmset -g assertions

Assertion status system-wide:
   BackgroundTask                 0
   ApplePushServiceTask           0
   UserIsActive                   1
   PreventUserIdleDisplaySleep    0
   PreventSystemSleep             0
   ExternalMedia                  1
   PreventUserIdleSystemSleep     0
   NetworkClientActive            0
Listed by owning process:
   pid 101(powerd): [0x0000002100088002] 01:09:03 ExternalMedia named: "com.apple.powermanagement.externalmediamounted"  
   pid 161(WindowServer): [0x0000006800098161] 00:00:00 UserIsActive named: "com.apple.iohideventsystem.queue.tickle serviceID:10000035c name:AppleEmbeddedKeyboa product:Apple Internal Keyb eventType:3"  
	Timeout will fire in 240 secs Action=TimeoutActionRelease
No kernel assertions.
Idle sleep preventers: IODisplayWrangler
  • No entry by macFUSE of SSHFS.

Proposed fixes

Sorted by most desired first:

  1. macFUSE seamlessly supports to wake from sleep or standby.
  2. If that is technically not possible
  • a) It behaves macOS standard compliant: As long as a network volume is mounted it publishes an assertion to the OS to stay awake in the correct assertion category.
  • b) offers a mechanism to automatically unmount on sleep and remount on wake.
@porg
Copy link
Author

porg commented May 12, 2022

@bsbernd
Copy link
Collaborator

bsbernd commented May 12, 2022

Unrelated to libfuse - in your case I would ask Apple about a solution.

@porg
Copy link
Author

porg commented May 12, 2022

So from the design of libfuse and any of its networking plugins like sshfs or curlftpfs a permanent TCP/IP connection is established which should also outlive sleep/wake events?

@bsbernd
Copy link
Collaborator

bsbernd commented May 12, 2022

I don't know anything about OSX, I'm not even sure if you are looking at the right project. A colleague told me that libfuse does not even compile, when I asked to test compile my branch on MacOS. The compilation errors pointed to https://github.com/osxfuse

On linux a recent workaround patch pointed to this patch https://linux-kernel.vger.kernel.narkive.com/UeBWfN1V/patch-fuse-make-fuse-daemon-frozen-along-with-kernel-threads
See the commit message for details.

@porg
Copy link
Author

porg commented May 13, 2022

Yes, I think I am wrong here.
I came from https://github.com/macfuse/library which in Readme.md states:

Please report any bugs on the GitHub issue tracker at https://github.com/libfuse/main/issues

I now saw that there is also the repo https://github.com/osxfuse/osxfuse and there issues can be created and first search already yielded related issues.

So I am closing here.

@porg porg closed this as completed May 13, 2022
@porg porg changed the title Support sleep/wake and standby/wake or at aid with auto unmount/remount for remote filesystems Support sleep/wake and standby/wake or ssh connection cut or aid the situation with auto unmount/remount for remote filesystems May 13, 2022
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

No branches or pull requests

2 participants