Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vault debug on Windows results in panic #14394

Closed
davemay99 opened this issue Mar 7, 2022 · 0 comments · Fixed by #14399
Closed

vault debug on Windows results in panic #14394

davemay99 opened this issue Mar 7, 2022 · 0 comments · Fixed by #14399
Labels
bug Used to indicate a potential bug core Issues and Pull-Requests specific to Vault Core os/windows

Comments

@davemay99
Copy link
Contributor

Describe the bug
When running vault debug from a Windows command line, a panic occurs while bundling the files.

To Reproduce
Steps to reproduce the behavior:

  1. Run vault debug -duration=5s from a Windows command prompt
  2. See panic

Expected behavior
The debug bundle should be written to a tarball.

Environment:

  • Vault Server Version: n/a
  • Vault CLI Version: any
  • Server Operating System/Architecture: run the CLI on Windows

Additional context

Click to expand example
PS C:\git\hashicorp\vault> vault.exe debug -duration=5s

Overwriting interval value "30s" to the duration value "5s"
Overwriting metrics interval value "10s" to the duration value "5s"
==> Starting debug capture...
         Vault Address: http://127.0.0.1:8200
        Client Version: 1.9.4
              Duration: 5s
              Interval: 5s
      Metrics Interval: 5s
               Targets: config, host, metrics, pprof, replication-status, server-status, log
                Output: vault-debug-2022-03-07T19-47-30Z.tar.gz

==> Capturing static information...
2022-03-07T19:47:30.673Z [INFO]  capturing configuration state

==> Capturing dynamic information...
2022-03-07T19:47:30.773Z [INFO]  capturing metrics: count=0
2022-03-07T19:47:30.775Z [INFO]  capturing pprof data: count=0
2022-03-07T19:47:30.775Z [INFO]  capturing replication status: count=0
2022-03-07T19:47:30.775Z [INFO]  capturing server status: count=0
2022-03-07T19:47:30.775Z [INFO]  capturing host information: count=0
2022-03-07T19:47:35.774Z [INFO]  capturing metrics: count=1
2022-03-07T19:47:35.776Z [INFO]  capturing host information: count=1
2022-03-07T19:47:35.776Z [INFO]  capturing replication status: count=1
2022-03-07T19:47:35.776Z [INFO]  capturing server status: count=1
2022-03-07T19:47:36.084Z [INFO]  capturing pprof data: count=1
Finished capturing information, bundling files...
panic: interface conversion: interface {} is nil, not map[string]interface {}

goroutine 1 [running]:
github.com/hashicorp/vault/command.(*DebugCommand).generateIndex.func1({0xc0006196d0, 0xc0006196d0}, {0x6573348, 0xc00021ad20}, {0x0, 0x0})
        /home/runner/work/vault/vault/command/debug.go:336 +0x6a5
path/filepath.walk({0xc0006196d0, 0x41}, {0x6573348, 0xc00021ad20}, 0xc000b6fb90)
        /opt/hostedtoolcache/go/1.17.7/x64/src/path/filepath/path.go:418 +0x125
path/filepath.walk({0xc0007b9980, 0x35}, {0x6573348, 0xc00021acb0}, 0xc000b6fb90)
        /opt/hostedtoolcache/go/1.17.7/x64/src/path/filepath/path.go:442 +0x28f
path/filepath.walk({0xc0004ee300, 0x20}, {0x6573348, 0xc00021ac40}, 0xc000b6fb90)
        /opt/hostedtoolcache/go/1.17.7/x64/src/path/filepath/path.go:442 +0x28f
path/filepath.Walk({0xc0004ee300, 0x20}, 0xc000b6fb90)
        /opt/hostedtoolcache/go/1.17.7/x64/src/path/filepath/path.go:505 +0x6c
github.com/hashicorp/vault/command.(*DebugCommand).generateIndex(0xc0008611d0)
        /home/runner/work/vault/vault/command/debug.go:303 +0xdb
github.com/hashicorp/vault/command.(*DebugCommand).Run(0xc0008611d0, {0xc000148020, 0x1, 0x2})
        /home/runner/work/vault/vault/command/debug.go:275 +0x6fb
github.com/mitchellh/cli.(*CLI).Run(0xc000bbf7c0)
        /home/runner/go/pkg/mod/github.com/mitchellh/[email protected]/cli.go:262 +0x5f8
github.com/hashicorp/vault/command.RunCustom({0xc000148010, 0x2, 0x3}, 0xc00008e000)
        /home/runner/work/vault/vault/command/main.go:180 +0xa17
github.com/hashicorp/vault/command.Run(...)
        /home/runner/work/vault/vault/command/main.go:88
main.main()
        /home/runner/work/vault/vault/main.go:10 +0x52
@sgmiller sgmiller added core Issues and Pull-Requests specific to Vault Core bug Used to indicate a potential bug labels Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Used to indicate a potential bug core Issues and Pull-Requests specific to Vault Core os/windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants