Panic at 2020-09-01T22:45:18-07:00 panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0xb27f24] goroutine 73 [running]: github.com/syncthing/syncthing/lib/db.(*metadataTracker).devices(0x0, 0x0, 0x0, 0x0) github.com/syncthing/syncthing/lib/db/meta.go:401 +0x44 github.com/syncthing/syncthing/lib/db.(*FileSet).ListDevices(...) github.com/syncthing/syncthing/lib/db/set.go:427 github.com/syncthing/syncthing/lib/model.(*model).addAndStartFolderLockedWithIgnores(0xc000583b00, 0xc000034d30, 0xb, 0xc000209980, 0x1c, 0x0, 0xc00022ab70, 0x22, 0x0, 0xc000571800, ...) github.com/syncthing/syncthing/lib/model/model.go:311 +0x275 github.com/syncthing/syncthing/lib/model.(*model).addAndStartFolderLocked(0xc000583b00, 0xc000034d30, 0xb, 0xc000209980, 0x1c, 0x0, 0xc00022ab70, 0x22, 0x0, 0xc000571800, ...) github.com/syncthing/syncthing/lib/model/model.go:286 +0x19d github.com/syncthing/syncthing/lib/model.(*model).newFolder(0xc000583b00, 0xc000034d30, 0xb, 0xc000209980, 0x1c, 0x0, 0xc00022ab70, 0x22, 0x0, 0xc000571800, ...) github.com/syncthing/syncthing/lib/model/model.go:515 +0x2c5 github.com/syncthing/syncthing/lib/model.(*model).onServe(0xc000583b00) github.com/syncthing/syncthing/lib/model/model.go:252 +0x207 github.com/syncthing/syncthing/lib/model.(*model).Serve(0xc000583b00) github.com/syncthing/syncthing/lib/model/model.go:235 +0x2b github.com/thejerf/suture.(*Supervisor).runService.func1(0xc000420000, 0xc000000001, 0x7fb5ea3ebdc8, 0xc000583b00) github.com/thejerf/suture@v3.0.2+incompatible/supervisor.go:600 +0x76 created by github.com/thejerf/suture.(*Supervisor).runService github.com/thejerf/suture@v3.0.2+incompatible/supervisor.go:588 +0x5b goroutine 1 [chan receive]: github.com/syncthing/syncthing/lib/syncthing.(*App).Wait(...) github.com/syncthing/syncthing/lib/syncthing/syncthing.go:374 main.syncthingMain(0xc000122c00, 0x13, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) github.com/syncthing/syncthing/cmd/syncthing/main.go:719 +0x74f main.main() github.com/syncthing/syncthing/cmd/syncthing/main.go:438 +0x3bc goroutine 17 [chan receive]: github.com/syncthing/notify.(*nonrecursiveTree).dispatch(0xc000200300, 0xc000200240) github.com/syncthing/notify@v0.0.0-20190709140112-69c7a957d3e2/tree_nonrecursive.go:36 +0xb6 created by github.com/syncthing/notify.newNonrecursiveTree github.com/syncthing/notify@v0.0.0-20190709140112-69c7a957d3e2/tree_nonrecursive.go:29 +0xe5 goroutine 18 [chan receive]: github.com/syncthing/notify.(*nonrecursiveTree).internal(0xc000200300, 0xc0002002a0) github.com/syncthing/notify@v0.0.0-20190709140112-69c7a957d3e2/tree_nonrecursive.go:81 +0x58 created by github.com/syncthing/notify.newNonrecursiveTree github.com/syncthing/notify@v0.0.0-20190709140112-69c7a957d3e2/tree_nonrecursive.go:30 +0x111 goroutine 15 [syscall]: os/signal.signal_recv(0x1287d80) runtime/sigqueue.go:147 +0x9d os/signal.loop() os/signal/signal_unix.go:23 +0x25 created by os/signal.Notify.func1.1 os/signal/signal.go:150 +0x45 goroutine 12 [select]: github.com/syncthing/syncthing/lib/events.(*logger).serve(0xc0002c2000, 0x1290ac0, 0xc00020c040) github.com/syncthing/syncthing/lib/events/events.go:277 +0x187 github.com/syncthing/syncthing/lib/util.AsService.func1(0x1290ac0, 0xc00020c040, 0xc000334060, 0x0) github.com/syncthing/syncthing/lib/util/utils.go:236 +0x39 github.com/syncthing/syncthing/lib/util.(*service).Serve(0xc0002003c0) github.com/syncthing/syncthing/lib/util/utils.go:300 +0x129 created by main.syncthingMain github.com/syncthing/syncthing/cmd/syncthing/main.go:604 +0x23a goroutine 13 [select]: github.com/syndtr/goleveldb/leveldb/util.(*BufferPool).drain(0xc00026a000) github.com/syndtr/goleveldb@v1.0.1-0.20200815071216-d9e9293bd0f7/leveldb/util/buffer_pool.go:209 +0x128 created by github.com/syndtr/goleveldb/leveldb/util.NewBufferPool github.com/syndtr/goleveldb@v1.0.1-0.20200815071216-d9e9293bd0f7/leveldb/util/buffer_pool.go:240 +0x18c goroutine 14 [select]: github.com/syndtr/goleveldb/leveldb.(*session).refLoop(0xc000399860) github.com/syndtr/goleveldb@v1.0.1-0.20200815071216-d9e9293bd0f7/leveldb/session_util.go:189 +0x60f created by github.com/syndtr/goleveldb/leveldb.newSession github.com/syndtr/goleveldb@v1.0.1-0.20200815071216-d9e9293bd0f7/leveldb/session.go:93 +0x2bd goroutine 39 [runnable]: github.com/syndtr/goleveldb/leveldb.(*DB).compactionError(0xc00026c000) github.com/syndtr/goleveldb@v1.0.1-0.20200815071216-d9e9293bd0f7/leveldb/db_compaction.go:91 +0xd1 created by github.com/syndtr/goleveldb/leveldb.openDB github.com/syndtr/goleveldb@v1.0.1-0.20200815071216-d9e9293bd0f7/leveldb/db.go:148 +0x42b goroutine 40 [runnable]: github.com/syndtr/goleveldb/leveldb.(*DB).mpoolDrain(0xc00026c000) github.com/syndtr/goleveldb@v1.0.1-0.20200815071216-d9e9293bd0f7/leveldb/db_state.go:101 +0x105 created by github.com/syndtr/goleveldb/leveldb.openDB github.com/syndtr/goleveldb@v1.0.1-0.20200815071216-d9e9293bd0f7/leveldb/db.go:149 +0x44d goroutine 41 [runnable]: github.com/golang/snappy.encodeBlock(0xc00ee370af, 0x9c89, 0x9c89, 0xc004d10000, 0x13f, 0x444, 0x90ac) github.com/golang/snappy@v0.0.1/encode_amd64.s:265 +0x38e github.com/golang/snappy.Encode(0xc00ee2e000, 0x12d38, 0x12d38, 0x0, 0x0, 0x0, 0x309, 0xc0110af400, 0xad6b0a) github.com/golang/snappy@v0.0.1/encode.go:37 +0x1c6 github.com/syndtr/goleveldb/leveldb/table.(*Writer).writeBlock(0xc0000c66c0, 0xc0000c6718, 0x2, 0x2, 0x120, 0xc01106c240, 0xc0000c6718) github.com/syndtr/goleveldb@v1.0.1-0.20200815071216-d9e9293bd0f7/leveldb/table/writer.go:171 +0xd6 github.com/syndtr/goleveldb/leveldb/table.(*Writer).finishBlock(0xc0000c66c0, 0xc0112dea80, 0x3e) github.com/syndtr/goleveldb@v1.0.1-0.20200815071216-d9e9293bd0f7/leveldb/table/writer.go:222 +0x55 github.com/syndtr/goleveldb/leveldb/table.(*Writer).Append(0xc0000c66c0, 0xc0112dea80, 0x3e, 0x80, 0xc002e11be2, 0x131, 0xd311, 0xc0112dea80, 0x3e) github.com/syndtr/goleveldb@v1.0.1-0.20200815071216-d9e9293bd0f7/leveldb/table/writer.go:255 +0x25a github.com/syndtr/goleveldb/leveldb.(*tWriter).append(0xc0014100c0, 0xc0112dea80, 0x3e, 0x80, 0xc002e11be2, 0x131, 0xd311, 0xc0112dea80, 0xc0112dea80) github.com/syndtr/goleveldb@v1.0.1-0.20200815071216-d9e9293bd0f7/leveldb/table.go:559 +0xe5 github.com/syndtr/goleveldb/leveldb.(*tableCompactionBuilder).appendKV(0xc00018a5a0, 0xc0112dea80, 0x3e, 0x80, 0xc002e11be2, 0x131, 0xd311, 0xffffffffffffffff, 0x0) github.com/syndtr/goleveldb@v1.0.1-0.20200815071216-d9e9293bd0f7/leveldb/db_compaction.go:399 +0xa5 github.com/syndtr/goleveldb/leveldb.(*tableCompactionBuilder).run(0xc00018a5a0, 0xc0002e0478, 0x0, 0x0) github.com/syndtr/goleveldb@v1.0.1-0.20200815071216-d9e9293bd0f7/leveldb/db_compaction.go:517 +0x545 github.com/syndtr/goleveldb/leveldb.(*DB).compactionTransact(0xc00026c000, 0xfbb442, 0xb, 0x1286100, 0xc00018a5a0) github.com/syndtr/goleveldb@v1.0.1-0.20200815071216-d9e9293bd0f7/leveldb/db_compaction.go:186 +0x18c github.com/syndtr/goleveldb/leveldb.(*DB).tableCompaction(0xc00026c000, 0xc00132a000, 0x1192100) github.com/syndtr/goleveldb@v1.0.1-0.20200815071216-d9e9293bd0f7/leveldb/db_compaction.go:580 +0x64b github.com/syndtr/goleveldb/leveldb.(*DB).tableAutoCompaction(0xc00026c000) github.com/syndtr/goleveldb@v1.0.1-0.20200815071216-d9e9293bd0f7/leveldb/db_compaction.go:644 +0x54 github.com/syndtr/goleveldb/leveldb.(*DB).tCompaction(0xc00026c000) github.com/syndtr/goleveldb@v1.0.1-0.20200815071216-d9e9293bd0f7/leveldb/db_compaction.go:863 +0x2ee created by github.com/syndtr/goleveldb/leveldb.openDB github.com/syndtr/goleveldb@v1.0.1-0.20200815071216-d9e9293bd0f7/leveldb/db.go:155 +0x5a5 goroutine 42 [runnable]: github.com/syndtr/goleveldb/leveldb.(*DB).mCompaction(0xc00026c000) github.com/syndtr/goleveldb@v1.0.1-0.20200815071216-d9e9293bd0f7/leveldb/db_compaction.go:773 +0x145 created by github.com/syndtr/goleveldb/leveldb.openDB github.com/syndtr/goleveldb@v1.0.1-0.20200815071216-d9e9293bd0f7/leveldb/db.go:156 +0x5c7 goroutine 16 [chan receive]: main.setupSignalHandling.func1(0xc000200b40, 0xc000256dc0) github.com/syncthing/syncthing/cmd/syncthing/main.go:735 +0x34 created by main.setupSignalHandling github.com/syncthing/syncthing/cmd/syncthing/main.go:734 +0xbc goroutine 65 [chan receive]: github.com/syncthing/syncthing/lib/syncthing.(*App).stopWithErr(0xc000256dc0, 0x0, 0x0, 0x0, 0x0) github.com/syncthing/syncthing/lib/syncthing/syncthing.go:401 +0x90 github.com/syncthing/syncthing/lib/syncthing.(*App).Stop(...) github.com/syncthing/syncthing/lib/syncthing/syncthing.go:392 main.setupSignalHandling.func2(0xc000114780, 0xc000256dc0) github.com/syncthing/syncthing/cmd/syncthing/main.go:745 +0x53 created by main.setupSignalHandling github.com/syncthing/syncthing/cmd/syncthing/main.go:743 +0x171 goroutine 66 [sleep]: time.Sleep(0x2540be400) runtime/time.go:188 +0xbf main.standbyMonitor(0xc000256dc0, 0x12a3300, 0xc000264000) github.com/syncthing/syncthing/cmd/syncthing/main.go:823 +0x85 created by main.syncthingMain github.com/syncthing/syncthing/cmd/syncthing/main.go:705 +0x6a5 goroutine 245 [semacquire]: sync.runtime_Semacquire(0xc00026c188) runtime/sema.go:56 +0x45 sync.(*WaitGroup).Wait(0xc00026c180) sync/waitgroup.go:130 +0x65 github.com/syndtr/goleveldb/leveldb.(*DB).Close(0xc00026c000, 0xc000334060, 0x0) github.com/syndtr/goleveldb@v1.0.1-0.20200815071216-d9e9293bd0f7/leveldb/db.go:1175 +0x1bd github.com/syncthing/syncthing/lib/db/backend.(*leveldbBackend).Close(0xc00011a6d0, 0xc0005017c8, 0x92957c) github.com/syncthing/syncthing/lib/db/backend/leveldb_backend.go:84 +0x45 github.com/syncthing/syncthing/lib/syncthing.(*App).run.func1(0xc000256dc0, 0xc00023e000) github.com/syncthing/syncthing/lib/syncthing/syncthing.go:357 +0x38 created by github.com/syncthing/syncthing/lib/syncthing.(*App).run github.com/syncthing/syncthing/lib/syncthing/syncthing.go:356 +0xea goroutine 69 [chan receive]: github.com/syncthing/syncthing/lib/events.(*bufferedSubscription).pollingLoop(0xc000030280) github.com/syncthing/syncthing/lib/events/events.go:473 +0x9b created by github.com/syncthing/syncthing/lib/events.NewBufferedSubscription github.com/syncthing/syncthing/lib/events/events.go:468 +0x165 goroutine 70 [chan receive]: github.com/syncthing/syncthing/lib/events.(*bufferedSubscription).pollingLoop(0xc000030320) github.com/syncthing/syncthing/lib/events/events.go:473 +0x9b created by github.com/syncthing/syncthing/lib/events.NewBufferedSubscription github.com/syncthing/syncthing/lib/events/events.go:468 +0x165 goroutine 71 [sleep]: time.Sleep(0x45d964b800) runtime/time.go:188 +0xbf github.com/syncthing/syncthing/lib/model.(*deadlockDetector).Watch.func1(0xc000205710, 0x7fb5ea3ebda0, 0xc000122360, 0xfb3d00, 0x4) github.com/syncthing/syncthing/lib/model/util.go:39 +0x58 created by github.com/syncthing/syncthing/lib/model.(*deadlockDetector).Watch github.com/syncthing/syncthing/lib/model/util.go:37 +0xb2 goroutine 72 [sleep]: time.Sleep(0x45d964b800) runtime/time.go:188 +0xbf github.com/syncthing/syncthing/lib/model.(*deadlockDetector).Watch.func1(0xc000205710, 0x7fb5ea3ebda0, 0xc000122380, 0xfb3f40, 0x4) github.com/syncthing/syncthing/lib/model/util.go:39 +0x58 created by github.com/syncthing/syncthing/lib/model.(*deadlockDetector).Watch github.com/syncthing/syncthing/lib/model/util.go:37 +0xb2 goroutine 135 [select]: github.com/syncthing/syncthing/lib/syncthing.(*App).run(0xc000256dc0) github.com/syncthing/syncthing/lib/syncthing/syncthing.go:360 +0x17a created by github.com/syncthing/syncthing/lib/syncthing.(*App).Start github.com/syncthing/syncthing/lib/syncthing/syncthing.go:118 +0x90 goroutine 227 [IO wait]: internal/poll.runtime_pollWait(0x7fb5ea774438, 0x72, 0x127d840) runtime/netpoll.go:220 +0x55 internal/poll.(*pollDesc).wait(0xc0006e0318, 0x72, 0xc000387300, 0x10e7, 0x10e7) internal/poll/fd_poll_runtime.go:87 +0x45 internal/poll.(*pollDesc).waitRead(...) internal/poll/fd_poll_runtime.go:92 internal/poll.(*FD).Read(0xc0006e0300, 0xc000387300, 0x10e7, 0x10e7, 0x0, 0x0, 0x0) internal/poll/fd_unix.go:159 +0x1b1 net.(*netFD).Read(0xc0006e0300, 0xc000387300, 0x10e7, 0x10e7, 0x203000, 0x7fb5ea0ae538, 0x0) net/fd_posix.go:55 +0x4f net.(*conn).Read(0xc000c70098, 0xc000387300, 0x10e7, 0x10e7, 0x0, 0x0, 0x0) net/net.go:182 +0x8e crypto/tls.(*atLeastReader).Read(0xc003c8c000, 0xc000387300, 0x10e7, 0x10e7, 0x27, 0x10ab, 0xc00063d730) crypto/tls/conn.go:779 +0x62 bytes.(*Buffer).ReadFrom(0xc001ef6280, 0x127ade0, 0xc003c8c000, 0x40b645, 0xe971a0, 0xf77740) bytes/buffer.go:204 +0xb1 crypto/tls.(*Conn).readFromUntil(0xc001ef6000, 0x127bf40, 0xc000c70098, 0x5, 0xc000c70098, 0x16) crypto/tls/conn.go:801 +0xf3 crypto/tls.(*Conn).readRecordOrCCS(0xc001ef6000, 0x0, 0x0, 0x40d42a) crypto/tls/conn.go:608 +0x115 crypto/tls.(*Conn).readRecord(...) crypto/tls/conn.go:576 crypto/tls.(*Conn).Read(0xc001ef6000, 0xc003ca2000, 0x1000, 0x1000, 0x0, 0x0, 0x0) crypto/tls/conn.go:1252 +0x15f bufio.(*Reader).Read(0xc003b232c0, 0xc003b4e818, 0x9, 0x9, 0xc003ca2012, 0x4, 0x0) bufio/bufio.go:227 +0x222 io.ReadAtLeast(0x127ac00, 0xc003b232c0, 0xc003b4e818, 0x9, 0x9, 0x9, 0xc0000b621c, 0xf0001fd9ec301, 0x1f00000000000000) io/io.go:314 +0x87 io.ReadFull(...) io/io.go:333 net/http.http2readFrameHeader(0xc003b4e818, 0x9, 0x9, 0x127ac00, 0xc003b232c0, 0x0, 0xc000000000, 0x48825c, 0xc003b76390) net/http/h2_bundle.go:1477 +0x89 net/http.(*http2Framer).ReadFrame(0xc003b4e7e0, 0xc0029aa000, 0x0, 0x0, 0x0) net/http/h2_bundle.go:1735 +0xa5 net/http.(*http2clientConnReadLoop).run(0xc00063dfa8, 0x0, 0x0) net/http/h2_bundle.go:8240 +0x8d net/http.(*http2ClientConn).readLoop(0xc003ca0000) net/http/h2_bundle.go:8168 +0x6f created by net/http.(*http2Transport).newClientConn net/http/h2_bundle.go:7173 +0x66e