Hi,
I stumbled upon a very unpleasant issue, which leads to inadequate macOS Catalina behavior.
As described in the subject, slow reads via osxfuse lead to high system CPU usage, Finder also misbehaves, the laptop's fans freak out and finally even a graceful restart does not help - a hard reset is required for solving the situation.
After a lot of digging and playing around with configurations, I finally ended up with a repro. Finally I managed to reproduce the situation with the C
sample file system by just adding a
sleep(5) inside the
read callback.
Here's
a video that shows the behavior and repro steps
Shortly:
1. Add sleep(5) inside the read callback.
2. Build filesystem-c with the change and mount it exactly the way it's suggested by the output of make.
3. The mount point is mapped to a folder, which contains two video files - the videos are played perfectly fine without the added sleep(5).
4. Double-click on one of the videos - QuickTime is the default video player.
5. Wait a few moments - nothing happens, the reads are slow. Close QuickTime from the Dock , as it doesn't do anything. Try again - same. Try the other video.
6. After awhile, the QuickTime window finally appears, but nothing starts playing. OK, give up and just close QuickTime Ha, it's not stopping, the Dock shows the not-responding status. So, finally force-quit QuickTime appears - use it.
7. At least one CPU core starts freaking out (sometimes it happens to more cores, although rarely). Interestingly, the CPU load is show to be system load, not user.
The things just got uglier with every other action. QuickTime is out of the picture not. Trying to relaunch the Finder - no luck. Try to unmount in 3 different ways - no lock either. Kill the loopback process - killed, but the umount process still hangs. Kills don't help, force options too. Trying to restart macOS - no success.
The laptop's fans start running like crazy, the battery goes away, etc. Expected in such situations.
Tested on multiple Catalina Macs (10.15.3 and 10.15.4, tried on Mac mini, MacBook Pro, different models).
Used latest osxfuse - 3.10.4.
Happens every single time, just sometimes takes a few more attempts to start the video.
This also happens when trying to open large pictures (not too large, though, like 20-25MiB).
This behavior is critical to us, as a slow Internet connection for awhile could practically kill the whole Mac, requiring hard reset (which could also lead to data loss for work-in-progress things on any running application).
Also tried with daemon_timeout - it didn't help at all (it's also used in the attached video).
Any help is appreciated!
Thanks,
Kiril