Skip to content

PANIC: runtime error: invalid memory address or nil pointer dereference #35095

@meth00dman1987

Description

@meth00dman1987

Description

One of the repositories stopped opening. It is not known when exactly this happened. The last commit was on June 26, 2025. When trying to access the repository, an error occurred:

PANIC: runtime error: invalid memory address or nil pointer dereference
/snap/go/10907/src/runtime/panic.go:792 (0x47d911)
/build/gitea/parts/gitea/build/modules/web/routing/logger_manager.go:116 (0x180e764)
/snap/go/10907/src/runtime/panic.go:792 (0x47d911)
/snap/go/10907/src/runtime/panic.go:262 (0x47fff8)
/snap/go/10907/src/runtime/signal_unix.go:925 (0x47ffc8)
/build/gitea/parts/gitea/build/modules/git/commit_info.go:21 (0xe9daa3)
/build/gitea/parts/gitea/build/modules/git/commit_info_nogogit.go:70 (0xe9e0b2)
/build/gitea/parts/gitea/build/routers/web/repo/view.go:302 (0x2a2fea4)
/build/gitea/parts/gitea/build/routers/web/repo/view_home.go:136 (0x2a35aab)
/build/gitea/parts/gitea/build/routers/web/repo/view_home.go:340 (0x2a37f6d)
/build/gitea/parts/gitea/build/routers/web/repo/view_home.go:469 (0x2a37901)
/snap/go/10907/src/reflect/value.go:584 (0x50c405)
/snap/go/10907/src/reflect/value.go:368 (0x50b518)
/build/gitea/parts/gitea/build/modules/web/handler.go:161 (0x1818076)
/snap/go/10907/src/net/http/server.go:2294 (0x91d788)
/snap/go/10907/src/net/http/server.go:2294 (0x91d788)
/build/gitea/parts/gitea/build/modules/web/handler.go:168 (0x18180e5)
/snap/go/10907/src/net/http/server.go:2294 (0x91d788)
/build/gitea/parts/gitea/build/modules/web/handler.go:168 (0x18180e5)
/snap/go/10907/src/net/http/server.go:2294 (0x91d788)
/build/gitea/parts/gitea/build/modules/web/handler.go:168 (0x18180e5)
/snap/go/10907/src/net/http/server.go:2294 (0x91d788)
/build/gitea/parts/gitea/build/modules/web/handler.go:168 (0x18180e5)
/snap/go/10907/src/net/http/server.go:2294 (0x91d788)
/root/go/pkg/mod/github.com/go-chi/chi/[email protected]/chain.go:31 (0x180f045)
/root/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:478 (0x18121e1)
/snap/go/10907/src/net/http/server.go:2294 (0x91d788)
/build/gitea/parts/gitea/build/modules/web/handler.go:168 (0x18180e5)
/snap/go/10907/src/net/http/server.go:2294 (0x91d788)
/build/gitea/parts/gitea/build/modules/web/handler.go:168 (0x18180e5)
/snap/go/10907/src/net/http/server.go:2294 (0x91d788)
/root/go/pkg/mod/github.com/go-chi/chi/[email protected]/middleware/get_head.go:37 (0x297d20a)
/snap/go/10907/src/net/http/server.go:2294 (0x91d788)
/build/gitea/parts/gitea/build/modules/web/handler.go:125 (0x1818535)
/snap/go/10907/src/net/http/server.go:2294 (0x91d788)
/build/gitea/parts/gitea/build/modules/web/handler.go:168 (0x18180e5)
/snap/go/10907/src/net/http/server.go:2294 (0x91d788)
/build/gitea/parts/gitea/build/services/context/context.go:209 (0x1e127d8)
/snap/go/10907/src/net/http/server.go:2294 (0x91d788)
/build/gitea/parts/gitea/build/modules/web/handler.go:125 (0x1818535)
/snap/go/10907/src/net/http/server.go:2294 (0x91d788)
/root/go/pkg/mod/gitea.com/go-chi/[email protected]/session.go:257 (0x17b7c0d)
/snap/go/10907/src/net/http/server.go:2294 (0x91d788)
/build/gitea/parts/gitea/build/modules/web/handler.go:125 (0x1818535)
/snap/go/10907/src/net/http/server.go:2294 (0x91d788)
/root/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:73 (0x180fc8e)
/root/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:325 (0x18115fa)
/snap/go/10907/src/net/http/server.go:2294 (0x91d788)
/root/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:478 (0x18121e1)
/snap/go/10907/src/net/http/server.go:2294 (0x91d788)
/root/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:73 (0x180fc8e)
/root/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:325 (0x18115fa)
/snap/go/10907/src/net/http/server.go:2294 (0x91d788)
/root/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:478 (0x18121e1)
/snap/go/10907/src/net/http/server.go:2294 (0x91d788)
/build/gitea/parts/gitea/build/modules/web/routing/logger_manager.go:122 (0x180e5ee)
/snap/go/10907/src/net/http/server.go:2294 (0x91d788)
/build/gitea/parts/gitea/build/modules/web/handler.go:125 (0x1818535)
/snap/go/10907/src/net/http/server.go:2294 (0x91d788)
/root/go/pkg/mod/github.com/chi-middleware/[email protected]/middleware.go:37 (0x28c5fb3)
/snap/go/10907/src/net/http/server.go:2294 (0x91d788)
/build/gitea/parts/gitea/build/modules/web/handler.go:125 (0x1818535)
/snap/go/10907/src/net/http/server.go:2294 (0x91d788)
/build/gitea/parts/gitea/build/routers/common/middleware.go:78 (0x28c829c)
/snap/go/10907/src/net/http/server.go:2294 (0x91d788)
/build/gitea/parts/gitea/build/modules/web/handler.go:125 (0x1818535)
/snap/go/10907/src/net/http/server.go:2294 (0x91d788)
/build/gitea/parts/gitea/build/routers/common/middleware.go:93 (0x28c7e12)
/snap/go/10907/src/net/http/server.go:2294 (0x91d788)
/build/gitea/parts/gitea/build/modules/web/handler.go:125 (0x1818535)
/snap/go/10907/src/net/http/server.go:2294 (0x91d788)
/root/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:90 (0x180fc4d)
/build/gitea/parts/gitea/build/modules/web/router.go:243 (0x1819ffb)
/build/gitea/parts/gitea/build/modules/web/router.go:181 (0x1819a26)
/snap/go/10907/src/net/http/server.go:3301 (0x93e24d)
/snap/go/10907/src/net/http/server.go:2102 (0x91bc84)
/snap/go/10907/src/runtime/asm_amd64.s:1700 (0x485f80)

The rest of the repositories work correctly, only one is unavailable.

Found a similar problem #26331
The solution indicates that it has been fixed.

Gitea Version

1.24.3 built with GNU Make 4.3, go1.24.4: bindata, sqlite, sqlite_unlock_notify, pam, cert

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.25.1

Operating System

Ubuntu 20.04

How are you running Gitea?

Snap

Database

PostgreSQL

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions