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

Panic in RedisQueue on Terminate #9909

Closed
lunny opened this issue Jan 21, 2020 · 1 comment · Fixed by #9910
Closed

Panic in RedisQueue on Terminate #9909

lunny opened this issue Jan 21, 2020 · 1 comment · Fixed by #9910
Labels
skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/bug
Milestone

Comments

@lunny
Copy link
Member

lunny commented Jan 21, 2020

When set

[queue.task]
TYPE = redis
CONN_STR = "addrs=127.0.0.1:6379 db=0"

[queue.mail]
TYPE = redis
CONN_STR = "addrs=127.0.0.1:6379 db=0"

and then stop gitea

panic: close of nil channel

goroutine 63 [running]:
code.gitea.io/gitea/modules/queue.(*RedisQueue).Terminate(0xc00036b730)
	/Volumes/data/Projects/gitea/gitea/modules/queue/queue_redis.go:219 +0x153
code.gitea.io/gitea/modules/graceful.(*Manager).RunAtTerminate.func1(0xc00018a960, 0xc00044e400, 0x6d7e940, 0xc0000de008)
	/Volumes/data/Projects/gitea/gitea/modules/graceful/manager.go:126 +0x110
created by code.gitea.io/gitea/modules/graceful.(*Manager).RunAtTerminate
	/Volumes/data/Projects/gitea/gitea/modules/graceful/manager.go:123 +0x7a
panic: close of nil channel

goroutine 202 [running]:
code.gitea.io/gitea/modules/queue.(*RedisQueue).Terminate(0xc000148700)
	/Volumes/data/Projects/gitea/gitea/modules/queue/queue_redis.go:219 +0x153
code.gitea.io/gitea/modules/graceful.(*Manager).RunAtTerminate.func1(0xc00018a960, 0xc00198e700, 0x6d7e940, 0xc0000de008)
	/Volumes/data/Projects/gitea/gitea/modules/graceful/manager.go:126 +0x110
created by code.gitea.io/gitea/modules/graceful.(*Manager).RunAtTerminate
	/Volumes/data/Projects/gitea/gitea/modules/graceful/manager.go:123 +0x7a
@lunny lunny added the type/bug label Jan 21, 2020
@lunny lunny added this to the 1.12.0 milestone Jan 21, 2020
@lunny lunny added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Jan 21, 2020
@zeripath
Copy link
Contributor

The terminated channel has been missed being created.

@zeripath zeripath changed the title Stopping gitea panic Panic in RedisQueue on Terminate Jan 21, 2020
@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
skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants