-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FreeBSD: Create new file does not generate a fs event. #5308
Comments
I can confirm the issue and have an addition: File/dir creations do not get detected, but deletions do. Test environment:
I would be happy to help tracking this down! Unfortunately, this considerably reduces the usefulness of Syncthing on FreeBSD. Lowering the rescan time is no ideal solution. Syncthing Version: v1.0.0, FreeBSD (64 bit), with ZFS pool |
We've already established that kqueue implementation is broken on non-OSX, sadly we just use a library. We know that mkdir + touch in the same dir in quick succession does not get noticed, which is reported as: See if using https://godoc.org/github.com/rjeczalik/cmd/notify shows any events. If you want it fixed, it's probably best if you do the legwork yourself. |
@AudriusButkevicius @tokred I just tried with https://godoc.org/github.com/rjeczalik/cmd/notify and it works with that command so it is probably something that could be downstreamed to the vendored notify. |
Does our fork of inotify not report it? |
In Syncthing both 1.1.4 and 1.2.1rc3 only deletes are detected as first mentioned by @tokred. |
Update: I just checked version v1.0.1 and v0.14.48 now too. With the same problem. |
@AudriusButkevicius I changed out ""github.com/rjeczalik/notify" with "github.com/syncthing/notify" in https://github.com/rjeczalik/cmd/blob/master/notify/main.go and ran It still worked and reported changes done to my test folder. |
The problem might related to this comment (https://github.com/rjeczalik/notify/blob/master/watcher_kqueue.go#L157):
We use platform specific events, not the cross-platform Can you confirm that file changes (as opposed to creations) do get picked up? |
I feep someone from the bsd community needs to step up their game, add a bunch of debug prints, understand the issue and open a pr fixing it. We can't fix issues on platforms we don't use. |
@imsodin You are correct. |
@imsodin @AudriusButkevicius |
Syncthing Version: v0.14.52-rc.3, FreeBSD (64 bit)
OS Version: 11.2-RELEASE-p4
Reproduce:
export STTRACE=watchaggregator
syncthing
touch ~/Sync/newfile
Expected:
an file create event triggered and the file is synced
Actual:
aggregator.go:305: DEBUG: aggregator/"Default Folder" (default): No tracked events, waiting for new event And the new file is not synced
It is related to #9 and https://forum.syncthing.net/t/directory-watcher-on-freebsd-issue/11561 (Both closed).
The text was updated successfully, but these errors were encountered: