Skip to content
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 fails to start on wrong mailer configuration #5584

Closed
2 of 7 tasks
byRoadrunner opened this issue Dec 23, 2018 · 5 comments
Closed
2 of 7 tasks

Gitea fails to start on wrong mailer configuration #5584

byRoadrunner opened this issue Dec 23, 2018 · 5 comments
Labels

Comments

@byRoadrunner
Copy link

  • Gitea version (or commit ref): a06ae0
  • Git version: 2.18.1
  • Operating system: Linux (in Docker)
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:
server_1  | panic: runtime error: invalid memory address or nil pointer dereference
server_1  | [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xecc2a6]
server_1  |
server_1  | goroutine 82 [running]:
server_1  | code.gitea.io/gitea/models.mailIssueCommentToParticipants(0x18c7160, 0xc0010a2000, 0xc000110160, 0xc00095fc00, 0x0, 0x0, 0xc0028c4000, 0x3535cf8, 0x0, 0x0, ...)
server_1  |     /go/src/code.gitea.io/gitea/models/issue_mail.go:81 +0xa56
server_1  | code.gitea.io/gitea/models.(*Comment).MailParticipants(0xc0028c4000, 0x18c7160, 0xc0010a2000, 0xe, 0xc000110160, 0x1, 0x0)
server_1  |     /go/src/code.gitea.io/gitea/models/issue_comment.go:378 +0x235
server_1  | code.gitea.io/gitea/models.sendCreateCommentAction(0xc0010a2000, 0xc00283fab0, 0xc0028c4000, 0x0, 0x0)
server_1  |     /go/src/code.gitea.io/gitea/models/issue_comment.go:635 +0x78b
server_1  | code.gitea.io/gitea/models.createComment(0xc0010a2000, 0xc00283fab0, 0x0, 0x0, 0xc00283fb30)
server_1  |     /go/src/code.gitea.io/gitea/models/issue_comment.go:533 +0x279
server_1  | code.gitea.io/gitea/models.createStatusComment(0xc0010a2000, 0xc00095fc00, 0xc000110160, 0x0, 0x0, 0x2)
server_1  |     /go/src/code.gitea.io/gitea/models/issue_comment.go:647 +0xc8
server_1  | code.gitea.io/gitea/models.(*Issue).changeStatus(0xc000110160, 0xc0010a2000, 0xc00095fc00, 0x1, 0x0, 0xc000673801)
server_1  |     /go/src/code.gitea.io/gitea/models/issue.go:736 +0x24f
server_1  | code.gitea.io/gitea/models.(*PullRequest).setMerged(0xc000807860, 0x0, 0x0)
server_1  |     /go/src/code.gitea.io/gitea/models/pull.go:565 +0x2a6
server_1  | code.gitea.io/gitea/models.(*PullRequest).manuallyMerged(0xc000807860, 0x0)
server_1  |     /go/src/code.gitea.io/gitea/models/pull.go:605 +0x223
server_1  | code.gitea.io/gitea/models.TestPullRequests()
server_1  |     /go/src/code.gitea.io/gitea/models/pull.go:1328 +0x2c8
server_1  | created by code.gitea.io/gitea/models.InitTestPullRequests
server_1  |     /go/src/code.gitea.io/gitea/models/pull.go:1366 +0x35

Description

If there is an error in the mailer configuration this error occurs and Gitea is not able to start. I don´t think that an wrong configuration of the mailer should stop Gitea completely from starting.

@lunny lunny added the type/bug label Jan 3, 2019
@benharri
Copy link
Contributor

benharri commented Jan 26, 2019

I've started getting this crash two days after upgrading to 1.7.0 (with no additional change to the mailer settings...)

It still won't start with either smtp or using sendmail.

Edit: Starting up fully with the mailer disabled, then re-enabling it seems to have cleared up this error.

@lunny
Copy link
Member

lunny commented Feb 7, 2019

Closed now, Please feel free to reopen it.

@lunny lunny closed this as completed Feb 7, 2019
@FloThinksPi
Copy link

FloThinksPi commented Feb 11, 2019

@lunny We are also seeing this.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xecc5e1]
goroutine 49 [running]:
code.gitea.io/gitea/models.mailIssueCommentToParticipants(0x18cdee0, 0xc0032e02c0, 0xc000738000, 0xc00378cc00, 0x0, 0x0, 0xc002741500, 0x3544018, 0x0, 0x0, ...)
        /go/src/code.gitea.io/gitea/models/issue_mail.go:81 +0xa91
code.gitea.io/gitea/models.(*Comment).MailParticipants(0xc002741500, 0x18cdee0, 0xc0032e02c0, 0xe, 0xc000738000, 0x1, 0x0)
        /go/src/code.gitea.io/gitea/models/issue_comment.go:378 +0x235
code.gitea.io/gitea/models.sendCreateCommentAction(0xc0032e02c0, 0xc0038d1ab0, 0xc002741500, 0x0, 0x0)
        /go/src/code.gitea.io/gitea/models/issue_comment.go:635 +0x78b
code.gitea.io/gitea/models.createComment(0xc0032e02c0, 0xc0038d1ab0, 0x0, 0x0, 0xc0038d1b30)
        /go/src/code.gitea.io/gitea/models/issue_comment.go:533 +0x279
code.gitea.io/gitea/models.createStatusComment(0xc0032e02c0, 0xc00378cc00, 0xc000738000, 0x0, 0x0, 0x2)
        /go/src/code.gitea.io/gitea/models/issue_comment.go:647 +0xc8
code.gitea.io/gitea/models.(*Issue).changeStatus(0xc000738000, 0xc0032e02c0, 0xc00378cc00, 0x1, 0x0, 0xf57470)
        /go/src/code.gitea.io/gitea/models/issue.go:736 +0x24f
code.gitea.io/gitea/models.(*PullRequest).setMerged(0xc0021485b0, 0x0, 0x0)
        /go/src/code.gitea.io/gitea/models/pull.go:602 +0x2a6
code.gitea.io/gitea/models.(*PullRequest).manuallyMerged(0xc0021485b0, 0x0)
        /go/src/code.gitea.io/gitea/models/pull.go:642 +0x223
code.gitea.io/gitea/models.TestPullRequests()
        /go/src/code.gitea.io/gitea/models/pull.go:1365 +0x2c8
created by code.gitea.io/gitea/models.InitTestPullRequests
        /go/src/code.gitea.io/gitea/models/pull.go:1403 +0x35

We are at commit 97dafdc
The Docker Container automatically restarts and instantly crashes again with above error.
The only solution is, like stated by @benharri to disable the mailer, let the container restart, enable it again and then restart it manually.

@pree
Copy link

pree commented Feb 11, 2019

I've got this error after someone merged a PR...

@zeripath
Copy link
Contributor

@FloThinksPi and @pree I think this was fixed by #5895

Any chance you could check if backporting that fix fixes your issue?

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants