Description of problem: syncthing panics while setting up a connection. This didn't happen in Fedora 26 and doesn't happen with the same version upstream. Version-Release number of selected component (if applicable): syncthing-0.14.37-1.fc27.x86_64 How reproducible: continuously Steps to Reproduce: 1. syncthing -no-browser -logflags=0 -logfile=syncthing.log 2. won't sync with remote systems 3. look at looping panic in syncthing.log Additional info: reported upstream at https://github.com/syncthing/syncthing/issues/4379 where we figured out that it's specific to the Fedora package
Here's the log output for the panic: [SBGGZ] INFO: syncthing v0.14.37 "Dysprosium Dragonfly" (go1.9beta2 linux-amd64) mockbuild@fedora-koji 2017-09-15 14:38:21 UTC [noupgrade] [SBGGZ] INFO: My ID: SBGGZNR-NU6STFN-T3V4R65-F4H6OBO-KVCU5JN-45WEJXU-MOPHBLB-RM7ORQU [SBGGZ] INFO: Single thread SHA256 performance is 284 MB/s using minio/sha256-simd (282 MB/s using crypto/sha256). [SBGGZ] INFO: Hashing performance with weak hash is 235.02 MB/s [SBGGZ] INFO: Hashing performance without weak hash is 275.59 MB/s [SBGGZ] INFO: Weak hash enabled, as it has an acceptable performance impact. [SBGGZ] INFO: Ready to synchronize "Default Folder" (default) (readwrite) [SBGGZ] INFO: Send rate is unlimited, receive rate is unlimited [SBGGZ] INFO: Rate limits do not apply to LAN connections [SBGGZ] INFO: TCP listener (172.20.0.11:22000) starting [SBGGZ] INFO: connections.Service: Failed service '(connections.serviceFunc)(0x5560a45ac990)' (1.000000 failures of 5.000000), restarting: true, error: reflect: call of reflect.Value.Int on zero Value, stacktrace: goroutine 12 [running]: github.com/thejerf/suture.(*Supervisor).runService.func1.1(0xc420122460, 0x0) /usr/share/gocode/src/github.com/thejerf/suture/supervisor.go:448 +0xbe panic(0x5560a4d7e080, 0xc42008a1a0) /usr/lib/golang/src/runtime/panic.go:491 +0x287 reflect.Value.Int(0x0, 0x0, 0x0, 0x5560a46b6190) /usr/lib/golang/src/reflect/value.go:908 +0x143 golang.org/x/net/internal/netreflect.socketOf(0x5560a5149ea0, 0xc42000e008, 0x9, 0x1, 0x0) /usr/share/gocode/src/golang.org/x/net/internal/netreflect/socket_posix.go:26 +0x198 golang.org/x/net/internal/netreflect.SocketOf(0x5560a5149ea0, 0xc42000e008, 0xc42002c600, 0xc42002c670, 0xc42002c600) /usr/share/gocode/src/golang.org/x/net/internal/netreflect/socket.go:23 +0x67 golang.org/x/net/ipv4.(*genericOpt).SetTOS(0xc4216d2d88, 0x0, 0x5560a40ee0c8, 0x5560a5142ec8) /usr/share/gocode/src/golang.org/x/net/ipv4/genericopt_posix.go:33 +0x53 github.com/syncthing/syncthing/lib/dialer.SetTrafficClass(0x5560a5149ea0, 0xc42000e008, 0x0, 0x1, 0xc42019d0f0) /builddir/build/BUILD/syncthing/_build/src/github.com/syncthing/syncthing/lib/dialer/public.go:85 +0x152 github.com/syncthing/syncthing/lib/connections.(*tcpDialer).Dial(0xc42004a140, 0xf4eeb087eb28a4e0, 0x9cfd4652342ef076, 0xa78231fbdc4ad8d, 0xf7315d3e727f30ba, 0xc420342200, 0x5560a51988c0, 0x3, 0x1, 0xc4201a1200, ...) /builddir/build/BUILD/syncthing/_build/src/github.com/syncthing/syncthing/lib/connections/tcp_dial.go:45 +0x2e3 github.com/syncthing/syncthing/lib/connections.(*Service).connect(0xc421861d10) /builddir/build/BUILD/syncthing/_build/src/github.com/syncthing/syncthing/lib/connections/service.go:401 +0x120f github.com/syncthing/syncthing/lib/connections.(*Service).(github.com/syncthing/syncthing/lib/connections.connect)-fm() /builddir/build/BUILD/syncthing/_build/src/github.com/syncthing/syncthing/lib/connections/service.go:144 +0x2c github.com/syncthing/syncthing/lib/connections.serviceFunc.Serve(0xc4200816b0) /builddir/build/BUILD/syncthing/_build/src/github.com/syncthing/syncthing/lib/connections/structs.go:133 +0x27 github.com/thejerf/suture.(*Supervisor).runService.func1(0xc420122460, 0xc400000000, 0x5560a5143260, 0xc4200816b0) /usr/share/gocode/src/github.com/thejerf/suture/supervisor.go:454 +0x65 created by github.com/thejerf/suture.(*Supervisor).runService /usr/share/gocode/src/github.com/thejerf/suture/supervisor.go:444 +0x5d
Here's the same log output using the upstream binary release that doesn't panic: [SBGGZ] INFO: syncthing v0.14.37 "Dysprosium Dragonfly" (go1.9 linux-amd64) teamcity.net 2017-08-24 04:26:12 UTC [SBGGZ] INFO: My ID: SBGGZNR-NU6STFN-T3V4R65-F4H6OBO-KVCU5JN-45WEJXU-MOPHBLB-RM7ORQU [SBGGZ] INFO: Single thread SHA256 performance is 283 MB/s using minio/sha256-simd (281 MB/s using crypto/sha256). [SBGGZ] INFO: Hashing performance with weak hash is 231.09 MB/s [SBGGZ] INFO: Hashing performance without weak hash is 272.04 MB/s [SBGGZ] INFO: Weak hash enabled, as it has an acceptable performance impact. [SBGGZ] INFO: Ready to synchronize "Default Folder" (default) (readwrite) [SBGGZ] INFO: Send rate is unlimited, receive rate is unlimited [SBGGZ] INFO: Rate limits do not apply to LAN connections [SBGGZ] INFO: TCP listener (172.20.0.11:22000) starting [SBGGZ] INFO: Device PGBNL6H-SHFG3HB-43HJDEK-6SJERY7-RD25VD7-QEBN5LA-5XUL652-U7RNUQG is "aron@crumb" at [dynamic] [SBGGZ] INFO: Device SBGGZNR-NU6STFN-T3V4R65-F4H6OBO-KVCU5JN-45WEJXU-MOPHBLB-RM7ORQU is "aron@jasperodus" at [dynamic] [SBGGZ] INFO: Device 4CSCR24-HWDXPIB-5XQFY2F-ERX5TSK-G23RF5D-4RXQCVC-2GB7XEP-S5GH3QQ is "aron@gargan" at [tcp://172.20.0.244:22000] [SBGGZ] INFO: GUI and API listening on 127.0.0.1:8384 [SBGGZ] INFO: Access the GUI via the following URL: http://127.0.0.1:8384/ [SBGGZ] INFO: Starting usage reporting [SBGGZ] INFO: Established secure connection to 4CSCR24-HWDXPIB-5XQFY2F-ERX5TSK-G23RF5D-4RXQCVC-2GB7XEP-S5GH3QQ at 172.20.0.11:43614-172.20.0.244:22000 (tcp-client) (TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305) [SBGGZ] INFO: Device 4CSCR24-HWDXPIB-5XQFY2F-ERX5TSK-G23RF5D-4RXQCVC-2GB7XEP-S5GH3QQ client is "syncthing v0.14.36" named "aron@gargan" [SBGGZ] INFO: Automatic upgrade (current "v0.14.37" < latest "v0.14.38-rc.1") [SBGGZ] INFO: Completed initial scan (rw) of "Default Folder" (default) [SBGGZ] WARNING: Automatically upgraded to version "v0.14.38-rc.1". Restarting in 1 minute.
Comment from upstream: FWIW I suspect the issue is that they're using an old version of the x/net/{ipv4,ipv6} packages that isn't compatible with Go 1.9. (And, possibly, using a beta compiler that is old at this point.)
Update this morning fixed it: $ rpm -q --changelog syncthing * Mon Sep 18 2017 Fabio Valentini <decathorpe> - 0.14.37-2 - Rebuild for updated dependencies, fixing crashes.