Skip to content

CLI segmentation fault when using gitea admin user create #26656

Closed as not planned
Cray-HPE/metal-provision
#530
@emmanuel-benoit

Description

@emmanuel-benoit

Description

Running gitea --config /path/to/config.ini --work-path /path/to/workdir admin user create causes a segmentation violation. No error occurs if the create is removed, or replaced with e.g. list. The problem remains if the usual create arguments (--username / --email / --password) are present.

Here is the full error:

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

goroutine 1 [running]:
fmt.Fprintf({0x0, 0x0}, {0x331ab64, 0x12}, {0xc0026fe780, 0x1, 0x1})
        /usr/local/go/src/fmt/print.go:225 +0x7a
code.gitea.io/gitea/cmd.RunMainApp(0xc0027c48c0, {0xc000128000?, 0x4?, 0xc0026fe978?})
        /source/cmd/main.go:23 +0xc7
main.main()
        /source/main.go:153 +0xc2b

No other logs are produced, as far as I can tell.

Gitea Version

1.20.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.30.2

Operating System

Debian 11

How are you running Gitea?

The Gitea binary is the one provided on Github, running on amd64. It is being run as the git user, which is what the actual server runs as.

Database

MySQL

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