Skip to content

protocol: We somehow leak state between connections #3906

Closed

Description

@AudriusButkevicius

https://forum.syncthing.net/t/folders-out-of-sync-even-after-rebuilding-indexes/8447/86

Note the (double cluster config and request msg):

[SVKBT] 00:34:59 INFO: Device VLJSASA client is "syncthing v0.14.19" named "OGG"
[SVKBT] 00:35:03 INFO: Connection to VLJSASA closed: reading length: EOF
[SVKBT] 00:36:35 INFO: Established secure connection to VLJSASA at 192.168.1.71:22000-192.168.1.31:62816 (tcp-server) (TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384)
[SVKBT] 00:36:35 INFO: Device VLJSASA client is "syncthing v0.14.19" named "OGG"
[SVKBT] 00:36:58 INFO: Connection to VLJSASA closed: protocol error: request message in state 0

then later

[SVKBT] 00:29:42 INFO: Connection to VLJSASA closed: protocol error: ping message in state 0

and eventually:

panic: bug: ClusterConfig called on closed or nonexistent connection
goroutine 250970 [running]:
panic(0xa03aa0, 0xc054cf0d30)
	c:/go/src/runtime/panic.go:500 +0x1af
github.com/syncthing/syncthing/lib/model.(*Model).ClusterConfig(0xc042057540, 0x81ba3134820d3aa, 0x5f1a6c6645c0b6fa, 0x1350e75a036ea034, 0x80913036e7f6531a, 0xc05320f800, 0x19, 0x20)
	c:/jenkins/workspace/syncthing-release-windows/src/github.com/syncthing/syncthing/lib/model/model.go:786 +0x21b6

Activity

  1. aquatix commented on Jan 22, 2017

    @aquatix

    This seems to happen to me too with the latest Android client (0.9.4) that uses v0.14.19 of syncthing too, preventing synchronisation.

  2. AudriusButkevicius commented on Jan 22, 2017

    @AudriusButkevicius
    MemberAuthor

    Define "this". What exactly are you seeing?

  3. calmh commented on Jan 23, 2017

    @calmh
    Member

    I don't think it's so much that we're leaking, more that connections can get stuck in some state and the callbacks from protocol to model just identify the source device, not the actual connection. It's somewhere far down on my mental todo list to refactor a bunch of stuff out from model into a something that has an actual instance per connection instead.

  4. added
    bug
    on Feb 7, 2017
  5. added this to the milestone on Feb 7, 2017
  6. calmh commented on Feb 7, 2017

    @calmh
    Member

    Will probably require significant refactoring to solve.

  7. scienmind commented on Jul 6, 2017

    @scienmind
    Contributor

    Since the exact issue was closed as duplicate:

    Happens not that rarely (no crash, just the warning message):

    [IDIDIDID] 12:42:51 INFO: Paused folder SOME_FOLDER
    [IDIDIDID] 12:42:52 WARNING: Request from OTHER_IDIDID for file \path\file.smth in unshared folder "SOME_FOLDER"
    

    ST v.0.14.31

  8. AudriusButkevicius commented on Jul 6, 2017

    @AudriusButkevicius
    MemberAuthor

    This is just a race I guess.

  9. removed this from the milestone on Feb 11, 2018
  10. imsodin commented on May 14, 2020

    @imsodin
    Member

    The changes done a while ago on locking around restarting folders and handling connections made this panic impossible. And there's no panics like this anymore reported to sentry since 1.2.0.

  11. added
    frozen-due-to-age
    on May 15, 2021
  12. locked and limited conversation to collaborators on May 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugfrozen-due-to-age

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions