Skip to content

runtime: stop single goroutine #31132

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
dlsniper opened this issue Mar 29, 2019 · 6 comments
Open

runtime: stop single goroutine #31132

dlsniper opened this issue Mar 29, 2019 · 6 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. Debugging NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@dlsniper
Copy link
Contributor

During debugging it would be useful to resume all goroutines except a single one, as it's the case in other programming languages.

In #25578 we have the request to resume a single goroutine while all others are stopped so this would be the similar/opposite request.

I'm sorry I don't know what else I could put in this request to make it more useful. Feel free to edit it with more details. Thank you.

@andybons andybons changed the title runtime: Stop single goroutine runtime: stop single goroutine Apr 3, 2019
@andybons andybons added this to the Unplanned milestone Apr 3, 2019
@andybons andybons added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 3, 2019
@andybons
Copy link
Member

andybons commented Apr 3, 2019

@aclements

@pellared
Copy link
Contributor

pellared commented Dec 14, 2020

I would say that we probably need support for pausing and resuming the execution of a given goroutine.
More context: go-delve/delve#2262

@aclements
Copy link
Member

What's the use case for stopping a single goroutine? I can definitely see the value of resuming a single goroutine (#25578), but stopping a single goroutine is less clear to me. It may be that a single solution handles both cases, but I wanted to make sure I understand.

@pellared
Copy link
Contributor

pellared commented Sep 6, 2022

What's the use case for stopping a single goroutine? I can definitely see the value of resuming a single goroutine (#25578), but stopping a single goroutine is less clear to me. It may be that a single solution handles both cases, but I wanted to make sure I understand.

It helps "reproduce" possible improper synchronization (race conditions) in concurrent code during debugging.

Like freezing and thawing threads in the debugger in ecosystems supporting threads.

Reference go-delve/delve#2262

@rohantmp
Copy link

For example, I want the apiserver I'm debugging to be able to handle other requests while I debug one handler. The health check fails when I'm debugging.

@adriancuadrado
Copy link

Any progress on this?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. Debugging NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

8 participants