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

Data Race in child/child.go #1372

Closed
eikenb opened this issue Apr 23, 2020 · 0 comments · Fixed by #1373
Closed

Data Race in child/child.go #1372

eikenb opened this issue Apr 23, 2020 · 0 comments · Fixed by #1373
Labels
Milestone

Comments

@eikenb
Copy link
Contributor

eikenb commented Apr 23, 2020

I was testing another feature and discovered a data race had slipped into the child/ code in the last commit. It is a race between line...

err := cmd.Wait()

And line...
if c.cmd.ProcessState != nil {

The cmd.Wait() in start() is run in a goroutine and it updates cmd.ProcessState internally. Which that c.cmd.ProcessState access in kill() races with.

Note that triggering this race in production would be hard, which is why I think no one ran into it (or at least reported it).

I'm working on a fix which I will be pushing up a PR for shortly, but wanted an issue for the record.

@eikenb eikenb added the bug label Apr 23, 2020
@eikenb eikenb added this to the 0.25.0 milestone Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant