Closed
Description
Description
The call:
sudo -u gitea /opt/gitea/gitea --config /etc/gitea/app.ini doctor --all --fix
crash with segfault:
unable to open log file "": open : no such file or directory
panic: runtime error: invalid memory address or nil pointer dereference
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x79f9c7]
goroutine 34 [running]:
code.gitea.io/gitea/modules/util/rotatingfilewriter.(*RotatingFileWriter).Close(0x0)
/source/modules/util/rotatingfilewriter/writer.go:91 +0x27
panic({0x2d4f220, 0x62c1980})
/usr/local/go/src/runtime/panic.go:884 +0x213
code.gitea.io/gitea/modules/util/rotatingfilewriter.(*RotatingFileWriter).Write(0x0, {0xc002584400, 0x5c, 0x400})
/source/modules/util/rotatingfilewriter/writer.go:72 +0x2c
code.gitea.io/gitea/modules/log.(*EventWriterBaseImpl).Run(0xc002494cc0, {0x45c6a50, 0xc0003fefe0})
/source/modules/log/event_writer_base.go:104 +0x54e
code.gitea.io/gitea/modules/log.eventWriterStartGo.func1()
/source/modules/log/event_writer_base.go:157 +0xb1
created by code.gitea.io/gitea/modules/log.eventWriterStartGo
/source/modules/log/event_writer_base.go:153 +0x1c5
Running gitea as an systemd service will work fine.
Log config block:
[log]
logger.access.MODE = ,
LEVEL = Info
MODE = console
COLORIZE = false
ROOT_PATH = /var/log/gitea
Gitea Version
1.20.0
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
Rocky 9.2
How are you running Gitea?
Binary from GH
Database
PostgreSQL