-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: crash on Plan 9 since CL 46033 #22227
Comments
After disabling the use of template thread in newm, the build passes. However, I get another issue when running the net tests:
This issue seems to disappear once I add a call to runtime.UnlockOSThread in newAsyncIO. Why is it necessary? Also, why the template thread doesn't work on Plan 9? |
Change https://golang.org/cl/70231 mentions this issue: |
Change https://golang.org/cl/70450 mentions this issue: |
The "lock count" panics are related to the change to terminate locked OS threads in CL 46038 (see goexit0). As I said earlier, this issue can be worked around by calling runtime.UnlockOSThread in newAsyncIO (see CL 70450), so the OS threads are reused instead of being terminated. I'm not sure why I get "lock count" panics when locked OS threads are terminated. |
Any help would be kindly appreciated. |
CC @aclements |
The "lock count" panic means that the lock count of the m is negative. That clearly shouldn't happen, so the question is why it does happen. Can you get a stack trace of where it happens? |
I couldn't manage to get a proper stack trace. It looks like the stacks are corrupted and it usually ends with a recursive panic. The output usually looks like:
It looks like there is an issue in the way OS threads are terminated on Plan 9 and the stacks end being corrupted. |
Change https://golang.org/cl/71230 mentions this issue: |
To sum it up, there are two issues on Plan 9 caused by the recent runtime changes.
The first issue prevents Go to be compiled because cmd/go uses os.StartProcess, which uses runtime.LockOSThread. Once the first issue worked around, the second issues prevents Go to complete the net tests, because implementation of network timelines use runtime.LockOSThread. |
CL 46033 added a "template thread" mechanism to allow creation of thread with a known-good state from a thread of unknown state. However, we are experiencing issues on Plan 9 with programs using the os/exec and net package. These package are relying on runtime.LockOSThread. Updates #22227. Change-Id: I85b71580a41df9fe8b24bd8623c064b6773288b0 Reviewed-on: https://go-review.googlesource.com/70231 Run-TryBot: David du Colombier <0intro@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
CL 46037 and CL 46038 implemented termination of locked OS threads when the goroutine exits. However, this behavior leads to crashes of Go programs using runtime.LockOSThread on Plan 9. This is notably the case of the os/exec and net packages. This change disables termination of locked OS threads on Plan 9. Updates #22227. Change-Id: If9fa241bff1c0b68e7e9e321e06e5203b3923212 Reviewed-on: https://go-review.googlesource.com/71230 Reviewed-by: Austin Clements <austin@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
@0intro Do you know what the status of this issue is? Thanks. |
Change https://golang.org/cl/233797 mentions this issue: |
The plan9-arm builder is currently passing fairly reliably on the dashboard, whereas the plan9-386-0intro builder is frequently failing with an "unexpected fault address". Until the plan9-386-0intro build is fixed, the plan9-arm builder seems more useful as a SlowBot to check architecture-agnostic changes that affect plan9. Updates golang/go#35456 Updates golang/go#22227 Change-Id: Ib5ecddafec91ca9274f9f0e15cb98621b41dda85 Reviewed-on: https://go-review.googlesource.com/c/build/+/233797 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
#22227 (comment) mentions
2021-11-18T22:40:42-2375b6e/plan9-386-0intro |
Found new dashboard test flakes for:
2023-03-15 07:19 plan9-arm go@71f82df1 cmd/vet.TestVet (log)
|
Since the runtime.LockOSThread change in CL 46033, Go programs are crashing on Plan 9 when running commands with os/exec.
See https://build.golang.org/log/c14eefc1c70d14ad2d0f768ff9f13222fa8d435c
The text was updated successfully, but these errors were encountered: