[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#981515: kcoreaddons: please replace fam with gamin



On Thu, Mar 04, 2021 at 08:23:44AM +0100, Sune Stolborg Vuorela wrote:
> 
> On 3/3/21 8:54 PM, Nicholas D Steeves wrote:
> > 
> > thus FAM covers a use case that gamin does not, and this case is: users
> > who want to receive inotify style events for files that have been
> > remotely created or modified on NFS mounts.
> > 
> > Also, IIRC gamin depends on Linux-specific features such as inotify
> > where FAM provides fallbacks (eg: IIRC FAM is required on kfreebsd and
> > hurd); this might not be significant, but I felt it was worth mentioning
> > :-)
> > 
> Please note that these features are what KCoreAddons (or more specifically
> KDirWatch) uses FAM for.
> 
> KDirWatch hooks up to inotify directly and prefers that if possible. FAM is
> only used for fallback codepath for e.g. nfs-mounts, before KDirWatch
> resorts to the last fallback; polling.
> 
> Replacing with libgamin is basically making the inotify-free codepath depend
> on inotify, so either keep using FAM, or skip both of them.
> 
> 
> /Sune
> 
>  - who has been debugging KDirWatch and other parts of KCoreAddons over the
> years.

Sune, thanks for chiming in as someone using and debugging KCoreAddons!

It bears repeating that KCoreAddons using FAM is ineffective over NFS
unless the NFS server is also running and insecurely exposing FAM,
which is hopefully not widely used on the open internet today.

Sune, do you know if you were using KCoreAddons on networks that had
FAM running on the NFS server?  If so, would you recommend those
configurations today (versus 20 years ago)?  (Yes, it is possible to
better secure with firewall rules and tunnels, but takes more effort
and is still less appropriate for a multi-user system on which the
users have shell access and are using KCoreAddons.)

> Replacing with libgamin is basically making the inotify-free codepath depend
> on inotify, so either keep using FAM, or skip both of them.

I suggest the latter.  I think removal of FAM and gamin from KCoreAddons
is preferred.

As a lighttpd developer, I replaced both FAM and gamin with inotify()
on Linux and kqueue() on *BSD.  There is a reasonable fallback in
lighttpd when neither are available.

Cheers, Glenn


Reply to: