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 panic during wrappedConn close at hammertime #11219

Merged
merged 3 commits into from Apr 27, 2020

Conversation

zeripath
Copy link
Contributor

When reviewing #10549 there is a subtle race during forced shutdown/hammertime that can lead to a panic. This is relatively benign - but it's clearly distracting from the real problem.

Please note this is not the cause of #10549 and will not fix that issue - that issue is a deadlock within the DB.

Signed-off-by: Andrew Thornton art27@cantab.net

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath added this to the 1.12.0 milestone Apr 26, 2020
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Apr 26, 2020
@lafriks
Copy link
Member

lafriks commented Apr 26, 2020

Lint error

modules/graceful/server.go Outdated Show resolved Hide resolved
@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 Apr 26, 2020
@codecov-io
Copy link

Codecov Report

Merging #11219 into master will increase coverage by 0.00%.
The diff coverage is 12.50%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #11219   +/-   ##
=======================================
  Coverage   43.19%   43.20%           
=======================================
  Files         604      604           
  Lines       86050    86056    +6     
=======================================
+ Hits        37170    37180   +10     
+ Misses      44288    44286    -2     
+ Partials     4592     4590    -2     
Impacted Files Coverage Δ
modules/markup/markdown/goldmark.go 37.10% <ø> (+0.14%) ⬆️
modules/graceful/server.go 46.93% <12.50%> (-2.35%) ⬇️
modules/indexer/stats/queue.go 62.50% <0.00%> (-18.75%) ⬇️
modules/indexer/stats/db.go 40.62% <0.00%> (-9.38%) ⬇️
modules/git/utils.go 65.67% <0.00%> (-4.48%) ⬇️
modules/git/repo.go 51.04% <0.00%> (+0.41%) ⬆️
models/issue.go 51.86% <0.00%> (+0.46%) ⬆️
modules/notification/webhook/webhook.go 40.20% <0.00%> (+0.58%) ⬆️
modules/queue/unique_queue_disk_channel.go 55.76% <0.00%> (+1.92%) ⬆️
services/pull/patch.go 69.23% <0.00%> (+3.49%) ⬆️

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 9f959ac...50a4b25. Read the comment docs.

@guillep2k guillep2k merged commit 0e799c2 into go-gitea:master Apr 27, 2020
@zeripath zeripath deleted the prevent-panic-at-hammertime branch April 30, 2020 18:57
ydelafollye pushed a commit to ydelafollye/gitea that referenced this pull request Jul 31, 2020
* Prevent panic during wrappedConn close at hammertime

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Update modules/graceful/server.go

* Fix extraneous debug in goldmark.go

Signed-off-by: Andrew Thornton <art27@cantab.net>
@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
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