FS Watcher Status


#1

Hello:

Could someone elucidate on what the status of the filesystem watcher on supported platforms is?

I’m aware it’s not yet in the main GUI - so I presume it’s not yet ready for primetime. Does that mean no-one should be using it on a production system yet?

Thanks,

Pants.


(Audrius Butkevicius) #2

I think its good to, the UI is in the works as it comes with a bigger reshuffle of the UI. Enable it in advanced UI, and report any issues.


#3

I met some strange behaviour when tried to use it : "directory is not empty" is back


(janc1) #4

Few days I have to do manually click rescan on directory or rescan all to move my changes to another nodes. I dont see anything strange in log.

EDIT: Looks that some changes are transferred instantly, but in most cases I need do manual rescan or wait to rescan interval.


(Audrius Butkevicius) #5

If you can repro, and provide logs that would be interested.


(janc1) #6

as did write, there is nothing strange in log.

I am changing file or creating new one, whatching log file and nothing. I did reduce rescan interval. Until that time changed or new file is not transfered.


(Audrius Butkevicius) #7

Can you run with STTRACE=scanner,watchaggregator and see if there is anything interesting there about the files you are modifying?


(janc1) #8

aha, I did enable wather debug in webgui.

I did create file zs.txt. And this is log

2018-04-05 20:48:06 Enabled debug data for "watchaggregator"
2018-04-05 20:48:29 aggregator/GS_act_Projects: Creating eventDir at: mnt
2018-04-05 20:48:29 aggregator/GS_act_Projects: Creating eventDir at: mnt/disk_hdd
2018-04-05 20:48:29 aggregator/GS_act_Projects: Creating eventDir at: mnt/disk_hdd/FORMING
2018-04-05 20:48:29 aggregator/GS_act_Projects: Creating eventDir at: mnt/disk_hdd/FORMING/Projects
2018-04-05 20:48:29 aggregator/GS_act_Projects: Creating eventDir at: mnt/disk_hdd/FORMING/Projects/UK_ribon_projects
2018-04-05 20:48:29 aggregator/GS_act_Projects: Creating eventDir at: mnt/disk_hdd/FORMING/Projects/UK_ribon_projects/18-1c3fb04
2018-04-05 20:48:29 aggregator/GS_act_Projects: Tracking (type non-remove): mnt/disk_hdd/FORMING/Projects/UK_ribon_projects/18-1c3fb04/zs.txt
2018-04-05 20:48:29 aggregator/GS_act_Projects: Resetting notifyTimer to 10s
2018-04-05 20:48:29 aggregator/GS_act_Projects: Already tracked (type non-remove): mnt/disk_hdd/FORMING/Projects/UK_ribon_projects/18-1c3fb04/zs.txt
2018-04-05 20:48:29 aggregator/GS_act_Projects: Already tracked (type non-remove): mnt/disk_hdd/FORMING/Projects/UK_ribon_projects/18-1c3fb04/zs.txt
2018-04-05 20:48:39 aggregator/GS_act_Projects: Notifying about 1 fs events
2018-04-05 20:48:39 aggregator/GS_act_Projects: Resetting notifyTimer to 10s
2018-04-05 20:48:49 aggregator/GS_act_Projects: No tracked events, waiting for new event.

but file did not transfer, only when rescan interval (in my case 2m) apear, I will changed that to 1200s and leave it.


(janc1) #9

I did create totaly new file

