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
runtime: GC crash "checkmark found unmarked object" #17694
Comments
More detail from the goroutine we're scanning:
Specifically, we're scanning 0x30 bytes worth of "arguments" of One possibility is that we're screwing up the barriers on the stack-to-stack copy newproc does to set up the new frame. Another possibility is that the liveness map is wrong at this point. It's also a bit weird that func1.1.1 has 0x30 bytes of argument frame, but is "called" by goexit, whose frame is always 8 bytes and doesn't have room for arguments. This is probably not an issue, since I think you'd see the same thing if these were genuine arguments to the go statement rather than captures. |
Unsurprisingly, bisect implicates bd640c8. But that just says we're missing something on the stack that mark termination was previously patching up for us. |
More observations:
|
Found it. The goroutine stack-to-stack copy was a red herring. The problem is that the pointer came over an unbuffered channel. While we have the appropriate stack-to-stack write barriers when the receiver is blocked and the sender is writing to the receiver's stack, we don't have the barriers when the sender is blocked and the receiver is reading from the sender's stack (since we didn't need them before). I'll send a CL to fix this. I also need to check that select is doing the right thing. |
CL https://golang.org/cl/32450 mentions this issue. |
With GOMAXPROCS=1, this program terminates normally, but otherwise, on 90% of runs, it crashes with the following output:
The text was updated successfully, but these errors were encountered: