Skip to content
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/trace: add missing events for the locked g in extra M. #53284

Closed
wants to merge 2 commits into from

Conversation

doujiang24
Copy link
Contributor

@doujiang24 doujiang24 commented Jun 8, 2022

Extra Ms may lead to the "no consistent ordering of events possible" error when parsing trace file with cgo enabled, since:

  1. The gs in the extra Ms may be in _Gdead status while starting trace by invoking runtime.StartTrace,
  2. and these gs will trigger traceEvGoSysExit events in runtime.exitsyscall when invoking go functions from c,
  3. then, the events of those gs are under non-consistent ordering, due to missing the previous events.

Add two events, traceEvGoCreate and traceEvGoInSyscall, in runtime.StartTrace, will make the trace parser happy.

Fixes #29707

@gopherbot
Copy link
Contributor

This PR (HEAD: 4b44fba) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/411034 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from Michael Pratt:

Patch Set 1: Run-TryBot+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 1: TryBot-Result-1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: 05d9db0) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/411034 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from DeJiang Zhu:

Patch Set 2:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Michael Pratt:

Patch Set 2: Run-TryBot+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 2:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 2: TryBot-Result+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Michael Pratt:

Patch Set 2:

(8 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@doujiang24 doujiang24 changed the title runtime/trace: missing events for the locked g in extra M. runtime/trace: add missing events for the locked g in extra M. Jun 11, 2022
@gopherbot
Copy link
Contributor

This PR (HEAD: aaa997c) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/411034 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from DeJiang Zhu:

Patch Set 3:

(8 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: 195d133) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/411034 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from DeJiang Zhu:

Patch Set 4:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from DeJiang Zhu:

Patch Set 4:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Michael Pratt:

Patch Set 4:

(4 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: 69830d4) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/411034 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from DeJiang Zhu:

Patch Set 5:

(6 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from DeJiang Zhu:

Patch Set 5:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from DeJiang Zhu:

Patch Set 5:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Michael Pratt:

Patch Set 5: Run-TryBot+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 5:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 5:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 5: TryBot-Result-1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: 7bf9b52) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/411034 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

This PR (HEAD: ff6dbed) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/411034 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from DeJiang Zhu:

Patch Set 7:

(3 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Michael Pratt:

Patch Set 7: Run-TryBot+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 7:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Michael Pratt:

Patch Set 7:

(5 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 7: TryBot-Result+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: e3b5b17) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/411034 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from DeJiang Zhu:

Patch Set 8:

(5 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Michael Pratt:

Patch Set 8: Run-TryBot+1 Code-Review+2


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 8:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 8: TryBot-Result+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from DeJiang Zhu:

Patch Set 8:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from DeJiang Zhu:

Patch Set 8:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Michael Pratt:

Patch Set 8:

(3 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

This PR (HEAD: 2521650) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/411034 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

This PR (HEAD: 445de8e) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/411034 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Contributor

Message from DeJiang Zhu:

Patch Set 10:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Michael Knyszek:

Patch Set 10: Code-Review+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Michael Pratt:

Patch Set 10: Run-TryBot+1 Auto-Submit+1 Code-Review+2


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 10:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/411034.
After addressing review feedback, remember to publish your drafts!

gopherbot pushed a commit that referenced this pull request Aug 12, 2022
Extra Ms may lead to the "no consistent ordering of events possible" error when parsing trace file with cgo enabled, since:
1. The gs in the extra Ms may be in `_Gdead` status while starting trace by invoking `runtime.StartTrace`,
2. and these gs will trigger `traceEvGoSysExit` events in `runtime.exitsyscall` when invoking go functions from c,
3. then, the events of those gs are under non-consistent ordering, due to missing the previous events.

Add two events, `traceEvGoCreate` and `traceEvGoInSyscall`, in `runtime.StartTrace`, will make the trace parser happy.

Fixes #29707

Change-Id: I7cc4b80822d2c46591304a59c9da2c9fc470f1d0
GitHub-Last-Rev: 445de8e
GitHub-Pull-Request: #53284
Reviewed-on: https://go-review.googlesource.com/c/go/+/411034
Run-TryBot: Michael Pratt <[email protected]>
Reviewed-by: Michael Knyszek <[email protected]>
Auto-Submit: Michael Pratt <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Michael Pratt <[email protected]>
@gopherbot
Copy link
Contributor

This PR is being closed because golang.org/cl/411034 has been merged.

@gopherbot gopherbot closed this Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cmd/trace: "failed to parse trace: no consistent ordering of events possible"
2 participants