-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Open
Labels
Description
Describe the bug
When someone tries to send the HUP signal to vault while running in docker dev mode it segfaults. This was working in 1.18 and lower.
To Reproduce
Steps to reproduce the behavior:
- Start a docker container like this:
docker run --rm --name vault hashicorp/vault:latest server -dev - Sned the HUP signal like
docker kill --signal=HUP vault/docker exec vault killall -HUP vault - See the error:
==> Vault reload triggered
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x961ac56]
goroutine 1 [running]:
github.com/hashicorp/vault/command.(*ServerCommand).Run(0xc0012acd88, {0xc0003a01a0, 0x4, 0x4})
/home/runner/work/vault/vault/command/server.go:1692 +0x5a76
github.com/hashicorp/cli.(*CLI).Run(0xc000dfb180)
/home/runner/go/pkg/mod/github.com/hashicorp/cli@v1.1.7/cli.go:265 +0x4ed
github.com/hashicorp/vault/command.RunCustom({0xc0003a0190?, 0x5?, 0x5?}, 0xc000002380?)
/home/runner/work/vault/vault/command/main.go:245 +0x995
github.com/hashicorp/vault/command.Run(...)
/home/runner/work/vault/vault/command/main.go:147
main.main()
/home/runner/work/vault/vault/main.go:13 +0x47
Expected behavior
Vault processes the signal correctly and doesn't crash.
Environment:
- Vault Server Version (retrieve with
vault status): Vault v1.21.3, built 2026-02-03T14:56:30Z - Vault CLI Version (retrieve with
vault version): N/A - Server Operating System/Architecture: amd64. Tried debian trixie and arch, also docker desktop on macos aarch64. Docker version 29.2.1.
Reactions are currently unavailable