Subject: Re: [PATCH v7 08/10] fsmonitor: add tests for Linux

From: Paul Tarjan <[email-masked]>
Date: Wed, 4 Mar 2026 11:17:52 -0700

On Tue, Mar 4, 2026, Patrick Steinhardt wrote:
> Hm. So the fsmonitor listener for Linux is not reliable? Wouldn't the
> end user see the same issue then? I'm not sure whether just ignoring
> that issue and adding a timeout to our tests is the proper way to fix
> it.
>
> Before we jump to such solutions I'd rather want to know what the root
> cause of this. We had similar issues in the past on macOS, where we
> eventually figured out that we were missing events due to the buffers
> not being big enough. So did you investigate what the conditions are to
> trigger this?

This isn't a buffer issue or a bug in our code, it's a kernel
limitation in overlayfs. On older kernels, overlayfs doesn't implement
the fsnotify hooks that inotify depends on, so inotify_add_watch
succeeds but events are silently never delivered. Newer kernels have
partially fixed this but it still affects some configurations.

An end user on overlayfs would hit the same thing: the cookie wait
times out and they get a full-scan fallback. Correct results, just
no incremental speedup. The smoke test catches this early so we can
skip instead of timing out on every subsequent test.