Meshery: [mesheryctl] Perf command - panic: runtime error: invalid memory address or nil pointer dereference

Created on 4 Jul 2020  Â·  8Comments  Â·  Source: layer5io/meshery

Description
Running mesheryctl perf results the following error:

$mesheryctl perf --url https://www.google.com
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x16d3c91]

goroutine 1 [running]:
github.com/layer5io/meshery/mesheryctl/internal/cli/root/cfg.(*MesheryCtl).GetBaseMesheryURL(...)
        /Users/runner/runners/2.263.0/work/meshery/meshery/mesheryctl/internal/cli/root/cfg/cfg.go:40
github.com/layer5io/meshery/mesheryctl/internal/cli/root/perf.glob..func2(0x1fa7460, 0xc000434660, 0x0, 0x2, 0x0, 0x0)
        /Users/runner/runners/2.263.0/work/meshery/meshery/mesheryctl/internal/cli/root/perf/perf.go:120 +0x3a1
github.com/spf13/cobra.(*Command).execute(0x1fa7460, 0xc000434640, 0x2, 0x2, 0x1fa7460, 0xc000434640)
        /Users/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:838 +0x460
github.com/spf13/cobra.(*Command).ExecuteC(0x1fa71c0, 0x1a19460, 0x1fd7eb0, 0x0)
        /Users/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:943 +0x317
github.com/spf13/cobra.(*Command).Execute(...)
        /Users/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:883
github.com/layer5io/meshery/mesheryctl/internal/cli/root.Execute()
        /Users/runner/runners/2.263.0/work/meshery/meshery/mesheryctl/internal/cli/root/root.go:87 +0xab
main.main()
        /Users/runner/runners/2.263.0/work/meshery/meshery/mesheryctl/cmd/mesheryctl/main.go:28 +0x93

Environment:

  • Version: v0.3.17
areperformance componenmesheryctl hacktoberfest issuwillfix kinbug languaggo priorithigh

All 8 comments

@kanishkarj fyi (something for after exams are over)

@leecalcote could you try running it on a local build of mesheryctl instead of the release build of mesheryctl. Because it is working on my system. I am assuming it is something with the build.

$mesheryctl perf --url https://www.google.com

@leecalcote Can you please verify the issue, as the given argument for the command is invalid?

This is fine - Untitled

Are we good to close this now?

This is an attempt with a bad (old) token. Ideally, the error message indicates a bad token, not failed requests.

Untitled

While we're in here, we may want to update the error message, which currently has "provider=Meshery" as an example token value.

We might also want to put a period on the end of Error: failed to add auth details to request, and perhaps, remove the : file read failed :: open provider=Meshery: no such file or directory message.

➜  ~ mesheryctl perf --url https://www.google.com --token "provider=Meshery"
Error: failed to add auth details to request
See https://meshery.layer5.io/docs/guides/mesheryctl#performance-management for usage details
: file read failed :: open provider=Meshery: no such file or directory
Usage:
  mesheryctl perf [flags]

Examples:
mesheryctl perf --name "a quick stress test" --url http://192.168.1.15/productpage --qps 300 --concurrent-requests 2 --duration 30s --token "provider=Meshery"

Issue has been fixed.

Was this page helpful?
0 / 5 - 0 ratings