-
Notifications
You must be signed in to change notification settings - Fork 18.5k
runtime: add crash stack support for wasm #63956
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
Conversation
|
This PR (HEAD: 234dd5a) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/539995. Important tips:
|
234dd5a to
0932b0f
Compare
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/539995. |
|
This PR (HEAD: 0932b0f) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/539995. Important tips:
|
0932b0f to
12e6410
Compare
|
This PR (HEAD: 12e6410) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/539995. Important tips:
|
Currently if morestack on g0 happens the wasm runtime prints
"RuntimeError: memory access out of bounds", which is quite misleading.
By switching to a crash stack we can get better stacktraces
for the error.
There is no way to automate tests for this feature on wasm, since
TestG0StackOverflow relies on spawning a subprocess which is not
supported by the wasm port.
The way I got this tested manually is to comment everything in
TestG0StackOverflow, leaving just runtime.G0StackOverflow().
Then it is a matter of invoking the test:
GOOS=js GOARCH=wasm go test runtime -v -run=TestG0StackOverflow
Change-Id: If2819938d6424da1b4fd7e8e5dc53e8efeeebb6d
12e6410 to
21c12bc
Compare
|
This PR (HEAD: 21c12bc) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/539995. Important tips:
|
|
Message from Mauri de Souza Meneguzzo: Patch Set 5: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/539995. |
|
Message from Cherry Mui: Patch Set 5: Code-Review+2 Please don’t reply on this GitHub thread. Visit golang.org/cl/539995. |
|
Message from Cherry Mui: Patch Set 5: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/539995. |
|
Message from Go LUCI: Patch Set 5: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2023-11-18T04:17:55Z","revision":"e30e6b085172a0012799f740eefc31ae0ef0d94e"} Please don’t reply on this GitHub thread. Visit golang.org/cl/539995. |
|
Message from Cherry Mui: Patch Set 5: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/539995. |
|
Message from Go LUCI: Patch Set 5: This CL has failed the run. Reason: Tryjob golang/try/x_tools-gotip-linux-amd64 has failed with summary (view all results): FAILURE
error: failed to run "test golang.org/x/tools module": exit status 1
Please don’t reply on this GitHub thread. Visit golang.org/cl/539995. |
|
Message from Go LUCI: Patch Set 5: LUCI-TryBot-Result-1 Please don’t reply on this GitHub thread. Visit golang.org/cl/539995. |
…-wasm Change-Id: Icb86206377c61384624bfc3d4eb705e36d6dc5b3
|
This PR (HEAD: 0f7d267) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/539995. Important tips:
|
|
Message from Mauri de Souza Meneguzzo: Patch Set 5: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/539995. |
|
Message from Mauri de Souza Meneguzzo: Patch Set 5: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/539995. |
|
Message from Mauri de Souza Meneguzzo: Patch Set 6: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/539995. |
|
Message from Mauri de Souza Meneguzzo: Patch Set 6: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/539995. |
|
Message from Go LUCI: Patch Set 6: CV cannot start a Run for Please don’t reply on this GitHub thread. Visit golang.org/cl/539995. |
|
Message from Go LUCI: Patch Set 6: LUCI-TryBot-Result-1 Please don’t reply on this GitHub thread. Visit golang.org/cl/539995. |
|
Message from Cherry Mui: Patch Set 6: Code-Review+2 Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/539995. |
|
Message from Go LUCI: Patch Set 6: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2023-11-19T02:27:20Z","revision":"8ccf788a2ec4e83f2a8ffe098b1e0e10e68e6c3a"} Please don’t reply on this GitHub thread. Visit golang.org/cl/539995. |
|
Message from Cherry Mui: Patch Set 6: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/539995. |
|
Message from Go LUCI: Patch Set 6: This CL has failed the run. Reason: Tryjob golang/try/gotip-linux-amd64-newinliner has failed with summary (view all results): FAILURE
error: shard 4: failed to run "go tool dist test -json": exit status 1 Please don’t reply on this GitHub thread. Visit golang.org/cl/539995. |
|
This PR (HEAD: 0d7c396) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/539995. Important tips:
|
|
Message from Mauri de Souza Meneguzzo: Patch Set 7: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/539995. |
|
Message from Cherry Mui: Patch Set 7: Code-Review+2 Run-TryBot+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/539995. |
|
Message from Gopher Robot: Patch Set 7: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/539995. |
|
Message from Gopher Robot: Patch Set 7: TryBot-Result+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/539995. |
|
Message from Cherry Mui: Patch Set 7: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/539995. |
|
Message from David Chase: Patch Set 7: Code-Review+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/539995. |
Currently if morestack on g0 happens the wasm runtime prints
"RuntimeError: memory access out of bounds", which is quite misleading.
By switching to a crash stack we can get better stacktraces
for the error.
There is no way to automate tests for this feature on wasm, since
TestG0StackOverflow relies on spawning a subprocess which is not
supported by the wasm port.
The way I got this tested manually is to comment everything in
TestG0StackOverflow, leaving just runtime.G0StackOverflow().
Then it is a matter of invoking the test:
GOOS=js GOARCH=wasm go test runtime -v -run=TestG0StackOverflow
Change-Id: If450f3ee5209bb32efc1abd0a34b1cc4a29d0c46
GitHub-Last-Rev: 0d7c396
GitHub-Pull-Request: #63956
Reviewed-on: https://go-review.googlesource.com/c/go/+/539995
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
|
This PR is being closed because golang.org/cl/539995 has been merged. |
Currently if morestack on g0 happens the wasm runtime prints
"RuntimeError: memory access out of bounds", which is quite misleading.
By switching to a crash stack we can get better stacktraces
for the error.
There is no way to automate tests for this feature on wasm, since
TestG0StackOverflow relies on spawning a subprocess which is not
supported by the wasm port.
The way I got this tested manually is to comment everything in
TestG0StackOverflow, leaving just runtime.G0StackOverflow().
Then it is a matter of invoking the test: