Skip to content

panic: bug: ClusterConfig called on closed or nonexistent connection  #4170

Closed

Description

@eyeson

I have had two different Syncthing instances crash on Windows 10. One is running v0.14.28, one v.0.14.29-rc1.
Both are using SyncTrayzor (V1.1.16).

I restarted one, only to have it crash ~5 mins later. I captured the Synctrazor log from that one and have attached it.

I will endeavour to provide any other information required.

Forum post for reference: https://forum.syncthing.net/t/syncthing-crashing/9845

SyncTrayzor.txt

Activity

  1. calmh commented on May 23, 2017

    @calmh
    Member

    For clarity:

    [5NSF2] 09:17:06 INFO: Failed to exchange Hello messages with K2ECF46 (95.97.92.221:22067): read tcp 192.168.1.50:61924->95.97.92.221:22067: i/o timeout 
    entWatcher: Received 0 events 
    panic: bug: ClusterConfig called on closed or nonexistent connection 
    goroutine 4242 [running]: 
    github.com/syncthing/syncthing/lib/model.(*Model).ClusterConfig(0xc042058280, 0xdbf211def3228856, 0xc92a31f0bf8e42e1, 0xd87e29914adce15e, 0x87221d62cccbc3d9, 0xc042631f00, 0x1, 0x1) 
    	c:/jenkins/workspace/syncthing-release-windows/src/github.com/syncthing/syncthing/lib/model/model.go:789 +0x21c3 
    github.com/syncthing/syncthing/lib/protocol.(*nativeModel).ClusterConfig(0xc042b91fe0, 0xdbf211def3228856, 0xc92a31f0bf8e42e1, 0xd87e29914adce15e, 0x87221d62cccbc3d9, 0xc042631f00, 0x1, 0x1) 
    	<autogenerated>:74 +0x95 
    github.com/syncthing/syncthing/lib/protocol.(*rawConnection).readerLoop(0xc0457315c0, 0x0, 0x0) 
    	c:/jenkins/workspace/syncthing-release-windows/src/github.com/syncthing/syncthing/lib/protocol/protocol.go:306 +0x11de 
    created by github.com/syncthing/syncthing/lib/protocol.(*rawConnection).Start 
    	c:/jenkins/workspace/syncthing-release-windows/src/github.com/syncthing/syncthing/lib/protocol/protocol.go:171 +0x4a 
    goroutine 1 [chan receive, 70 minutes]: 
    main.syncthingMain(0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xc042057a40, 0x34, 0x0, 0x0, ...) 
    	c:/jenkins/workspace/syncthing-release-windows/src/github.com/syncthing/syncthing/cmd/syncthing/main.go:954 +0x1c5a 
    main.main() 
    	c:/jenkins/workspace/syncthing-release-windows/src/github.com/syncthing/syncthing/cmd/syncthing/main.go:459 +0x541 
    goroutine 20 [select, 71 minutes]: 
    github.com/syncthing/syncthing/vendor/github.com/xtaci/kcp-go.(*updateHeap).updateTask(0x10d0f40) 
    
  2. changed the title [-]Syncthing Panic[/-] [+]panic: bug: ClusterConfig called on closed or nonexistent connection [/+] on May 23, 2017
  3. added
    bug
    on May 23, 2017
  4. added this to the milestone on May 23, 2017
  5. calmh commented on May 23, 2017

    @calmh
    Member

    I think the connection failure at the top is relevant. Maybe this is something simple as two slow concurrent connections (i.e., one in each direction), one succeeding first and getting added, the other failing and removing the first from the model, then the first one continuing and exploding like this.

  6. calmh commented on May 23, 2017

    @calmh
    Member

    Note same in #3633 which this is really a dup of, but I'm leaving it open just because

  7. AudriusButkevicius commented on May 23, 2017

    @AudriusButkevicius
    Member

    I think we should just remove the panic and ignore the message, no point in crashing?

  8. calmh commented on May 23, 2017

    @calmh
    Member
  9. calmh commented on May 23, 2017

    @calmh
    Member

    @eyeson I don't suppose you can reproduce this somewhat reliably, or know the conditions leading up to it?

  10. eyeson commented on May 23, 2017

    @eyeson
    Author

    @calmh Sorry, unfortunately unable to reproduce. I had been doing nothing unusual prior to the crash - if it occurs again I will try and get more details

  11. Nnnes commented on May 25, 2017

    @Nnnes

    I had this crash for the first time just now. It happened around the same time some "unexpected" disconnections occurred (laptops moving out of WiFi range), but these disconnections normally happen dozens of times per day and have not given us trouble in the past.

    They don't look too helpful, but here are the Synctrayzor logs from the half minute before the crash.

  12. scienmind commented on Nov 12, 2017

    @scienmind
    Contributor
  13. calmh commented on Nov 12, 2017

    @calmh
    Member
  14. AudriusButkevicius commented on Nov 12, 2017

    @AudriusButkevicius
    Member

    It's most likely us starting a connection, receiving a message, disconnecting, and then delivering the message on a separate routine that is still alive.

  15. 13 remaining items

  16. added this to the v1.1.3 milestone on Apr 29, 2019
  17. added 2 commits that reference this issue on May 2, 2019
    c623f0c
    7740459
  18. removed this from the v1.1.3 milestone on May 8, 2019
  19. calmh commented on May 8, 2019

    @calmh
    Member

    Reopen because revert

  20. reopened this on May 8, 2019
  21. modified the milestone: v1.1.3 on May 8, 2019
  22. added a commit that references this issue on May 25, 2019
    2166a74
  23. added this to the v1.2.0 milestone on May 27, 2019
  24. added a commit that references this issue on May 29, 2019
    b3fc808
  25. added
    frozen-due-to-age
    on May 25, 2020
  26. locked and limited conversation to collaborators on May 25, 2020
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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions