fatal error: runtime: out of memory

I installed syncthing on my ubuntu computer, and I’m trying to sync 80gb between it and my windows computer. Every time I attempt to sync between the two my ubuntu’s syncthing crashes. The whole error message is below:

fatal error: runtime: out of memory unable to allocate additional stack space: errno 12 Aborted

main.copyStderr /build/buildd/syncthing-0.10.27/cmd/syncthing/monitor.go:182

goroutine 1 [select]: main.monitorMain /build/buildd/syncthing-0.10.27/cmd/syncthing/monitor.go:128 main.main /build/buildd/syncthing-0.10.27/cmd/syncthing/main.go:373

goroutine 3 [syscall]: goroutine in C code; stack unavailable

goroutine 5 [select]: events.Poll.pN59_github.com_syncthing_syncthing_internal_events.Subscription /build/buildd/syncthing-0.10.27/gopath/src/github.com/syncthing/syncthing/internal/events/events.go:182 github.com_syncthing_syncthing_internal_events.pollingLoop.pN67_github.com_syncthing_syncthing_internal_events.BufferedSubscription /build/buildd/syncthing-0.10.27/gopath/src/github.com/syncthing/syncthing/internal/events/events.go:218 created by github.com_syncthing_syncthing_internal_events.NewBufferedSubscription /build/buildd/syncthing-0.10.27/gopath/src/github.com/syncthing/syncthing/internal/events/events.go:212

goroutine 6 [chan receive]: main.trackCPUUsage /build/buildd/syncthing-0.10.27/cmd/syncthing/gui_unix.go:33 created by __go_init_main /build/buildd/syncthing-0.10.27/cmd/syncthing/blockprof.go:16

goroutine 9 [runnable]: main.copyStdout /build/buildd/syncthing-0.10.27/cmd/syncthing/monitor.go:208 created by main.main /build/buildd/syncthing-0.10.27/cmd/syncthing/main.go:373

goroutine 10 [runnable]: main.$nested12 /build/buildd/syncthing-0.10.27/cmd/syncthing/monitor.go:125 created by main.main /build/buildd/syncthing-0.10.27/cmd/syncthing/main.go:373

I have 2 GB of memory on my ubuntu computer. I feel like that should be enough.

It seems you are not running the official release but one compiled with gccgo (the first line when you start syncthing says which compiler was used).

You should try the official release from github which should help.

That was the problem. Thanks!

If possible, you could also report to the distribution maintainer that (s)he should use a different compiler to make other people’s life easier :smile: