Gogs服务异常退出:panic: runtime error: invalid memory address or nil pointer dereference

请先搜索确保没有重复发帖。

Gogs 版本:0.11.91.0811
系统类型及版本:SUSE LINUX
数据库:MySQL
问题描述:

gogs服务有时会异常退出, 查看运行时日志,发现以下错误:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0xc94cf7]

goroutine 2483 [running]:
github.com/gogs/gogs/models.(*Repository).getOwner(…)
/home/vagrant/gopath/src/github.com/gogs/gogs/models/repo.go:399
github.com/gogs/gogs/models.(*Repository).mustOwner(0x0, 0x13664a0, 0xc0000b5930, 0xff8dc0)
/home/vagrant/gopath/src/github.com/gogs/gogs/models/repo.go:412 +0x27
github.com/gogs/gogs/models.(*Repository).repoPath(0x0, 0x13664a0, 0xc0000b5930, 0x44, 0xc003341d10)
/home/vagrant/gopath/src/github.com/gogs/gogs/models/repo.go:532 +0x43
github.com/gogs/gogs/models.(*Repository).RepoPath(…)
/home/vagrant/gopath/src/github.com/gogs/gogs/models/repo.go:536
github.com/gogs/gogs/models.(*PullRequest).PushToBaseRepo(0xc0000dcc40, 0x0, 0x0)
/home/vagrant/gopath/src/github.com/gogs/gogs/models/pull.go:639 +0x127
github.com/gogs/gogs/models.addHeadRepoTasks(0xc0024ea3b0, 0x1, 0x2)
/home/vagrant/gopath/src/github.com/gogs/gogs/models/pull.go:721 +0x14d
github.com/gogs/gogs/models.AddTestPullRequestTask(0xc002514c00, 0x2c, 0xc002820550, 0x6, 0xc001eda700)
/home/vagrant/gopath/src/github.com/gogs/gogs/models/pull.go:766 +0x704
created by github.com/gogs/gogs/models.(*PullRequest).Merge.func1
/home/vagrant/gopath/src/github.com/gogs/gogs/models/pull.go:199 +0xba
2020/11/21 22:03:53 [TRACE] Custom path: /home/user/git/gogs/custom
2020/11/21 22:03:53 [TRACE] Log path: /home/user/git/gogs/log
2020/11/21 22:03:53 [TRACE] Log Mode: File (Info)
2020/11/21 22:03:53 [ INFO] Git Server 0.11.91.0811

我观察了一下服务退出的时间点,应该是和进行合并请求的操作时间点比较接近。
请问能否根据以上日志定位是否是已知问题或如何避免再次服务退出? 肯请帮助支持!