Skip to content

SIGHUP on dev server causes SIGSEGV since 1.19 in docker #31800

@TheDJVG

Description

@TheDJVG

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:

  1. Start a docker container like this: docker run --rm --name vault hashicorp/vault:latest server -dev
  2. Sned the HUP signal like docker kill --signal=HUP vault / docker exec vault killall -HUP vault
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUsed to indicate a potential bugcore/dev

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions