[Bug 254024] devel/gvfs: gvfsd-trash latches to zfs volumes

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Mar 22 09:24:02 UTC 2021


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254024

--- Comment #7 from Damjan Jovanovic <damjan.jov at gmail.com> ---
Created attachment 223496
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=223496&action=edit
g_file_monitor_directory() test

Here's a simple test that monitors a directory with g_file_monitor_directory()
like gvfsd-trash does.

While it monitors a mountpoint:

On Linux:
1. "lsof" shows an inotify file descriptor, but no directory file descriptors.
2. umount succeeds.
3. glib delivers a "changed" event to GFileMonitor after umount.

On FreeBSD:
1. "lsof" shows a kqueue file descriptor, AND an open file descriptor for each
monitored directory.
2. umount fails with "Device busy" (EBUSY).

Thus it seems the directories kept open by glib's kqueue usage are stopping the
unmount.

Either glib is using kqueue badly and needs fixing, or kqueue, by design,
cannot monitor directories without keeping them open, and thus always stops
unmounting (which could be much harder to fix).

-------

To build, make a SConstruct file with these lines and runs "scons":
glib_mount_monitor = Environment()
glib_mount_monitor.ParseConfig('pkg-config --cflags --libs glib-2.0')
glib_mount_monitor.ParseConfig('pkg-config --cflags --libs gio-2.0')
glib_mount_monitor.Program('glib_mount_monitor', 'glib_mount_monitor.c')

Run: ./glib_mount_monitor /path/to/mountpoint

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-gnome mailing list