You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our weekly execution (via github actions) of our unit tests reports multiple data races last night. Executed via go test -mod=readonly -race ./.... I copied the report part to the end of the issue.
The relevant code mainly calls two functions to find child processes of a forked process:
import "github.com/shirou/gopsutil/process" // v2.20.9
// ...
self, err := process.NewProcess(int32(os.Getpid()))
require.NoError(t, err)
exe, err := self.Exe()
require.NoError(t, err)
processList, err := process.Processes()
require.NoError(t, err)
// use processList and exe to find the first child process
Due to go test this snippet will be executed multiple times in parallel.
To Reproduce
I failed to reproduce this - running the tests again locally (Mac os) and on github actions did not fail again.
We have this snippet for some time in the code base already and so far it didn't fail.
Expected behavior go test -race should not report a data race
Environment (please complete the following information):
Linux: [paste contents of /etc/os-release and the result of uname -a]
Maybe dependabot didn't suggest the upgrade because it is a major version bump in semver.
Nevertheless, we didn't break backward compatibility if you don't switch to the /v3 packages, which are now module aware (there has been some minor API changes between v2 and v3).
Describe the bug
Our weekly execution (via github actions) of our unit tests reports multiple data races last night. Executed via
go test -mod=readonly -race ./...
. I copied the report part to the end of the issue.The relevant code mainly calls two functions to find child processes of a forked process:
Due to
go test
this snippet will be executed multiple times in parallel.To Reproduce
I failed to reproduce this - running the tests again locally (Mac os) and on github actions did not fail again.
We have this snippet for some time in the code base already and so far it didn't fail.
Expected behavior
go test -race
should not report a data raceEnvironment (please complete the following information):
/etc/os-release
and the result ofuname -a
]DATA RACE OUTPUT
The text was updated successfully, but these errors were encountered: