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

panic: runtime error: invalid memory address or nil pointer dereference #4260

Closed
2 of 7 tasks
sitilge opened this issue Jun 16, 2018 · 4 comments
Closed
2 of 7 tasks

Comments

@sitilge
Copy link

sitilge commented Jun 16, 2018

  • Gitea version (or commit ref): r6429.85414d8b7
  • Git version: 2.17.1
  • Operating system: arch 4.16.13
  • 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:

Description

Jun 16 19:26:58 systemd[1]: Started Gitea (Git with a cup of tea).
Jun 16 19:26:58 systemd[1]: Stopped Gitea (Git with a cup of tea).
Jun 16 19:26:58 systemd[1]: gitea.service: Scheduled restart job, restart counter is at 148.
Jun 16 19:26:58 systemd[1]: gitea.service: Service hold-off time over, scheduling restart.
Jun 16 19:26:55 systemd[1]: gitea.service: Failed with result 'exit-code'.
Jun 16 19:26:55 systemd[1]: gitea.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jun 16 19:26:55 gitea[3594]:         /tmp/trizen/gitea-git/src/src/code.gitea.io/gitea/main.go:52 +0x40e
Jun 16 19:26:55 gitea[3594]: main.main()
Jun 16 19:26:55 gitea[3594]:         /tmp/trizen/gitea-git/src/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/app.go:241 +0x5b8
Jun 16 19:26:55 gitea[3594]: code.gitea.io/gitea/vendor/github.com/urfave/cli.(*App).Run(0xc4205b41a0, 0xc42003a0c0, 0x4, 0x4, 0x0, 0x0)
Jun 16 19:26:55 gitea[3594]:         /tmp/trizen/gitea-git/src/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/command.go:191 +0xa0e
Jun 16 19:26:55 gitea[3594]: code.gitea.io/gitea/vendor/github.com/urfave/cli.Command.Run(0x164cc4a, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1670974, 0x16, 0x0, ...)
Jun 16 19:26:55 gitea[3594]:         /tmp/trizen/gitea-git/src/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/app.go:471 +0xad
Jun 16 19:26:55 gitea[3594]: code.gitea.io/gitea/vendor/github.com/urfave/cli.HandleAction(0x1412f00, 0x16ef910, 0xc4205be3c0, 0xc4202b1700, 0x0)
Jun 16 19:26:55 gitea[3594]:         /tmp/trizen/gitea-git/src/src/code.gitea.io/gitea/cmd/web.go:83 +0xa8
Jun 16 19:26:55 gitea[3594]: code.gitea.io/gitea/cmd.runWeb(0xc4205be3c0, 0x0, 0x0)
Jun 16 19:26:55 gitea[3594]:         /tmp/trizen/gitea-git/src/src/code.gitea.io/gitea/routers/init.go:47 +0x4a
Jun 16 19:26:55 gitea[3594]: code.gitea.io/gitea/routers.GlobalInit()
Jun 16 19:26:55 gitea[3594]:         /tmp/trizen/gitea-git/src/src/code.gitea.io/gitea/modules/setting/setting.go:1147 +0x444a
Jun 16 19:26:55 gitea[3594]: code.gitea.io/gitea/modules/setting.NewContext()
Jun 16 19:26:55 gitea[3594]:         /tmp/trizen/gitea-git/src/src/code.gitea.io/gitea/vendor/gopkg.in/ini.v1/key.go:202 +0x2f
Jun 16 19:26:55 gitea[3594]: code.gitea.io/gitea/vendor/gopkg.in/ini%2ev1.(*Key).MustString(0xc4205e1a40, 0xc4205d7880, 0x15, 0x1, 0xc4205d7880)
Jun 16 19:26:55 gitea[3594]:         /tmp/trizen/gitea-git/src/src/code.gitea.io/gitea/vendor/gopkg.in/ini.v1/key.go:130 +0x3d
Jun 16 19:26:55 gitea[3594]: code.gitea.io/gitea/vendor/gopkg.in/ini%2ev1.(*Key).String(0xc4205e1a40, 0xc4205d7880, 0x15)
Jun 16 19:26:55 gitea[3594]:         /tmp/trizen/gitea-git/src/src/code.gitea.io/gitea/vendor/gopkg.in/ini.v1/key.go:123 +0xa3
Jun 16 19:26:55 gitea[3594]: code.gitea.io/gitea/vendor/gopkg.in/ini%2ev1.(*Key).transformValue(0xc4205e1a40, 0xc4205cb801, 0x27, 0xc42051ae58, 0x4abbc9)
Jun 16 19:26:55 gitea[3594]: goroutine 1 [running]:
Jun 16 19:26:55 gitea[3594]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x7bfc73]
Jun 16 19:26:55 gitea[3594]: panic: runtime error: invalid memory address or nil pointer dereference
@francoism90
Copy link
Contributor

#4255 - Could you try to change this in app.ini:

;[U2F]
; Two Factor authentication with security keys
; https://developers.yubico.com/U2F/App_ID.html
;APP_ID = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s
; Comma seperated list of truisted facets
;TRUSTED_FACETS = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s

@sitilge
Copy link
Author

sitilge commented Jun 21, 2018

@francoism90 that solved it, thank you.

@sitilge sitilge closed this as completed Jun 21, 2018
@belidzs
Copy link

belidzs commented Jan 12, 2019

This should be removed from app.ini.sample until this issue is fixed or gitea should throw a more sensible error message. I have run into the same issue and it was very hard to trace down the issue.

@matoro
Copy link

matoro commented Jan 16, 2019

Agreed, just ran into this on a 100% vanilla install. Crazy that a default config (!) results in a segfault.

@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
None yet
Development

No branches or pull requests

4 participants