2018-04-05 20:54:22 aggregator/GS_act_Projects: Tracking (type non-remove): mnt/disk_hdd/FORMING/Projects/UK_ribon_projects/17-1c3fb04-fglass/float.png
2018-04-05 20:54:22 aggregator/GS_act_Projects: Already tracked (type non-remove): mnt/disk_hdd/FORMING/Projects/UK_ribon_projects/17-1c3fb04-fglass/float.png
2018-04-05 20:54:22 aggregator/GS_act_Projects: Already tracked (type non-remove): mnt/disk_hdd/FORMING/Projects/UK_ribon_projects/17-1c3fb04-fglass/float.png
2018-04-05 20:54:22 aggregator/GS_act_Projects: Already tracked (type non-remove): mnt/disk_hdd/FORMING/Projects/UK_ribon_projects/17-1c3fb04-fglass/float.png
2018-04-05 20:54:23 aggregator/GS_act_Projects: No old fs events
2018-04-05 20:54:23 aggregator/GS_act_Projects: Resetting notifyTimer to 10s
2018-04-05 20:54:33 aggregator/GS_act_Projects: Notifying about 1 fs events
2018-04-05 20:54:33 aggregator/GS_act_Projects: Resetting notifyTimer to 10s
2018-04-05 20:54:43 aggregator/GS_act_Projects: Notifying about 1 fs events
2018-04-05 20:54:43 aggregator/GS_act_Projects: Resetting notifyTimer to 10s
2018-04-05 20:54:53 aggregator/GS_act_Projects: No tracked events, waiting for new event.

I did create file 6minutes ago, and it is still not transfered


(Jakob Borg) #10

Sounds like the watcher is doing its thing but the scan isn’t happening.


(janc1) #11

now this apear in log, I assume auto rescan happen

syncthing[1036]: [72MO7] 2018/04/05 21:11:44.499995 walk.go:316: DEBUG: to hash: UK_ribon_projects/17-1c3fb04-fglass/float.png File{Name:"UK_ribon_projects/17-1c3fb04-fglass/ ........
syncthing[1036]: [72MO7] 2018/04/05 21:11:44.666353 walk.go:186: DEBUG: real to hash: UK_ribon_projects/17-1c3fb04-fglass/float.png

and file is transfered


(janc1) #12

my directory for sync is /home/jano/FORMING/Projects

but it is symlink /home/jano/FORMING -> /mnt/disk_hdd/FORMING

what do you think, can be a problem? because I see this in log and looks bit strange

syncthing[1036]: [72MO7] 2018/04/05 21:26:29.165149 walk.go:217: DEBUG: error: mnt <nil> lstat /home/jano/FORMING/Projects/mnt: no such file or directory

(Jakob Borg) #13

Yeah, I think there is an issue there. There was one issue with symlinked folders plus the FS watcher fixed recently, but this may be another one. Basically, as I understand it, the filesystem watcher reports “real” paths, which is not what the rest of Syncthing expects when the folder is behind a symlink.

Also, symlinks suck.


(Audrius Butkevicius) #14

This sounds plausible.

We don’t walk past symlinks, but symlinked root should be ok. At which point is the symlink here, what’s the folder path, etc?

The partial truncated/modified/selectively picked logs make it very hard to understand.


(Audrius Butkevicius) #15

I’d be nice if you would write up a reproducer and opened a bug report on github with exact isolated steps, as in:

  1. Create folder /tmp/a
  2. Symlink /tmp/b pointing to /tmp/a
  3. Add syncthing folder with path /tmp/b
  4. Create file /tmp/a/x

Also, if you can’ try the latest version/master builds to see if it was recently fixed.


(janc1) #16

well, some symlink was symlink to another symlink and some was rooted and some was not.

sorry, I was quick, trying to find problem fast.

I am quite busy these days and I know that symlink can be problem now. It is not problem to point syncthing to real directory instead symlink, so I did fix that and sync is working now.

Thank you for help


(Audrius Butkevicius) #17

Everyone is busy, yet we still find time to provide support on the forum and find time to work on free software and not get paid for it. Be a team player.

You discovered a bug and regardless that you worked around it in can potentially break things for other people, please write it up on how we can reproduce it so we could fix it.


(Simon) #18

Until any hints to the contrary, I believe this is the same as https://github.com/syncthing/syncthing/issues/4867 and is already fixed in master by https://github.com/syncthing/syncthing/pull/4846


#19

I just saw that there seems to be a new feature in the latest version. In the folder it shows me an eye symbol. Is this the “watcher”? Is it documented? What are the benefits and how can I use it? I am using a NAS and it would be great if I could make the rescan intervals large to spare some energy :slight_smile:


(Audrius Butkevicius) #20

I think the new thing is still in the release candidate.