Re: [go-nuts] Meet "fatal morestack on g0" on Linux

2018-01-08 Thread shenli
We are discussing this issue on Github: https://github.com/golang/go/issues/23360 On Sunday, January 7, 2018 at 11:22:52 PM UTC+8, she...@pingcap.com wrote: > > #1 0x004293f2 in runtime.futexsleep (addr=0x1b0a950 > , val=0, ns=-1) at /usr/local/go/src/runtime/os_linux.go:45 > > > I dive

Re: [go-nuts] Meet "fatal morestack on g0" on Linux

2018-01-07 Thread shenli
#1 0x004293f2 in runtime.futexsleep (addr=0x1b0a950 , val=0, ns=-1) at /usr/local/go/src/runtime/os_linux.go:45 I dive into the source code of golang 1.9.2 and find this: https://github.com/golang/go/blob/bf9ad7080d0a22acf502a60d8bc6ebbc4f5340ef/src/runtime/os_linux.go#L45 > // Som

Re: [go-nuts] Meet "fatal morestack on g0" on Linux

2018-01-07 Thread shenli
The same problem occurs again with the same error message. The pstack result: > Thread 1 (process 12230): > #0 runtime.futex () at /usr/local/go/src/runtime/sys_linux_amd64.s:439 > #1 0x004293f2 in runtime.futexsleep (addr=0x1b0a950 > , val=0, ns=-1) at /usr/local/go/src/runtime/os_linux

Re: [go-nuts] Meet "fatal morestack on g0" on Linux

2018-01-07 Thread shenli
We enable race detection in the test environment and disable it when building to be published binaries. I double checked the building environment to make sure the race detection is disabled. For we care the performance very much. On Saturday, January 6, 2018 at 7:04:09 PM UTC+8, Dave Cheney wrot

Re: [go-nuts] Meet "fatal morestack on g0" on Linux

2018-01-06 Thread Jan Mercl
On Sat, Jan 6, 2018, 11:16 wrote: > Thanks for your advice! I got the error message and the pstack result > screenshot from one of our client. I will try to use some OCR tools to > convert the image to text next time. > It's already text, no need for OCR. Just copy the text, not the image repr

Re: [go-nuts] Meet "fatal morestack on g0" on Linux

2018-01-06 Thread Dave Cheney
You can still check for races if you build your production binary with -race and deploy it as normal. There will be a some performance hit so you probably shouldn't do this for all your binaries, but it will be a cheap way to flush out any data races in your code. On Saturday, 6 January 2018 21

Re: [go-nuts] Meet "fatal morestack on g0" on Linux

2018-01-06 Thread shenli
Thanks for your advice! I got the error message and the pstack result screenshot from one of our client. I will try to use some OCR tools to convert the image to text next time. For the questions: 1. The binary is built without race detector flag. I have checked it. 2. We do not use cgo. I wil

Re: [go-nuts] Meet "fatal morestack on g0" on Linux

2018-01-05 Thread Ian Lance Taylor
On Fri, Jan 5, 2018 at 7:17 AM, wrote: > > I meet a strange problem when running a program on Linux. I get "fatal: > morestack on g0" from stderr. The process is still there but does not > respond anymore. When I use `curl > http://ip:port/debug/pprof/goroutine?debug=1` to check the stack, but it

[go-nuts] Meet "fatal morestack on g0" on Linux

2018-01-05 Thread shenli
Hello everyone, I meet a strange problem when running a program on Linux. I get "fatal: morestack on g0" from stderr. The process is still there but does not respond anymore. When I use `curl http://ip:port/debug/pprof/goroutine?debug=1` to check the stack, but it halts. There is nothing usefu