Ian,

Thankyou VERY much for your reply. Your analysis was spot-on. There is a 
3rd way that a goroutine could have the stack ripped out from under it - if 
it is running a signal handler. Go uses the SA_ONSTACK (alternate signal 
stack) facility which we had adopted for YottaDB as well. Back when we were 
still trying to field signals with YottaDB (C code) and pass them to Go 
(which never worked for reasons I was never clear on), we noted that the 
small altstacks that Go was using were too small for our signal handler 
routines so we would re-allocate the altstack to a larger size if we saw 
they were insufficient. Later, when we ran our cleanup handler, we would 
restore the stacks that Go was using and free what we had allocated. It was 
this free occuring while processes were shutting down in an asymmetric way 
due to a signal that was pulling the stacks out from under running signal 
routines occasionally. But removing the code that did the "restore" of Go's 
altstack got rid of these failures.

Again, much thanks for the insight that enabled us to figure out what was 
wrong.

Steve

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/16d79fec-7b41-4fc4-9272-dcd898a95118o%40googlegroups.com.

Reply via email to