Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1493095 - syncthing panic in dialer
Summary: syncthing panic in dialer
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: syncthing
Version: 27
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fabio Valentini
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-19 11:21 UTC by Aron Griffis
Modified: 2017-09-19 11:46 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-09-19 11:46:13 UTC
Type: Bug


Attachments (Terms of Use)

Description Aron Griffis 2017-09-19 11:21:23 UTC
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

Comment 1 Aron Griffis 2017-09-19 11:23:19 UTC
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

Comment 2 Aron Griffis 2017-09-19 11:24:21 UTC
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@build.syncthing.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 3 Aron Griffis 2017-09-19 11:27:12 UTC
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.)

Comment 4 Aron Griffis 2017-09-19 11:46:13 UTC
Update this morning fixed it:


$ rpm -q --changelog syncthing
* Mon Sep 18 2017 Fabio Valentini <decathorpe@gmail.com> - 0.14.37-2
- Rebuild for updated dependencies, fixing crashes.


Note You need to log in before you can comment on or make changes to this bug.