Syncthing: Connection switching (relay->direct) causes crash in index sender

Created on 1 Aug 2016  路  3Comments  路  Source: syncthing/syncthing

From #3448:

[JQHVO] 10:06:22 INFO: Connection to FYOHSB2 closed: switching connections
[JQHVO] 10:06:22 INFO: Established secure connection to FYOHSB2 at 192.168.181.10:22000-:58180 (TCP (Server))
[JQHVO] 10:06:22 INFO: Connection to FYOHSB2 closed: reading length: read tcp 192.168.181.10:50169->104.129.57.94:22067: use of closed network connection
[JQHVO] 10:06:22 INFO: Device FYOHSB2 client is "syncthing v0.14.3" named 
[JQHVO] 10:06:22 INFO: Connection to FYOHSB2 closed: reading length: read tcp 192.168.181.10:22000->68.65.72.186:58180: use of closed network connection
[JQHVO] 10:06:45 INFO: Established secure connection to FYOHSB2 at 192.168.181.10:50186-104.129.57.94:22067 (Relay (Server))
[JQHVO] 10:06:45 INFO: Device FYOHSB2 client is "syncthing v0.14.3" named 
[JQHVO] 10:06:45 INFO: Device FYOHSB2 folder "9ZTJu-VPHqJ" is delta index compatible (mlv=75283)
[JQHVO] 10:06:45 INFO: Device FYOHSB2 folder "SharedTools" is delta index compatible (mlv=69294)
[JQHVO] 10:06:45 INFO: Device FYOHSB2 folder "randomBulkSync" is delta index compatible (mlv=69414)
[JQHVO] 10:06:45 INFO: Device FYOHSB2 folder "randomMinSync" is delta index compatible (mlv=72906)
[JQHVO] 10:06:45 INFO: Device FYOHSB2 folder "cfzjw-SkHX7" is delta index compatible (mlv=70180)
[JQHVO] 10:06:45 INFO: Device FYOHSB2 folder "DABingeNeedRetire" is delta index compatible (mlv=76601)
[JQHVO] 10:07:10 INFO: Connection to FYOHSB2 closed: switching connections
panic: bug: ClusterConfig called on closed or nonexistent connection
goroutine 8184 [running]:
[JQHVO] 10:07:10 INFO: Established secure connection to FYOHSB2 at 192.168.181.10:22000-:24653 (TCP (Server))
panic(0xa9b5c0, 0xc08543e870)
[JQHVO] 10:07:10 INFO: Device FYOHSB2 client is "syncthing v0.14.3" named 
c:/go/src/runtime/panic.go:481 +0x3f4
[JQHVO] 10:07:10 INFO: Connection to FYOHSB2 closed: writing message: write tcp 192.168.181.10:50186->104.129.57.94:22067: use of closed network connection
github.com/syncthing/syncthing/lib/model.(Model).ClusterConfig(0xc082050140, 0xeb96024f07791c2e, 0xf66cc66753f4d053, 0x9aa6d3756b1bc563, 0xcd823ef98efc703b, 0xc082366800, 0x6, 0x8)
c:/jenkins/workspace/syncthing-release-windows/src/github.com/syncthing/syncthing/lib/model/model.go:655 +0x214
github.com/syncthing/syncthing/lib/protocol.(nativeModel).ClusterConfig(0xc0869c5620, 0xeb96024f07791c2e, 0xf66cc66753f4d053, 0x9aa6d3756b1bc563, 0xcd823ef98efc703b, 0xc082366800, 0x6, 0x8)
:59 +0x8c
github.com/syncthing/syncthing/lib/protocol.(rawConnection).readerLoop(0xc0825f2c00, 0x0, 0x0)
c:/jenkins/workspace/syncthing-release-windows/src/github.com/syncthing/syncthing/lib/protocol/protocol.go:305 +0x12d8
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:170 +0x40

The sequence seems to be that we add a new connection, then close the old connection, which removed the connection from the internal maps leaving us connected but with no handle to the connection...

0.14.3

bug frozen-due-to-age

Most helpful comment

I am encountering the same issue. Syncthing is started automatically after restart. I am at v 0.14.3 and the connection seem to drop quite constantly.

All 3 comments

Same message "panic: bug: ClusterConfig called on closed or nonexistent connection"
Appears to occur when Syncthing is manually started on multiple computers (Win & Mac OSs), and they start talk to each other.

No visible sync errors.

I am encountering the same issue. Syncthing is started automatically after restart. I am at v 0.14.3 and the connection seem to drop quite constantly.

also here - st stopps working (managed with SyncTrazor / Win 7 v0.14.3, Windows (32 bit) )

[yyyyyy] 19:20:43 INFO: Connection to xxxxx closed: writing message: write tcp 192.168.0.21:64928->195.154.81.193:443: use of closed network connection
panic: bug: ClusterConfig called on closed or nonexistent connection
goroutine 757518 [running]:
panic(0x979560, 0x17f46698)
c:/go-386/src/runtime/panic.go:481 +0x326
github.com/syncthing/syncthing/lib/model.(_Model).ClusterConfig(0x1178ae70, 0x5000d1bf, 0x308c0d51, 0x1dbf093, 0xce862713, 0x26c1ab38, 0xe5aa08aa, 0x8fb7ebf8, 0xb9d6353b, 0x17898600, ...)
c:/jenkins/workspace/syncthing-release-windows/src/github.com/syncthing/syncthing/lib/model/model.go:655 +0x1e0
github.com/syncthing/syncthing/lib/protocol.(_nativeModel).ClusterConfig(0x14b0b1c0, 0x5000d1bf, 0x308c0d51, 0x1dbf093, 0xce862713, 0x26c1ab38, 0xe5aa08aa, 0x8fb7ebf8, 0xb9d6353b, 0x17898600, ...)
:59 +0x6a
github.com/syncthing/syncthing/lib/protocol.(_rawConnection).readerLoop(0x13fcdc80, 0x0, 0x0)
c:/jenkins/workspace/syncthing-release-windows/src/github.com/syncthing/syncthing/lib/protocol/protocol.go:305 +0xfe0
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:170 +0x32

Was this page helpful?
0 / 5 - 0 ratings