Skip to content

os/exec: using lsof costs 100% CPU and blocked #53385

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

Closed
shentupenghui opened this issue Jun 15, 2022 · 1 comment
Closed

os/exec: using lsof costs 100% CPU and blocked #53385

shentupenghui opened this issue Jun 15, 2022 · 1 comment

Comments

@shentupenghui
Copy link

What version of Go are you using (go version)?

go version go1.17.5 linux/amd64

Does this issue reproduce with the latest release?

Yes, i've upgrade go to latest version and rebuild project, still happens

What operating system and processor architecture are you using (go env)?

image

What did you do?

how i use exec in my code:
image

What did you expect to see?

I expect it runs both normally and quickly just as before like used in terminal

What did you see instead?

this command is blocked for about 5min, cost 100% CPU, and return nothing
image

@shentupenghui shentupenghui changed the title affected/package: os/exec os/exec: using lsof costs 100% CPU and blocked Jun 15, 2022
@mengzhuo
Copy link
Contributor

Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.

For questions please refer to https://github.com/golang/go/wiki/Questions


p.s. You're executing sh -c lsof -i:%d without quotes around lsof.

@golang golang locked and limited conversation to collaborators Jun 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants