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

go/runtime/host/sandbox: Fix possible data race #3024

Merged
merged 1 commit into from
Jun 17, 2020

Conversation

kostko
Copy link
Member

@kostko kostko commented Jun 17, 2020

The data race existed because the cancel function that is referenced inside a
goroutine waiting for initialization to complete was unintentionally
overwritten.

Copy link
Member

@ptrus ptrus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just noticed it as well 😁

@kostko kostko force-pushed the kostko/fix/rt-host-cancel-race branch from 83ac3aa to bfc1973 Compare June 17, 2020 12:26
@codecov
Copy link

codecov bot commented Jun 17, 2020

Codecov Report

Merging #3024 into master will increase coverage by 0.27%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3024      +/-   ##
==========================================
+ Coverage   68.45%   68.73%   +0.27%     
==========================================
  Files         367      367              
  Lines       36130    36130              
==========================================
+ Hits        24734    24834     +100     
+ Misses       8233     8148      -85     
+ Partials     3163     3148      -15     
Impacted Files Coverage Δ
go/runtime/host/sandbox/sandbox.go 77.32% <100.00%> (ø)
go/consensus/tendermint/apps/roothash/query.go 68.42% <0.00%> (-10.53%) ⬇️
...ompute/txnscheduler/algorithm/batching/batching.go 78.66% <0.00%> (-6.67%) ⬇️
go/consensus/tendermint/apps/registry/query.go 80.95% <0.00%> (-4.77%) ⬇️
.../consensus/tendermint/apps/epochtime_mock/state.go 78.72% <0.00%> (-4.26%) ⬇️
.../consensus/tendermint/apps/roothash/state/state.go 68.62% <0.00%> (-3.93%) ⬇️
go/consensus/tendermint/registry/registry.go 68.89% <0.00%> (-3.15%) ⬇️
go/worker/compute/merge/committee/node.go 76.47% <0.00%> (-2.46%) ⬇️
go/consensus/tendermint/abci/state.go 69.06% <0.00%> (-2.16%) ⬇️
go/consensus/tendermint/roothash/roothash.go 63.87% <0.00%> (-2.03%) ⬇️
... and 39 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 18471ae...2046573. Read the comment docs.

The data race existed because the cancel function that is referenced inside a
goroutine waiting for initialization to complete was unintentionally
overwritten.
@kostko kostko force-pushed the kostko/fix/rt-host-cancel-race branch from bfc1973 to 2046573 Compare June 17, 2020 12:50
@kostko kostko merged commit b2ac85a into master Jun 17, 2020
@kostko kostko deleted the kostko/fix/rt-host-cancel-race branch June 17, 2020 13:11
@ptrus ptrus mentioned this pull request Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants