Skip to content

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

@shentupenghui

Description

@shentupenghui

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions