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

Prevent double waitgroup decrement #10170

Merged
merged 6 commits into from Feb 7, 2020

Conversation

zeripath
Copy link
Contributor

@zeripath zeripath commented Feb 6, 2020

A user in discourse has discovered that under heavy loads it is possible to cause a double decrement in the server connection waitgroup.

This PR prevents this.

@zeripath zeripath added this to the 1.12.0 milestone Feb 6, 2020
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Feb 6, 2020
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 6, 2020
modules/graceful/server.go Outdated Show resolved Hide resolved
modules/graceful/server.go Outdated Show resolved Hide resolved
@codecov-io
Copy link

codecov-io commented Feb 6, 2020

Codecov Report

Merging #10170 into master will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10170      +/-   ##
==========================================
+ Coverage   43.41%   43.43%   +0.01%     
==========================================
  Files         576      576              
  Lines       79642    79642              
==========================================
+ Hits        34580    34590      +10     
+ Misses      40786    40777       -9     
+ Partials     4276     4275       -1
Impacted Files Coverage Δ
modules/process/manager.go 74.69% <0%> (-3.62%) ⬇️
modules/queue/workerpool.go 45.55% <0%> (-1.07%) ⬇️
models/gpg_key.go 55.37% <0%> (+0.55%) ⬆️
modules/log/event.go 65.64% <0%> (+1.02%) ⬆️
services/pull/check.go 35.8% <0%> (+2.46%) ⬆️
services/pull/patch.go 62.89% <0%> (+2.51%) ⬆️
services/pull/temp_repo.go 31.62% <0%> (+2.56%) ⬆️

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 014f9c0...5e85af9. Read the comment docs.

@guillep2k
Copy link
Member

The tests that failed before the latest commit (*int32 vs. int32) show that this was a real problem.

@zeripath zeripath merged commit c512bfd into go-gitea:master Feb 7, 2020
guillep2k pushed a commit to guillep2k/gitea that referenced this pull request Feb 7, 2020
* Prevent double waitgroup decrement
zeripath added a commit that referenced this pull request Feb 7, 2020
* Prevent double waitgroup decrement

Co-authored-by: zeripath <art27@cantab.net>
@zeripath zeripath added the backport/done All backports for this PR have been created label Feb 7, 2020
@zeripath zeripath deleted the prevent-double-wg-decrement branch February 9, 2020 08:01
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants