The logger not output messages when logging fatal #1266

Closed
opened 2025-11-02 03:54:41 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @free1139 on GitHub (Nov 22, 2017).

I have been trying to install gitea (master and v1.3) today, but when i finish install it from browser, the go program was exited without any error messages, when i run "./gitea web" again, it can not be restarted.

I have debugged it, and i found "code.gitea.io/gitea/modules/log".Fatal was using go channel to output messages, maybe os.Exit was called before outputting messages .

My server system information:
Linux iZ23mbdnjl9Z 3.2.0-4-amd64 #1 SMP Debian 3.2.78-1 x86_64 GNU/Linux
CPU: 1 core

Maybe need to fix this code:
image

Official output:
image

Expect output:
image

Originally created by @free1139 on GitHub (Nov 22, 2017). I have been trying to install gitea (master and v1.3) today, but when i finish install it from browser, the go program was exited without any error messages, when i run "./gitea web" again, it can not be restarted. I have debugged it, and i found "code.gitea.io/gitea/modules/log".Fatal was using go channel to output messages, maybe os.Exit was called before outputting messages . My server system information: Linux iZ23mbdnjl9Z 3.2.0-4-amd64 #1 SMP Debian 3.2.78-1 x86_64 GNU/Linux CPU: 1 core Maybe need to fix this code: ![image](https://user-images.githubusercontent.com/2360572/33125447-7a1ae6ce-cfbb-11e7-83a8-1ad429b6266f.png) Official output: ![image](https://user-images.githubusercontent.com/2360572/33124789-24e76512-cfb9-11e7-9d73-f2431121fcf3.png) Expect output: ![image](https://user-images.githubusercontent.com/2360572/33125083-3c483b4a-cfba-11e7-9028-5f2489463fd4.png)
GiteaMirror added the issue/confirmedtype/bug labels 2025-11-02 03:54:41 -06:00
Author
Owner

@lunny commented on GitHub (Nov 22, 2017):

Which file do you find the os.Exit?

@lunny commented on GitHub (Nov 22, 2017): Which file do you find the `os.Exit`?
Author
Owner

@free1139 commented on GitHub (Nov 24, 2017):

code.gitea.io/gitea/modules/log/log.go

@free1139 commented on GitHub (Nov 24, 2017): code.gitea.io/gitea/modules/log/log.go
Author
Owner

@lafriks commented on GitHub (Nov 24, 2017):

You need to set rights for git user rights to have write access to that directory

@lafriks commented on GitHub (Nov 24, 2017): You need to set rights for git user rights to have write access to that directory
Author
Owner

@free1139 commented on GitHub (Nov 27, 2017):

Yes, it have no rights, the problem is that the official logger not output error message in this case, it's hard to installing without source code debugging, maybe it's not appropriate for newcomers.

@free1139 commented on GitHub (Nov 27, 2017): Yes, it have no rights, the problem is that the official logger not output error message in this case, it's hard to installing without source code debugging, maybe it's not appropriate for newcomers.
Author
Owner

@stale[bot] commented on GitHub (Feb 10, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Feb 10, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@lunny commented on GitHub (Feb 11, 2019):

This should be a bug of log module. The log haven't write to console or file and the application exited.

@lunny commented on GitHub (Feb 11, 2019): This should be a bug of log module. The log haven't write to console or file and the application exited.
Author
Owner

@wxiaoguang commented on GitHub (Jul 5, 2022):

It should have been fixed by

@wxiaoguang commented on GitHub (Jul 5, 2022): It should have been fixed by * https://github.com/go-gitea/gitea/pull/19994
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1266