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:15:56 UTC+11, she...@pingcap.com 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.
>
> For the questions:
> 1. The binary is built without race detector flag. I have checked it.
> 2. We do not use cgo. I will check if there is any unsafe package.
>
> Unfortunately, I can not reproduce this problem. This is the first time 
> and the only time I meet it.
>
> Thanks!
>
> On Saturday, January 6, 2018 at 1:28:24 AM UTC+8, Ian Lance Taylor wrote:
>>
>> On Fri, Jan 5, 2018 at 7:17 AM,  <she...@pingcap.com> 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 
>> > halts. There is nothing useful in stderr or dmesg. 
>>
>> (I would like to encourage you and everyone else to not post 
>> screenshots of text.  Just include the text in the e-mail message as 
>> text.  Screenshots of images, sure, but not text.  Thanks.) 
>>
>> The error "fatal: morestack on g0" should, of course, never happen. 
>> The first questions are standard: have you run your program with the 
>> race detector?  Do you use cgo or the unsafe package? 
>>
>> Beyond that, does the problem happen consistently?  Is there a way 
>> that we can reproduce it? 
>>
>> Ian 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to