-
Notifications
You must be signed in to change notification settings - Fork 18k
runtime: handle windows callback on non-go thread #25575
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
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
I signed it! |
CLAs look good, thanks! |
@bradfitz can you, please, check to see why Gerrit CL has not been created for this PR. @billziss-gh I just submitted my change https://go-review.googlesource.com/c/go/+/114755 with the test. Could you, please, incorporate into your PR now? Thank you. Alex |
@andybons owns the Gerritbot. Andy? |
Lucky Andy. Thank you, Brad. Alex |
@alexbrainman thanks for pushing this forward so fast. I am unclear what you want me to do though. Do you want me to pull your latest commit into my fork so that it is included in this PR? |
Yes, please include my change in your PR. And remove test line with t.Skip in it, so we can actually verify your change works. Thank you. Alex |
Alex, will do. Thanks. |
Once your change is accepted and submitted it will go to the top of master as single commit. So feel free to rebase and sqwash your changes away. Alex |
Understood. Thanks! |
Ok. Rebased, squashed and pushed -f. Somehow I didn't break anything (I think). Beginners luck! |
Cool. We will have to wait for Andy now to fix Gobot (that should push your change into our Gerrit). Then others can review and submit your code. Thank you. Alex |
This PR (HEAD: 36a8ac8) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/#/c/go/+/114802 to see it. Tip: You can toggle comments from me using the |
Message from Gobot Gobot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/114802. |
Lucky me indeed :) Thanks for your patience on this! |
Thank you for fixing this. On your weekend. Alex |
Message from Alex Brainman: Patch Set 1: Run-TryBot+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/114802. |
Message from Gobot Gobot: Patch Set 1: TryBots beginning. Status page: https://farmer.golang.org/try?commit=33e52a95 Please don’t reply on this GitHub thread. Visit golang.org/cl/114802. |
Message from Gobot Gobot: Patch Set 1: TryBot-Result+1 TryBots are happy. Please don’t reply on this GitHub thread. Visit golang.org/cl/114802. |
Message from Alex Brainman: Patch Set 1: Code-Review+1 I am sure Austin wants to see this. Alex Please don’t reply on this GitHub thread. Visit golang.org/cl/114802. |
Message from Ian Lance Taylor: Patch Set 1: (3 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/114802. |
Message from Bill Zissimopoulos: Patch Set 1:
Disclaimer: I have a very superficial understanding of the Go runtime, so my analysis may be incomplete or plain wrong. Lets first rewrite the crucial
I note that all variables may only be updated with
Now for an analysis of
The danger case is any of the minus variables getting incremented between the call to
If Please don’t reply on this GitHub thread. Visit golang.org/cl/114802. |
@alexbrainman thank you for your help with the process so far. I am wondering if I have misunderstood the process and there is something I need to do at this point or we are simply waiting for all reviewers to respond. |
@billziss-gh @ianlancetaylor made 3 comments that you need to attend. He suggested you add comment here https://go-review.googlesource.com/c/go/+/114802/1/src/runtime/proc.go#1296 and here https://go-review.googlesource.com/c/go/+/114802/1/src/runtime/proc.go#1621 You should add comments and push new version (with the comments). Ian also questioned correctness of your change here https://go-review.googlesource.com/c/go/+/114802/1/src/runtime/proc.go#4220 and I see that you replied to his questions. So maybe add comments as requested and push the change, or explain why you think comments are not needed. Anyway https://go-review.googlesource.com/c/go/+/114802 has only patch set number 1, once you pushed another change, it will go to 2, and then 3 and so on. And to be sure, send PTAL to confirm once you want some action from reviewers. And do not hesitate pinging us on this PR or on https://go-review.googlesource.com/c/go/+/114802 if you need some help. Alex |
- add comments as per reviewer
This PR (HEAD: 51f9bd2) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/#/c/go/+/114802 to see it. Tip: You can toggle comments from me using the |
@alexbrainman sorry for the delay. I have added some comments as per the reviewer's request. So "please take another look". |
Message from Alex Brainman: Patch Set 2: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/114802. |
- additional comments as per reviewer
This PR (HEAD: d429e3e) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/#/c/go/+/114802 to see it. Tip: You can toggle comments from me using the |
Thank you. Per your instructions I have added the additional comment: "See issue #6751 for details." |
@alexbrainman @ianlancetaylor please take another look. |
Message from Alex Brainman: Patch Set 3: Code-Review+1 Ian, please, review this. I would have done it myself, but I do not trust myself with scheduler code. Thank you. Alex Please don’t reply on this GitHub thread. Visit golang.org/cl/114802. |
I just pinged Ian on https://go-review.googlesource.com/c/go/+/114802 in Gerrit. Hopefully he will get back to you when he can. You can always comment here or on Gerrit directly (you should be able to comment there and everything). Alex |
Message from Ian Lance Taylor: Patch Set 3: Run-TryBot+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/114802. |
Message from Gobot Gobot: Patch Set 3: TryBots beginning. Status page: https://farmer.golang.org/try?commit=b0cd0ffe Please don’t reply on this GitHub thread. Visit golang.org/cl/114802. |
Message from Gobot Gobot: Patch Set 3: TryBot-Result+1 TryBots are happy. Please don’t reply on this GitHub thread. Visit golang.org/cl/114802. |
Message from Ian Lance Taylor: Patch Set 3: Code-Review+2 Thanks! Please don’t reply on this GitHub thread. Visit golang.org/cl/114802. |
Adds an extra M in mstartm0 and accounts for it in checkdead. This allows Windows callbacks created with syscall.NewCallback and syscall.NewCallbackCDecl to be called on a non-Go thread. Fixes #6751 Change-Id: I57626bc009a6370b9ca0827ab64b14b01dec39d4 GitHub-Last-Rev: d429e3e GitHub-Pull-Request: #25575 Reviewed-on: https://go-review.googlesource.com/114802 Reviewed-by: Alex Brainman <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
This PR is being closed because golang.org/cl/114802 has been merged. |
Thank you @alexbrainman for your help and @ianlancetaylor for your review. |
Thank you @billziss-gh for fixing very old issue. Alex |
Adds an extra M in mstartm0 and accounts for it in checkdead. This allows Windows callbacks created with syscall.NewCallback and syscall.NewCallbackCDecl to be called on a non-Go thread.
Fixes #6751