-
Notifications
You must be signed in to change notification settings - Fork 18k
runtime: split stack overflow on *-386 #35349
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
The only hit on greplogs in recent months which does not look like #22553 is 2019-09-23T16:50:00-a14efb1/plan9-386-0intro. |
Well that's strange. I can't think of any reason why that error would not always happen. There aren't any random elements that I can see. |
With a garbage collector, there are always random elements. (Is it possible that this has something to do with the GC's stack-shrinking?) |
Looks like it's always |
In each case the stack trace looks approximately like
|
That makes it even stranger, because that function is literally trivial: go/src/cmd/compile/internal/gc/ssa.go Lines 6792 to 6794 in 543c6d2
|
So, maybe something to do with inlining? |
That function is trivial, but that's just the function where the problem is noticed. The function that is pushing the stack too low is |
OK, let's consider the possibility of an ill-timed The prologue of
So it seems to me that we would be in trouble if something shrank the stack while executing from address 0x82104f3 through address 0x82104fa. But I don't see any way that could happen. The runtime will not shrink the stack of a goroutine that was preempted due to a signal. I have not been able to recreate the problem on my laptop. |
Just a guess:
this is loading G from TLS. If it is preempted between these two instructions, parked, and then resumed on a different thread, the TLS address may become invalid (still pointing to the TLS in the old thread), therefore may load a wrong stack bound. If this is the case, two-instruction TLS access probably needs to be marked nonpreemptible. |
Change https://golang.org/cl/206903 mentions this issue: |
https://storage.googleapis.com/go-build-log/2a4850e8/linux-386_a62e5e86.log from the https://golang.org/cl/205057 TryBot.
/cc @ianlancetaylor @aclements
The text was updated successfully, but these errors were encountered: