-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
gitea doctor --run output is sometime truncated #19969
Comments
Just a guess, the doctor logger writes to Stdout, and in its |
- We don't need to buffer the logger with a thousand capacity. It's not a high-throughput logger, this also caused issue whereby the logger can't keep up with repeated messages being send(somehow they are lost in the queue?). - Resolves go-gitea#19969
TL;DR It's resolved in #19982 To give some more info to this issue, while debugging I noticed that at a certain point message are just lost, they don't appear where they should be going. So my terminal crying of debug statements, I found the point where messages prefer to be in the void than being printed. Line 103 in f0ce547
Line 330 in f0ce547
If you would like to waste your time(Please note that not all SENDING will be RECEIVED due to log levels etc.): diff --git a/modules/log/event.go b/modules/log/event.go
index f66ecd179..0afb4e6bc 100644
--- a/modules/log/event.go
+++ b/modules/log/event.go
@@ -328,6 +328,7 @@ func (m *MultiChannelledLog) Start() {
m.level = INFO
}
case event, ok := <-m.queue:
+ fmt.Printf("RECEIVING: %t, %#v\n", ok, *event)
if !ok {
m.closeLoggers()
return
@@ -359,6 +360,7 @@ func (m *MultiChannelledLog) Start() {
// LogEvent logs an event to this MultiChannelledLog
func (m *MultiChannelledLog) LogEvent(event *Event) error {
+ fmt.Printf("SENDING: %#v\n", *event)
select {
case m.queue <- event:
return nil |
- We don't need to buffer the logger with a thousand capacity. It's not a high-throughput logger, this also caused issue whereby the logger can't keep up with repeated messages being send(somehow they are lost in the queue?). - Resolves #19969 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
- We don't need to buffer the logger with a thousand capacity. It's not a high-throughput logger, this also caused issue whereby the logger can't keep up with repeated messages being send(somehow they are lost in the queue?). - Resolves go-gitea#19969 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
- We don't need to buffer the logger with a thousand capacity. It's not a high-throughput logger, this also caused issue whereby the logger can't keep up with repeated messages being send(somehow they are lost in the queue?). - Resolves go-gitea#19969 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Description
Steps to reproduce:
docker run --name gitea -p 3000:3000 -e GITEA__security__INSTALL_LOCK=true -d gitea/gitea:1.16.8-rootless
docker exec gitea gitea admin user create --admin --username root --password admin1234 --email root@example.com
docker exec gitea mkdir /var/lib/gitea/data/log
docker exec gitea mv /var/lib/gitea/git/repositories/root/test.git /var/lib/gitea/git/repositories/root/other.git
docker exec gitea gitea doctor --run hooks
What is expected?
What actually happens?
The output is truncated, the line with OK is never shown and other lines are truncated randomly:
Gitea Version
1.16.8
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
Operating System
How are you running Gitea?
Database
SQLite
The text was updated successfully, but these errors were encountered: