Backup (dump) command fails with stacktrace - latest tag on dockerhub (1.7.6 works fine) #3281

Closed
opened 2025-11-02 05:06:29 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @jgwilson42 on GitHub (May 1, 2019).

  • Gitea version (or commit ref): Gitea version caba282 built with GNU Make 4.2.1, go1.12.4 : bindata, sqlite, sqlite_unlock_notify
  • Git version: NA
  • Operating system: docker image gitea/gitea:latest
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

When trying to run the backup I get the following stack trace:

git-67778cc5ff-xmz9c:/app/gitea$ ./gitea dump -c /data/gitea/conf/app.ini
dump flag redefined: v
panic: dump flag redefined: v

goroutine 1 [running]:
flag.(*FlagSet).Var(0xc000168780, 0x1c4ea00, 0xc000040cf5, 0x199833c, 0x1, 0x19a9963, 0x11)
	/usr/local/go/src/flag/flag.go:850 +0x4af
flag.(*FlagSet).BoolVar(...)
	/usr/local/go/src/flag/flag.go:623
flag.(*FlagSet).Bool(0xc000168780, 0x199833c, 0x1, 0x0, 0x19a9963, 0x11, 0x1)
	/usr/local/go/src/flag/flag.go:636 +0x8b
github.com/urfave/cli.BoolFlag.Apply.func1(0x199833c, 0x1)
	/go/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/flag.go:274 +0xb3
github.com/urfave/cli.eachName(0x1998333, 0xa, 0xc0005f1770)
	/go/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/flag.go:78 +0xdc
github.com/urfave/cli.BoolFlag.Apply(0x1998333, 0xa, 0x19a9963, 0x11, 0x0, 0x0, 0x0, 0x0, 0xc000168780)
	/go/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/flag.go:269 +0xfa
github.com/urfave/cli.flagSet(0x198a6e5, 0x4, 0xc0002f2960, 0x9, 0xa, 0x1)
	/go/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/flag.go:69 +0x90
github.com/urfave/cli.Command.Run(0x198a6e5, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x19c5241, 0x1d, 0x0, ...)
	/go/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/command.go:94 +0xc1
github.com/urfave/cli.(*App).Run(0xc0002a8820, 0xc00003c100, 0x4, 0x4, 0x0, 0x0)
	/go/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/app.go:241 +0x658
main.main()
	/go/src/code.gitea.io/gitea/main.go:100 +0x75b
git-67778cc5ff-xmz9c:/app/gitea$ 

...

Screenshots

NA

Originally created by @jgwilson42 on GitHub (May 1, 2019). - Gitea version (or commit ref): Gitea version caba282 built with GNU Make 4.2.1, go1.12.4 : bindata, sqlite, sqlite_unlock_notify - Git version: NA - Operating system: docker image gitea/gitea:latest - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ## Description When trying to run the backup I get the following stack trace: ``` git-67778cc5ff-xmz9c:/app/gitea$ ./gitea dump -c /data/gitea/conf/app.ini dump flag redefined: v panic: dump flag redefined: v goroutine 1 [running]: flag.(*FlagSet).Var(0xc000168780, 0x1c4ea00, 0xc000040cf5, 0x199833c, 0x1, 0x19a9963, 0x11) /usr/local/go/src/flag/flag.go:850 +0x4af flag.(*FlagSet).BoolVar(...) /usr/local/go/src/flag/flag.go:623 flag.(*FlagSet).Bool(0xc000168780, 0x199833c, 0x1, 0x0, 0x19a9963, 0x11, 0x1) /usr/local/go/src/flag/flag.go:636 +0x8b github.com/urfave/cli.BoolFlag.Apply.func1(0x199833c, 0x1) /go/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/flag.go:274 +0xb3 github.com/urfave/cli.eachName(0x1998333, 0xa, 0xc0005f1770) /go/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/flag.go:78 +0xdc github.com/urfave/cli.BoolFlag.Apply(0x1998333, 0xa, 0x19a9963, 0x11, 0x0, 0x0, 0x0, 0x0, 0xc000168780) /go/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/flag.go:269 +0xfa github.com/urfave/cli.flagSet(0x198a6e5, 0x4, 0xc0002f2960, 0x9, 0xa, 0x1) /go/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/flag.go:69 +0x90 github.com/urfave/cli.Command.Run(0x198a6e5, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x19c5241, 0x1d, 0x0, ...) /go/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/command.go:94 +0xc1 github.com/urfave/cli.(*App).Run(0xc0002a8820, 0xc00003c100, 0x4, 0x4, 0x0, 0x0) /go/src/code.gitea.io/gitea/vendor/github.com/urfave/cli/app.go:241 +0x658 main.main() /go/src/code.gitea.io/gitea/main.go:100 +0x75b git-67778cc5ff-xmz9c:/app/gitea$ ``` ... ## Screenshots NA
GiteaMirror added the type/bug label 2025-11-02 05:06:29 -06:00
Author
Owner

@jgwilson42 commented on GitHub (May 1, 2019):

This appears to be a regression in the latest tag on dockerhub (compared with gitea/gitea:1.7.6)

@jgwilson42 commented on GitHub (May 1, 2019): This appears to be a regression in the latest tag on dockerhub (compared with gitea/gitea:1.7.6)
Author
Owner

@jolheiser commented on GitHub (May 1, 2019):

This is caused by the addition of the Version Flag (source), which is fighting with our existing Verbose Flag.

@jolheiser commented on GitHub (May 1, 2019): This is caused by the addition of the [Version Flag](https://github.com/go-gitea/gitea/blob/master/main.go#L86) [(source)](https://github.com/urfave/cli/blob/master/flag.go#L23-L27), which is fighting with our existing [Verbose Flag](https://github.com/go-gitea/gitea/blob/master/cmd/dump.go#L38-L41).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3281