go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
44.19k stars 5.42k forks source link

Gitea panic #7860

Closed rvillablanca closed 4 years ago

rvillablanca commented 5 years ago

https://gist.github.com/rvillablanca/16ca66169dd2c2ddf72bcf9afb5f511e

Description

Gitea just crashed. I don't know how this happened but it seems related with gravatar library.

Screenshots

No screenshots

lunny commented 5 years ago

Maybe @strk could give some help.

strk commented 5 years ago

Someone with access to the logs can tell what paniced...

lunny commented 5 years ago

@strk Where could we send an issue for package strk.kbt.io/projects/go/libravatar ?

lunny commented 5 years ago

It seems a lock is need for that map read and write. image

strk commented 5 years ago

On Thu, Aug 15, 2019 at 06:11:07AM -0700, Lunny Xiao wrote:

@strk where we could send an issue for package strk.kbt.io/projects/go/libravatar ?

As written to that web page: to my email address, or to the gitlab mirror.

rvillablanca commented 4 years ago

Is there any possibility to catch this panic ?

image

lunny commented 4 years ago

It should be an upstream library problem.

rvillablanca commented 4 years ago

It should be an upstream library problem.

I agree with this, it is a known library problem but it is also shutting down gitea. I think this should be logged and handled in every request by default in all http handlers. Is it allowed for an unhandled panic to crash the whole app ?

guillep2k commented 4 years ago

@lunny @strk I've just filed a PR in go-libravatar to address this.