-
Notifications
You must be signed in to change notification settings - Fork 18k
runtime: crash near runtime.assertI2T2 including address 0xdeaddeaddeaddead #11643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
CC @RLH @aclements |
Hi @rhysh. A few questions: Can you run this with GODEBUG=gccheckmark=1? Can you say something about what's happening at the caller of assertI2T2 (/redacted.go:30 in your traceback)? In particular, I'm curious about where the value that you're type-asserting came from. I'm guessing it came from the second word of a struct, and that we failed to mark that containing object, but it would be nice to know if that's right and anything you can say about that containing object. Finally, is this the same program as #11644? |
Same questions as Austin. The line in question says x.(T), and it looks like x came from near the beginning of an allocated struct (specifically, starting at the second word of the struct). That allocated struct containing the interface value x was prematurely collected by the garbage collector. The question is why. How long has the containing struct existed? Where do the references to it live? How often are those places updated? Any information like that would help. Thanks. |
Rhys and I looked a little bit into this at Gophercon. That bad error value may have come from a struct { uintptr; error } that was sent over an unbuffered channel of the same. Maybe we are still screwing up the stack barriers or the write barriers there? Edit: update to reflect some uncertanity. We traced through a lot of error results to find this, so maybe we went down the wrong code path, but it seems to match the evidence so far. |
That does smell fishy. Is it reproducible with stack barriers off?
(GODEBUG=gcstackbarrieroff=1)
|
This is the same program as #11644. I'll see if it's reproducible with gcstackbarrieroff=1 (and then also try gccheckmark=1). I've reduced it to the following test, which crashes on darwin/amd64 with GOMAXPROCS=4 after 5-10 seconds:
And with
|
I can reproduce the crash on my Macbook Pro with the sample program. Thanks so much for boiling it down. |
I've further reduced the
The send is still in a multi-case select block (although only one of the cases involves a non-nil channel at runtime), but the receive is now just a basic blocking receive. I wonder if the problematic sequence of events is as follows:
|
Thanks for the test case! I can reproduce this on linux/amd64 as well. I'm looking at it now. |
Back online after the weekend. I have a fix pending, Austin. |
CL https://golang.org/cl/12086 mentions this issue. |
I haven't seen this since updating to from go1.5beta1 to |
With go version go1.5beta1 on linux/amd64, I see the following crash in an http server that serves short-lived requests. The process is stable with go1.4.1.
The appearance of
0xdeaddeaddeaddead
makes me suspicious of memory corruption in the runtime. (@rsc)The text was updated successfully, but these errors were encountered: