Watchman stops detecting new subfolders after running for a few days on CIFS-mounted directory (inside Kubernetes Pod)
- Dominant language
- C++
- Stars
- 13.7k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
### Summary
When Watchman runs inside a Kubernetes Pod and watches a CIFS-mounted directory, it initially detects file and directory creation events correctly — both at the root and in subdirectories.
However, after running for several days, Watchman stops detecting new subfolders and files that appear under deeper paths, until the service is restarted.
### Environment
| Component | Version / Information|
|-------------|---------------------|
|Watchman version | watchman-v2025.05.05.00-linux |
| Container image | ubuntu:24.04 |
| PVC Type | CIFS (SMB network share) |
| Mount path | `/var/opt/mydir` |
### Reproduction steps
1. Inside a Kubernetes Pod, mount a CIFS PVC at `/var/opt/mydir`.
2. Start watchman
3. Create new directories and files:
```
mkdir -p /var/opt/mydir/mydir2/2025-10-01
touch /var/opt/mydir/mydir2/2025-10-01/file.txt
```
→ Watchman detects events correctly.
4. Over the next few days, new subfolders appear (e.g., 2025-10-02, 2025-10-03, 2025-10-04, …) as part of normal file ingest activity.
5. After several days, Watchman no longer emits events for new subdirectories or files under them.
### Expected behavior
Watchman should continuously detect file and directory changes under /var/opt/mydir and all its descendants, regardless of how long it has been running.
### Observed behavior
- Initially: Works fine — detects /var/opt/mydir/mydir2/2025-10-01 and new files created below it.
- After several days:
- Some newer subdirectories (e.g. 2025-10-03, 2025-10-04, 2025-10-05) are no longer detected.
- Restarting Watchman or the service immediately restores detection, but the issue recurs after a few days.
- CPU/memory usage remains normal; no obvious Watchman errors in logs.
If you need more information, please don't hesitate to let me know. Thank you
Contributor guide
Assessment
This issue has not been assessed yet.