-
Notifications
You must be signed in to change notification settings - Fork 14
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
Stuck at open_by_handle_at when zoom flatpak is closed #11
Comments
Thanks for your report -- fanotify() generally cannot handle btrfs subvolumes, see issue #3. But here it seems you found an actual kernel bug: open_by_handle_at() is not supposed to block. It should either succeed or fail with an error. It could possibly help to open the handle in non-blocking mode: --- fatrace.c
+++ fatrace.c
@@ -149,7 +149,7 @@ get_fid_event_fd (const struct fanotify_event_metadata *data)
/* get affected file fd from fanotify_event_info_fid */
fd = open_by_handle_at (get_mount_id ((const fsid_t *) &fid->fsid),
- (struct file_handle *) fid->handle, O_RDONLY);
+ (struct file_handle *) fid->handle, O_RDONLY|O_NONBLOCK);
/* ignore ESTALE for deleted fds between the notification and handling it */
if (fd < 0 && errno != ESTALE)
warn ("open_by_handle_at");
Would you be able to test that? fatrace-nonblock.tar.gz is a compiled x86_64 binary, if you use another architecture, can you try and compile it yourself? If not, tell me the architecture and I can probably build it for you. Thanks! |
@martinpitt hi -- this patch is effective against the hang. Thanks for the quick fix! These are the lines following the point where it would hang.
|
This seems to work around a kernel bug with btrfs, where open_by_handle_at() hangs indefinitely by default. We never actually read anything from that fd, so we don't care about the blocking mode. Fixes #11
Nice! This was a shot into the dark, but sometimes you hit something 😉 I committed this workaround. |
/mnt
is mounted from the root subvolume in a btrfs filesystemcd /mnt; sudo fatrace --current-mount -f W
Last few logs collected:
State at the time of the hang:
Other flatpak doesn't exhibit this behavior.
Other native apps don't exhibit this behavior.
The text was updated successfully, but these errors were encountered: