syncthing: FS notification watch aggregator stuck spinning on timers ("CPU Usage High with no mission")
What happened?
I encountered this issue on both v1.20 and v1.27.7. Currently, the situation is that I don’t have any tasks (there might have been some in the past, but at least right now there are no tasks), and CPU usage randomly spikes to very high levels. At this point, restarting syncthing resolves the issue, but whether it will reoccur or how long it will take to appear is uncertain. This is the pprof I captured: cpu pprof heap pprof
This is the top output:
flat flat% sum% cum cum%
8130ms 20.71% 20.71% 8130ms 20.71% math.archExp
7710ms 19.64% 40.35% 7710ms 19.64% runtime.memclrNoHeapPointers
3730ms 9.50% 49.85% 3980ms 10.14% math.log1p
1310ms 3.34% 53.18% 3970ms 10.11% runtime.scanobject
1240ms 3.16% 56.34% 1240ms 3.16% math.archLog
1160ms 2.95% 59.30% 16150ms 41.14% github.com/greatroar/blobloom.fpRate
590ms 1.50% 60.80% 2340ms 5.96% github.com/greatroar/blobloom.logPoisson
540ms 1.38% 62.18% 810ms 2.06% runtime.findObject
530ms 1.35% 63.53% 530ms 1.35% runtime.(*mspan).base (inline)
490ms 1.25% 64.77% 490ms 1.25% runtime.futex
Syncthing version
v1.27.7
Platform & operating system
Linux amd64 Debian
Browser version
Safari, Chrome
Relevant log output
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 20 (10 by maintainers)
Commits related to this issue
- fix(watchaggregator): Properly handle sub-second watch durations (fixes #9927) I'll let Audrius words from the ticket explain this :) > I'm a bit lost, time.Duration is an int64, yet watcher delay i... — committed to imsodin/syncthing by imsodin a year ago
- fix(watchaggregator): properly handle sub-second watch durations (fixes #9927) I'll let Audrius words from the ticket explain this :) > I'm a bit lost, time.Duration is an int64, yet watcher delay i... — committed to imsodin/syncthing by imsodin a year ago
- fix(watchaggregator): properly handle sub-second watch durations (fixes #9927) I'll let Audrius words from the ticket explain this :) > I'm a bit lost, time.Duration is an int64, yet watcher delay i... — committed to imsodin/syncthing by imsodin a year ago
- fix(watchaggregator): properly handle sub-second watch durations (fixes #9927) (#10179) I'll let Audrius words from the ticket explain this :) > I'm a bit lost, time.Duration is an int64, yet watche... — committed to syncthing/syncthing by imsodin a year ago
- fix(watchaggregator): properly handle sub-second watch durations (fixes #9927) (#10179) I'll let Audrius words from the ticket explain this :) > I'm a bit lost, time.Duration is an int64, yet watche... — committed to syncthing/syncthing by imsodin a year ago
- Merge branch 'main' into jb/slog * main: (69 commits) chore(gui, man, authors): update docs, translations, and contributors build: fix detection of next rc version fix(model): don't clobber loc... — committed to calmh/syncthing by calmh a year ago
- Feature/merge upstream (#21) * fix(protocol): avoid deadlock with concurrent connection start and close (#10140) * build: properly propagate build tags to Debian build (#10144) Previously all were ... — committed to cre4ture/thingium by cre4ture a year ago
I’m a bit lost, time.Duration is an int64, yet watcher delay is float, anything sub 1s gets rounded down to 0, so you just end up going into an infinite loop.
https://go.dev/play/p/X3lB6DW8OKj
Take a CPU profile please, or there is nothing to debug.