Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix race condition when process is created and
proc.wait()
is calle…
…d at the same time Note: The race condition issue occurred in this job: https://github.com/rhysd/actionlint/actions/runs/7942341834/job/21685544722 ``` WARNING: DATA RACE Write at 0x00c0001dcb00 by main goroutine: runtime.racewrite() <autogenerated>:1 +0x1e github.com/rhysd/actionlint.(*concurrentProcess).wait() /Users/runner/work/actionlint/actionlint/process.go:82 +0x134b github.com/rhysd/actionlint.(*Linter).LintFiles() /Users/runner/work/actionlint/actionlint/linter.go:362 +0x1346 github.com/rhysd/actionlint.(*Linter).LintDir() /Users/runner/work/actionlint/actionlint/linter.go:285 +0x26e github.com/rhysd/actionlint.(*Linter).LintRepository() /Users/runner/work/actionlint/actionlint/linter.go:256 +0x2b5 github.com/rhysd/actionlint.(*Command).runLinter() /Users/runner/work/actionlint/actionlint/command.go:91 +0x34b github.com/rhysd/actionlint.(*Command).Main() /Users/runner/work/actionlint/actionlint/command.go:180 +0xcad main.main() /Users/runner/work/actionlint/actionlint/cmd/actionlint/main.go:15 +0x124 Previous read at 0x00c0001dcb00 by goroutine 6: runtime.raceread() <autogenerated>:1 +0x1e github.com/rhysd/actionlint.(*concurrentProcess).run() /Users/runner/work/actionlint/actionlint/process.go:71 +0xab github.com/rhysd/actionlint.(*externalCommand).run() /Users/runner/work/actionlint/actionlint/process.go:113 +0x7cd github.com/rhysd/actionlint.(*RuleShellcheck).runShellcheck() /Users/runner/work/actionlint/actionlint/rule_shellcheck.go:186 +0x615 github.com/rhysd/actionlint.(*RuleShellcheck).VisitStep() /Users/runner/work/actionlint/actionlint/rule_shellcheck.go:60 +0x1ef github.com/rhysd/actionlint.(*Visitor).visitStep() /Users/runner/work/actionlint/actionlint/pass.go:139 +0x108 github.com/rhysd/actionlint.(*Visitor).visitJob() /Users/runner/work/actionlint/actionlint/pass.go:109 +0x2cd github.com/rhysd/actionlint.(*Visitor).Visit() /Users/runner/work/actionlint/actionlint/pass.go:68 +0x29c github.com/rhysd/actionlint.(*Linter).check() /Users/runner/work/actionlint/actionlint/linter.go:570 +0x20b9 github.com/rhysd/actionlint.(*Linter).LintFiles.func1() /Users/runner/work/actionlint/actionlint/linter.go:352 +0x246 golang.org/x/sync/errgroup.(*Group).Go.func1() /Users/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:78 +0x91 Goroutine 6 (running) created at: golang.org/x/sync/errgroup.(*Group).Go() /Users/runner/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:75 +0x124 github.com/rhysd/actionlint.(*Linter).LintFiles() /Users/runner/work/actionlint/actionlint/linter.go:338 +0x79d github.com/rhysd/actionlint.(*Linter).LintDir() /Users/runner/work/actionlint/actionlint/linter.go:285 +0x26e github.com/rhysd/actionlint.(*Linter).LintRepository() /Users/runner/work/actionlint/actionlint/linter.go:256 +0x2b5 github.com/rhysd/actionlint.(*Command).runLinter() /Users/runner/work/actionlint/actionlint/command.go:91 +0x34b github.com/rhysd/actionlint.(*Command).Main() /Users/runner/work/actionlint/actionlint/command.go:180 +0xcad main.main() /Users/runner/work/actionlint/actionlint/cmd/actionlint/main.go:15 +0x124 ```
- Loading branch information