gitea: Unable to push to an existing repo after upgrade to 1.0.0+294-g04fdeb9d (on Postgres 9.6)

  • Gitea version (or commit ref): 1.0.0+294-g04fdeb9d
  • Git version: gitea/gitea:latest (image ID: e603f1ca59e2)
  • Operating system: gitea/gitea:latest (image ID: e603f1ca59e2)
  • Database (use [x]):
    • PostgreSQL: postgres:9.6 (image ID: ecd991538a0f)
    • MySQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist: https://gist.github.com/bkleef/f51421543d17b2ee18db0fdc5e2ba167

Description

After pulling latest gitea Docker image we are unable to push to an existing and new repo. Reverting back to gitea/gitea:1.0.1 fixes this. We use internal SSH-Server provided by Gitea.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 23 (14 by maintainers)

Most upvoted comments

@bkleef @jomp16 Please confirm this is resolved by #1007

Found where the problem is. You have to put more than 1 log mode in your config file except console.

Gitea version: 1.0.0+300-gfd941db2.

This also happens with MySQL.

HTTP(s):

remote: panic: runtime error: invalid memory address or nil pointer dereference
remote: [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x8665a7]
remote: 
remote: goroutine 1 [running]:
remote: code.gitea.io/gitea/modules/log.(*XORMLogBridge).ShowSQL(0x0, 0xc4201b110f, 0x1, 0x1)
remote: 	/home/jomp16/sources/gitea-git/src/src/code.gitea.io/gitea/modules/log/xorm.go:127 +0x17
remote: code.gitea.io/gitea/vendor/github.com/go-xorm/xorm.(*Engine).ShowSQL(0xc4201c97c0, 0xc4201b110f, 0x1, 0x1)
remote: 	/home/jomp16/sources/gitea-git/src/src/code.gitea.io/gitea/vendor/github.com/go-xorm/xorm/engine.go:51 +0x52
remote: code.gitea.io/gitea/models.SetEngine(0xc420122a01, 0x19)
remote: 	/home/jomp16/sources/gitea-git/src/src/code.gitea.io/gitea/models/models.go:258 +0x1c5
remote: code.gitea.io/gitea/cmd.setup(0x1532d67, 0xa, 0x6, 0x7ffcd95e4e60)
remote: 	/home/jomp16/sources/gitea-git/src/src/code.gitea.io/gitea/cmd/serve.go:63 +0x212
remote: code.gitea.io/gitea/cmd.runUpdate(0xc4200de280, 0x0, 0xc4200de200)
remote: 	/home/jomp16/sources/gitea-git/src/src/code.gitea.io/gitea/cmd/update.go:40 +0x7e
remote: code.gitea.io/gitea/vendor/github.com/urfave/cli.HandleAction(0x133b9a0, 0x15b90e0, 0xc4200de280, 0xc420405000, 0x0)
remote: 	/home/jomp16/sources/gitea-git/src/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/app.go:471 +0xb9
remote: code.gitea.io/gitea/vendor/github.com/urfave/cli.Command.Run(0x152aa17, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x156b7e4, 0x2e, 0x0, ...)
remote: 	/home/jomp16/sources/gitea-git/src/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/command.go:191 +0xb4b
remote: code.gitea.io/gitea/vendor/github.com/urfave/cli.(*App).Run(0xc420001d40, 0xc420010120, 0x6, 0x6, 0x0, 0x0)
remote: 	/home/jomp16/sources/gitea-git/src/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/app.go:241 +0x65f
remote: main.main()
remote: 	/home/jomp16/sources/gitea-git/src/src/code.gitea.io/gitea/main.go:39 +0x377
remote: error: hook declined to update refs/heads/master

SSH:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x8665a7]

goroutine 1 [running]:
code.gitea.io/gitea/modules/log.(*XORMLogBridge).ShowSQL(0x0, 0xc42013931f, 0x1, 0x1)
	/home/jomp16/sources/gitea-git/src/src/code.gitea.io/gitea/modules/log/xorm.go:127 +0x17
code.gitea.io/gitea/vendor/github.com/go-xorm/xorm.(*Engine).ShowSQL(0xc420195540, 0xc42013931f, 0x1, 0x1)
	/home/jomp16/sources/gitea-git/src/src/code.gitea.io/gitea/vendor/github.com/go-xorm/xorm/engine.go:51 +0x52
code.gitea.io/gitea/models.SetEngine(0xc42011ea01, 0x17)
	/home/jomp16/sources/gitea-git/src/src/code.gitea.io/gitea/models/models.go:258 +0x1c5
code.gitea.io/gitea/cmd.setup(0x152ec18, 0x8, 0x6, 0x7ffff4ca2de7)
	/home/jomp16/sources/gitea-git/src/src/code.gitea.io/gitea/cmd/serve.go:63 +0x212
code.gitea.io/gitea/cmd.runServ(0xc4200e0280, 0x0, 0xc4200e0200)
	/home/jomp16/sources/gitea-git/src/src/code.gitea.io/gitea/cmd/serve.go:149 +0x7e
code.gitea.io/gitea/vendor/github.com/urfave/cli.HandleAction(0x133b9a0, 0x15b90d8, 0xc4200e0280, 0xc42040d000, 0x0)
	/home/jomp16/sources/gitea-git/src/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/app.go:471 +0xb9
code.gitea.io/gitea/vendor/github.com/urfave/cli.Command.Run(0x1526ec2, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x156c73d, 0x2f, 0x0, ...)
	/home/jomp16/sources/gitea-git/src/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/command.go:191 +0xb4b
code.gitea.io/gitea/vendor/github.com/urfave/cli.(*App).Run(0xc4204591e0, 0xc420010240, 0x4, 0x4, 0x0, 0x0)
	/home/jomp16/sources/gitea-git/src/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/app.go:241 +0x65f
main.main()
	/home/jomp16/sources/gitea-git/src/src/code.gitea.io/gitea/main.go:39 +0x377
fatal: Could not read from remote repository.

Reverting commits: 70ae6d197b28f018264798b07a16bf3acc36405c and 04fdeb9d8d4dc3cf296d8354ee29f1d053154a54 makes it work again.

I’m not sure why it works on try.gitea.io and not on my side. The only difference the database engine is MySQL (MariaDB to be more exact) on my side instead of SQLite on your side.

You should update to 70ae6d197b28f018264798b07a16bf3acc36405c not ffde33bdfabceb69ac2bdf43466cc0508fec0add and then test it.

@bkleef please help to confirm #993 fix this.