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
panic: nil pointer dereference in (*indexHandlerRegistry).startLocked #9269
Labels
bug
A problem with current functionality, as opposed to missing functionality (enhancement)
Milestone
Comments
Same as #9234 which we thought fixed. |
calmh
added a commit
to calmh/syncthing
that referenced
this issue
Dec 7, 2023
…#9269) A read lock is insufficient because the remove of the map entry happens in the RemoveAndWait call, where previously it didn't. However! I'm not sure this actually fixes the problem, because we then release the lock and have a nil/unset runner for a while, which previously would happen later under fmut again...
Ah crap, I reopened that issue - I'll close it again then :) |
imsodin
added a commit
to imsodin/syncthing
that referenced
this issue
Dec 7, 2023
Before introducing the service map and using it for folder runners, the entries in folderCfgs and folderRunners for the same key/folder were removed under a single lock. Stopping the folder happens separately before that with just the read lock. Now with the service map stopping the folder and removing it from the map is a single operation. And that still happens with just a read-lock. However even with a full lock it’s still problematic: After the folder stopped, the runner isn’t present anymore while the folder-config still is and sais the folder isn't paused. The index handler in turn looks at the folder config that is not paused, thus assumes the runner has to be present -> nil deref on the runner. A better solution would like be to push most of these fmut maps into the folder - they anyway are needed in there. Then there's just a single map/source of info that's necessarily consistent.
imsodin
added a commit
to imsodin/syncthing
that referenced
this issue
Dec 7, 2023
Before introducing the service map and using it for folder runners, the entries in folderCfgs and folderRunners for the same key/folder were removed under a single lock. Stopping the folder happens separately before that with just the read lock. Now with the service map stopping the folder and removing it from the map is a single operation. And that still happens with just a read-lock. However even with a full lock it’s still problematic: After the folder stopped, the runner isn’t present anymore while the folder-config still is and sais the folder isn't paused. The index handler in turn looks at the folder config that is not paused, thus assumes the runner has to be present -> nil deref on the runner. A better solution would like be to push most of these fmut maps into the folder - they anyway are needed in there. Then there's just a single map/source of info that's necessarily consistent.
calmh
added
the
bug
A problem with current functionality, as opposed to missing functionality (enhancement)
label
Dec 8, 2023
calmh
added a commit
to cjc7373/syncthing
that referenced
this issue
Dec 11, 2023
* main: (69 commits) lib/nat: Fix test build failure (ref syncthing#9010) lib/model: Add pmut locking for DeviceStatistics (fixes syncthing#9274) lib/model: Add pmut locking for DeviceStatistics (fixes syncthing#9274) lib/model: Remove spurious "replacing service" failure event (ref syncthing#9271) lib/model: Remove spurious "replacing service" failure event (ref syncthing#9271) lib/nat, lib/upnp: IPv6 UPnP support (syncthing#9010) gui, man, authors: Update docs, translations, and contributors gui: Show folder/device status on small screens (syncthing#8643) lib/model: Remove runner during folder cleanup (fixes syncthing#9269) (syncthing#9271) build: Update dependencies (syncthing#9265) build: Revert specifics for Go 1.21.4, build using Go 1.21.5 (syncthing#9264) lib/fs: Reduce memory usage in xattrs handling (syncthing#9251) lib/model: Improve LastSeen handling (syncthing#9256) lib/scanner: Record inode change time for directories and symlinks (syncthing#9250) lib/api: Improve ignore loading error handling (fixes syncthing#9253) (syncthing#9254) gui, man, authors: Update docs, translations, and contributors lib/fs: Better equality comparison in mtimefs cmd/stcrashreceiver: Add metrics for diskstore inventory cmd/stcrashreceiver: Minor cleanup, stricter file permissions cmd/stcrashreceiver: Add metrics for incoming reports ...
calmh
added a commit
to calmh/syncthing
that referenced
this issue
Dec 16, 2023
* main: (89 commits) build: Update quic-go (fixes syncthing#9287) lib/model: Only handle relevant folder summaries (kqueue) (fixes syncthing#9183) (syncthing#9288) lib/model: Use a single lock (phase two: cleanup) (syncthing#9276) build(deps): bump actions/setup-go from 4 to 5 (syncthing#9279) lib/model: Use a single lock (syncthing#9275) cmd/syncthing: Better cli stdin handling (ref syncthing#9166) (syncthing#9281) cmd/syncthing: Mostly replace urfave/cli command line parser with alecthomas/kong (syncthing#9166) lib/nat: Fix test build failure (ref syncthing#9010) lib/model: Add pmut locking for DeviceStatistics (fixes syncthing#9274) lib/model: Add pmut locking for DeviceStatistics (fixes syncthing#9274) lib/model: Remove spurious "replacing service" failure event (ref syncthing#9271) lib/model: Remove spurious "replacing service" failure event (ref syncthing#9271) lib/nat, lib/upnp: IPv6 UPnP support (syncthing#9010) gui, man, authors: Update docs, translations, and contributors gui: Show folder/device status on small screens (syncthing#8643) lib/model: Remove runner during folder cleanup (fixes syncthing#9269) (syncthing#9271) build: Update dependencies (syncthing#9265) build: Revert specifics for Go 1.21.4, build using Go 1.21.5 (syncthing#9264) lib/fs: Reduce memory usage in xattrs handling (syncthing#9251) lib/model: Improve LastSeen handling (syncthing#9256) ...
calmh
added a commit
to calmh/syncthing
that referenced
this issue
Jan 14, 2024
* main: lib/model: Use a single lock (phase two: cleanup) (syncthing#9276) build(deps): bump actions/setup-go from 4 to 5 (syncthing#9279) lib/model: Use a single lock (syncthing#9275) cmd/syncthing: Better cli stdin handling (ref syncthing#9166) (syncthing#9281) cmd/syncthing: Mostly replace urfave/cli command line parser with alecthomas/kong (syncthing#9166) lib/nat: Fix test build failure (ref syncthing#9010) lib/model: Add pmut locking for DeviceStatistics (fixes syncthing#9274) lib/model: Add pmut locking for DeviceStatistics (fixes syncthing#9274) lib/model: Remove spurious "replacing service" failure event (ref syncthing#9271) lib/model: Remove spurious "replacing service" failure event (ref syncthing#9271) lib/nat, lib/upnp: IPv6 UPnP support (syncthing#9010) gui, man, authors: Update docs, translations, and contributors gui: Show folder/device status on small screens (syncthing#8643) lib/model: Remove runner during folder cleanup (fixes syncthing#9269) (syncthing#9271)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
runner
is nil here:syncthing/lib/model/indexhandler.go
Line 419 in 75310b5
//@calmh
The text was updated successfully, but these errors were encountered: