Skip to content

Crash on startup #20367

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

Closed
AnotherDevlop opened this issue Jul 14, 2022 · 3 comments · Fixed by #20373
Closed

Crash on startup #20367

AnotherDevlop opened this issue Jul 14, 2022 · 3 comments · Fixed by #20373
Labels

Comments

@AnotherDevlop
Copy link

Description

Unexpected exit at startup.

The log says the issue is [gitea.log:373] "...xer/stats/indexer.go:45:populateRepoIndexer() [F] System error: context canceled", (the table 'repository' exists and has more than one row, and), probably related to a previous null reference at [gitea.log:265] ".../graceful/manager.go:135:func1() [C] PANIC during RunWithShutdownContext: runtime error: invalid memory address or nil pointer dereference"

Gitea Version

1.16.9

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/AnotherDevlop/94a4f1c2d1e005a5fdbdb35f2d950de0

Screenshots

No response

Git Version

2.25.1

Operating System

Ubuntu 20.04.3 LTS - Linux 5.4.0-110-generic

How are you running Gitea?

Using your downloads (gitea-1.16.9-linux-amd64)
Systemd: yes
Docker: no

Database

MySQL

@zeripath
Copy link
Contributor

The problem is here:

2022/07/14 11:42:29 .../graceful/manager.go:135:func1() [C] PANIC during RunWithShutdownContext: runtime error: invalid memory address or nil pointer dereference
	Stacktrace: /usr/local/go/src/runtime/panic.go:220 (0x453075)
	/usr/local/go/src/runtime/signal_unix.go:818 (0x453045)
	/source/services/mirror/mirror.go:100 (0x1e4fb5b)
	/source/services/mirror/mirror.go:123 (0x1e4f96a)
	/go/pkg/mod/xorm.io/xorm@v1.2.5/session_iterate.go:51 (0x9e1564)
	/source/models/repo/mirror.go:138 (0xf95837)
	/source/services/mirror/mirror.go:122 (0x1e4f596)
	/source/services/cron/tasks_basic.go:40 (0x1e600e4)
	/source/services/cron/tasks.go:89 (0x1e5ee93)
	/source/modules/graceful/manager.go:139 (0xc812ac)
	/source/services/cron/tasks.go:84 (0x1e5ece4)
	/source/services/cron/tasks.go:58 (0x1e5eb2c)
	/usr/local/go/src/runtime/asm_amd64.s:1571 (0x470040)

@zeripath
Copy link
Contributor

It looks like there is a race between the creation of the mirror queue in InitSyncMirrors and the update_mirrors task.

Have you explicitly set the update_mirrors task to run at startup?

@AnotherDevlop
Copy link
Author

Yes, it is. I tried to disable on startup, but still enabled every 10 minutes. It don't crash on startup, nor after 10 minutes after triggering the mirror update.

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

Successfully merging a pull request may close this issue.

2 participants