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: programs sometimes stall at launch #37254

Closed
josharian opened this issue Feb 17, 2020 · 3 comments
Closed

runtime: programs sometimes stall at launch #37254

josharian opened this issue Feb 17, 2020 · 3 comments
Milestone

Comments

@josharian
Copy link
Contributor

@josharian josharian commented Feb 17, 2020

A weird thing has been happening to me recently, and I'm not sure how to debug it.

I'll run go install cmd/compile to install a modified compiler. (In this instance, the modifications were envvar-guarded logging, so it was not a broken compiler.)

Then I'll execute the compiler. To rule out any go tool problems or the like, I am running the compiler directly using an absolute path: /Users/josh/go/tip/pkg/tool/darwin_amd64/compile -S x.go. And the compiler hangs.

If I send a SIGQUIT, I don't get a backtrace:

$ /Users/josh/go/tip/pkg/tool/darwin_amd64/compile -S x.go
^\[1]    12198 quit       /Users/josh/go/tip/pkg/tool/darwin_amd64/compile -S x.go

It's as if the runtime stalled during launch.

Subsequent compiler runs usually work as normal.

I can't reproduce reliably, but it has happened enough that I think I'm probably not going crazy.

What should I do to debug next time this happens?

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Feb 17, 2020

In a different terminal, run gdb on the executable, and attach to the stalled process. Do a backtrace to find out where it has stalled.

(Perhaps delve supports attaching to a process also, I don't know.)

@toothrot toothrot added this to the Backlog milestone Feb 18, 2020
@josharian

This comment has been minimized.

Copy link
Contributor Author

@josharian josharian commented Feb 24, 2020

This stopped happening after I filed the issue (of course). I will re-open, with gdb info, if it occurs again.

@josharian josharian closed this Feb 24, 2020
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Mar 12, 2020

Change https://golang.org/cl/223240 mentions this issue: runtime: throttle signal senders when receivers aren't making progress

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.