Stuck on Gitea 1.6.x after upgrade from 1.0.2 - 1.6.4

Hi all,
I migrated to Gitea from Gogs this evening. All was going well. I started with 1.0.2 and then followed this progression:

1.1.4 → 1.2.3 → 1.3.3 → 1.4.2 → 1.5.3 → 1.6.4

Sadly, I’m unable to get past this point. I tried 1.7., 1.7.1, 1.7.6 and even 1.8.0. I get go errors before gitea even starts logging.:

fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0xe5 pc=0x7f30b1ffce94]

runtime stack:
runtime.throw(0x17d3498, 0x2a)
	/usr/local/go/src/runtime/panic.go:608 +0x72
	/usr/local/go/src/runtime/signal_unix.go:374 +0x2f2

goroutine 1 [syscall]:
runtime.cgocall(0x13f6dd0, 0xc0004c0bf0, 0x29)
	/usr/local/go/src/runtime/cgocall.go:128 +0x5e fp=0xc0004c0bb8 sp=0xc0004c0b80 pc=0x407a9e
os/user._Cfunc_mygetpwuid_r(0x3e1, 0xc0004ffe00, 0x3b2a340, 0x400, 0xc000286068, 0x0)
	_cgo_gotypes.go:174 +0x4d fp=0xc0004c0bf0 sp=0xc0004c0bb8 pc=0x834bfd
os/user.lookupUnixUid.func1.1(0x3e1, 0xc0004ffe00, 0x3b2a340, 0x400, 0xc000286068, 0xc0004c0c88)
	/usr/local/go/src/os/user/cgo_lookup_unix.go:100 +0x135 fp=0xc0004c0c30 sp=0xc0004c0bf0 pc=0x8361d5
	/usr/local/go/src/os/user/cgo_lookup_unix.go:100 +0x50 fp=0xc0004c0c70 sp=0xc0004c0c30 pc=0x836270
os/user.retryWithBuffer(0xc000501470, 0xc0004c0d48, 0xc000501470, 0x411425)
	/usr/local/go/src/os/user/cgo_lookup_unix.go:253 +0x3e fp=0xc0004c0cc8 sp=0xc0004c0c70 pc=0x8356ce
os/user.lookupUnixUid(0x3e1, 0x0, 0x0, 0x0)
	/usr/local/go/src/os/user/cgo_lookup_unix.go:96 +0x130 fp=0xc0004c0d80 sp=0xc0004c0cc8 pc=0x835050
os/user.current(0xc0004c0de8, 0x10, 0xc0004c0de0)
	/usr/local/go/src/os/user/cgo_lookup_unix.go:49 +0x27 fp=0xc0004c0db0 sp=0xc0004c0d80 pc=0x834ee7
	/usr/local/go/src/os/user/lookup.go:11 +0x22 fp=0xc0004c0dd8 sp=0xc0004c0db0 pc=0x836032
sync.(*Once).Do(0x35e73a0, 0x1807350)
	/usr/local/go/src/sync/once.go:44 +0xb3 fp=0xc0004c0e08 sp=0xc0004c0dd8 pc=0x46a173
os/user.Current(0x0, 0x0, 0x0)
	/usr/local/go/src/os/user/lookup.go:11 +0x3d fp=0xc0004c0e38 sp=0xc0004c0e08 pc=0x8347ed, 0x1789108)
	/go/src/ +0x22 fp=0xc0004c0e60 sp=0xc0004c0e38 pc=0x959282
	/go/src/ +0x2f51 fp=0xc0004c1708 sp=0xc0004c0e60 pc=0x9eaf21
	/go/src/ +0x4a fp=0xc0004c1848 sp=0xc0004c1708 pc=0x1120a4a, 0x0, 0x0)
	/go/src/ +0xaa fp=0xc0004c1a30 sp=0xc0004c1848 pc=0x134013a, 0x17feb90, 0xc0002592c0, 0xc00007c700, 0x0)
	/go/src/ +0xad fp=0xc0004c1a58 sp=0xc0004c1a30 pc=0xf837cd, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x17a9747, 0x16, 0x0, ...)
	/go/src/ +0x96d fp=0xc0004c1d10 sp=0xc0004c1a58 pc=0xf8490d*App).Run(0xc0002ea820, 0xc00000c060, 0x2, 0x2, 0x0, 0x0)
	/go/src/ +0x5a2 fp=0xc0004c1ee0 sp=0xc0004c1d10 pc=0xf81ac2
	/go/src/ +0x42f fp=0xc0004c1f98 sp=0xc0004c1ee0 pc=0x134cf3f
	/usr/local/go/src/runtime/proc.go:201 +0x207 fp=0xc0004c1fe0 sp=0xc0004c1f98 pc=0x432bf7
	/usr/local/go/src/runtime/asm_amd64.s:1333 +0x1 fp=0xc0004c1fe8 sp=0xc0004c1fe0 pc=0x461451

goroutine 20 [chan receive]:*notificationService).Run(0xc00000e5c8)
	/go/src/ +0x4d
created by
	/go/src/ +0x4a

goroutine 9 [select]:*Logger).StartLogger(0xc0000a32c0)
	/go/src/ +0xf5
created by
	/go/src/ +0xba

goroutine 10 [select]:, 0xc0000866c0)
	/go/src/ +0x102
created by
	/go/src/ +0xc8

goroutine 11 [select]:, 0xc0000866c0)
	/go/src/ +0x102
created by
	/go/src/ +0xc8

goroutine 12 [select]:, 0xc0000866c0)
	/go/src/ +0x102
created by
	/go/src/ +0xc8

goroutine 13 [select]:, 0xc0000866c0)
	/go/src/ +0x102
created by
	/go/src/ +0xc8

goroutine 15 [syscall]:
	/usr/local/go/src/runtime/sigqueue.go:139 +0x9c
	/usr/local/go/src/os/signal/signal_unix.go:23 +0x22
created by os/signal.init.0
	/usr/local/go/src/os/signal/signal_unix.go:29 +0x41

Thanks a bunch for taking a look!

If the upgrade to 1.6.4 succeed, I think you can continue to upgrade to recent version. That means if you can listen the web successfully, that upgrade should work.

The error looks like some panic from golang standard library when Gitea retrieve current Linux login user.

1 Like

The service is working on 1.6.4. I can’t upgrade to anything in 1.7.x. Every upgrade I try in 1.7.x fails with the error above and never starts a listener or even logs. Unless you mean I just go to the absolute latest gitea

try setting an ENV variable:


comparable output:

1 Like

Setting the above export had no impact on the output and the app still wont start.

This looks like a related bug but I’m unsure what my options are for a work around: os/user: LookupId panics on Linux+glibc static build · Issue #24787 · golang/go · GitHub

Yes, so I think you have upgraded successfully. But running failed. I think you can upgrade continue but don’t care the running error. The following versions have been built with new golang version which should fix the bug.

Because Gitea will upgrade before running.

1 Like

@lunny Thanks so much. I was worried that jumping from 1.6.x to 1.15.x would break because I might miss some DB migrations but it all worked out. I’m now running the latest Gitea!