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

Invalid memory address or nil pointer dereference when linting #1547

Closed
AnesBenmerzoug opened this issue Aug 12, 2019 · 0 comments · Fixed by #1548
Closed

Invalid memory address or nil pointer dereference when linting #1547

AnesBenmerzoug opened this issue Aug 12, 2019 · 0 comments · Fixed by #1548
Labels
Milestone

Comments

@AnesBenmerzoug
Copy link
Contributor

Is this a BUG REPORT or FEATURE REQUEST?:

Bug Report

What happened:

When running the lint command on any template I get the following error:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0xf67bf5]

goroutine 1 [running]:
github.com/argoproj/argo/pkg/client/clientset/versioned.(*Clientset).ArgoprojV1alpha1(0x0, 0xc00041daa0, 0x14fa987)
	/home/koutetsu/go/src/github.com/argoproj/argo/pkg/client/clientset/versioned/clientset.go:26 +0x5
github.com/argoproj/argo/workflow/validate.ValidateWorkflow(0x1683aa0, 0x0, 0x14f4988, 0x7, 0xc000585180, 0x1, 0x0, 0x0, 0x0, 0x199)
	/home/koutetsu/go/src/github.com/argoproj/argo/workflow/validate/validate.go:90 +0x27e
github.com/argoproj/argo/workflow/validate.LintWorkflowFile(0x1683aa0, 0x0, 0x14f4988, 0x7, 0x7ffe51e58077, 0x19, 0x1, 0x1, 0x11)
	/home/koutetsu/go/src/github.com/argoproj/argo/workflow/validate/lint.go:65 +0x4cc
github.com/argoproj/argo/cmd/argo/commands.NewLintCommand.func1(0xc00028a780, 0xc0001e5080, 0x1, 0x1)
	/home/koutetsu/go/src/github.com/argoproj/argo/cmd/argo/commands/lint.go:50 +0x283
github.com/argoproj/argo/vendor/github.com/spf13/cobra.(*Command).execute(0xc00028a780, 0xc0001e5030, 0x1, 0x1, 0xc00028a780, 0xc0001e5030)
	/home/koutetsu/go/src/github.com/argoproj/argo/vendor/github.com/spf13/cobra/command.go:766 +0x2cc
github.com/argoproj/argo/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc000113180, 0xc00028b900, 0xc00028b680, 0xc00028aa00)
	/home/koutetsu/go/src/github.com/argoproj/argo/vendor/github.com/spf13/cobra/command.go:852 +0x2fd
github.com/argoproj/argo/vendor/github.com/spf13/cobra.(*Command).Execute(0xc000113180, 0x0, 0xc000284d80)
	/home/koutetsu/go/src/github.com/argoproj/argo/vendor/github.com/spf13/cobra/command.go:800 +0x2b
main.main()
	/home/koutetsu/go/src/github.com/argoproj/argo/cmd/argo/main.go:17 +0x27
roj/argo/vendor/github.com/spf13/cobra.(*Command).execute(0xc00028a780, 0xc0001e5030, 0x1, 0x1, 0xc00028a780, 0xc0001e5030)
	/home/koutetsu/go/src/github.com/argoproj/argo/vendor/github.com/spf13/cobra/command.go:766 +0x2cc
github.com/argoproj/argo/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc000113180, 0xc00028b900, 0xc00028b680, 0xc00028aa00)
	/home/koutetsu/go/src/github.com/argoproj/argo/vendor/github.com/spf13/cobra/command.go:852 +0x2fd
github.com/argoproj/argo/vendor/github.com/spf13/cobra.(*Command).Execute(0xc000113180, 0x0, 0xc000284d80)
	/home/koutetsu/go/src/github.com/argoproj/argo/vendor/github.com/spf13/cobra/command.go:800 +0x2b
main.main()
	/home/koutetsu/go/src/github.com/argoproj/argo/cmd/argo/main.go:17 +0x27

What you expected to happen:

Before this bug, the cli would print the following:

Workflow Validated

How to reproduce it (as minimally and precisely as possible):

On the current master branch, simply build the cli and run:

./dist/argo lint examples/hello-world.yaml

Linting works on commit 4864c32ffa40861c5ca066f67615da6d52eaa8b5

After running git bisect I found that the bug was introduced in commit 0246d184add04e44f77ffbe00e796b3adaf535d2

Anything else we need to know?:

Environment:

  • Argo version:
$ argo version
argo: v2.4.0+5331fc0.dirty
  BuildDate: 2019-08-12T18:44:43Z
  GitCommit: 5331fc02e257266a4a5887dfe6277e5a0b42e7fc
  GitTreeState: dirty
  GoVersion: go1.11.12
  Compiler: gc
  Platform: linux/amd64
  • Kubernetes version :
$ kubectl version -o yaml
clientVersion:
  buildDate: "2019-08-05T17:09:13Z"
  compiler: gc
  gitCommit: f6278300bebbb750328ac16ee6dd3aa7d3549568
  gitTreeState: clean
  gitVersion: v1.15.2
  goVersion: go1.12.7
  major: "1"
  minor: "15"
  platform: linux/amd64
serverVersion:
  buildDate: "2019-06-19T16:32:14Z"
  compiler: gc
  gitCommit: e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529
  gitTreeState: clean
  gitVersion: v1.15.0
  goVersion: go1.12.5
  major: "1"
  minor: "15"
  platform: linux/amd64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants