GNOME Bugzilla – Bug 775307
Dynamic changes of monitor type cause segfaults
Last modified: 2018-07-01 08:46:44 UTC
Dynamic changes of monitor type (e.g. due to autofs mounts) cause segfaults from inotify code. The crucial problem is that same path may be local filesystem (e.g. ext4) one time and other time remote filesystem (e.g. nfs). Consequently, gam_add_subscription may for example call gam_kernel_add_subscription and subsequent gam_remove_subscription may call gam_poll_remove_subscription... Core was generated by `/usr/libexec/gam_server'. Program terminated with signal 11, Segmentation fault.
+ Trace 236898
Possible workaround: Same monitoring method has to be used for parent dir filesystem type also as for the remote filesystem type, e.g.: fsset ext4 none fsset nfs none It can be reproduced with autofs, see the downstream bug report for more details: https://bugzilla.redhat.com/show_bug.cgi?id=1385040
Created attachment 340966 [details] [review] Fix segfaults if mon_type changes dynamically It fixes segfaults which occurs when autofs mount point is monitored, so the mon_type changes its value dynamically... This fixes inotify part, I am not sure whether other parts don't need similar changes also...
The patch just ensures that gam_remove_subscription is called for same monitor type, which was used by gam_add_subscription. However, we should probably also dynamically change the monitor type in such situations...
gamin is not under active development anymore and has not seen code changes for many years. Its codebase has been archived: https://gitlab.gnome.org/Archive/gamin/commits/master Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect reality. Please feel free to reopen this ticket (or rather transfer the project to GNOME Gitlab, as GNOME Bugzilla is deprecated) if anyone takes the responsibility for active development again.