Closed squillace closed 4 years ago
Yeah, brand new project, do nothing at all but put - az
in the mixins section, and boom:
Fastest bug to go away in the world. Seems I had an emtpy -
in the install:
action. That one line, with a hyphen, seems to have caused the SEGV.
Hey Ralph, we'd like to catch and validate stuff like this as part of #532. Was this the offending YAML, where there was an action with no mixin specified?
install:
- az:
... good yaml
-
- exec:
... moar good yaml
$ porter install
Building bundle ===>
Copying porter runtime ===>
Copying mixins ===>
Copying mixin exec ===>
Generating Dockerfile =======>
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x4436a87]
goroutine 1 [running]:
get.porter.sh/porter/pkg/manifest.(*Step).GetMixinName(0x0, 0x716ce70, 0x0)
/Users/carolynvs/go/src/get.porter.sh/porter/pkg/manifest/manifest.go:445 +0x37
get.porter.sh/porter/pkg/build.(*DockerfileGenerator).getMixinBuildInput.func1(0x57e2c13, 0x7, 0xc000452210, 0x2, 0x2)
/Users/carolynvs/go/src/get.porter.sh/porter/pkg/build/dockerfile-generater.go:212 +0xbd
get.porter.sh/porter/pkg/build.(*DockerfileGenerator).getMixinBuildInput(0xc0005c97e0, 0xc000228080, 0x4, 0x6951598, 0x0, 0x40d6908)
/Users/carolynvs/go/src/get.porter.sh/porter/pkg/build/dockerfile-generater.go:219 +0x12f
get.porter.sh/porter/pkg/build.(*DockerfileGenerator).buildMixinsSection(0xc0005c97e0, 0xc0003a3400, 0x9, 0x10, 0x0, 0x0)
/Users/carolynvs/go/src/get.porter.sh/porter/pkg/build/dockerfile-generater.go:178 +0x1c3
get.porter.sh/porter/pkg/build.(*DockerfileGenerator).buildDockerfile(0xc0005c97e0, 0x0, 0x0, 0x4437f95, 0x27, 0x4f)
/Users/carolynvs/go/src/get.porter.sh/porter/pkg/build/dockerfile-generater.go:61 +0xd4
get.porter.sh/porter/pkg/build.(*DockerfileGenerator).GenerateDockerFile(0xc0005c97e0, 0x0, 0x0)
/Users/carolynvs/go/src/get.porter.sh/porter/pkg/build/dockerfile-generater.go:37 +0x40
get.porter.sh/porter/pkg/porter.(*Porter).Build(0xc0000f0630, 0xc0000da000, 0xc0005c9870, 0x1)
/Users/carolynvs/go/src/get.porter.sh/porter/pkg/porter/build.go:38 +0x155
get.porter.sh/porter/pkg/porter.(*Porter).ensureLocalBundleIsUpToDate(0xc0000f0630, 0x57e92a6, 0xb, 0xc0002dac20, 0x11, 0x0, 0x0, 0x0, 0x0)
/Users/carolynvs/go/src/get.porter.sh/porter/pkg/porter/stamp.go:25 +0x1aa
get.porter.sh/porter/pkg/porter.(*Porter).InstallBundle(0xc0000f0630, 0x57e92a6, 0xb, 0xc0002dac20, 0x11, 0x0, 0x0, 0xc0002289e8, 0x5, 0x1, ...)
/Users/carolynvs/go/src/get.porter.sh/porter/pkg/porter/install.go:30 +0xcc
main.buildBundleInstallCommand.func2(0xc000403180, 0x6951598, 0x0, 0x0, 0x0, 0x0)
/Users/carolynvs/go/src/get.porter.sh/porter/cmd/porter/bundle.go:85 +0x7e
github.com/spf13/cobra.(*Command).execute(0xc000403180, 0x6951598, 0x0, 0x0, 0xc000403180, 0x6951598)
/Users/carolynvs/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:826 +0x460
github.com/spf13/cobra.(*Command).ExecuteC(0xc0001cea00, 0x0, 0xaa400, 0xc0000b8058)
/Users/carolynvs/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914 +0x2fb
github.com/spf13/cobra.(*Command).Execute(...)
/Users/carolynvs/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
main.main()
/Users/carolynvs/go/src/get.porter.sh/porter/cmd/porter/main.go:18 +0x27
I've gotten that to reproduce but wanted to double check that was what you saw too.
I've moved this issue into the porter backlog since it's not specific to any mixin.
yeah, that repro is pretty much what I found and removed and everything started working....
@carolynvs I would like to pickup this issue
Sounds good! 👍
Just so that you know, now that you are on the @deislabs/porters team, feel free to continue to comment on the issue and then assign it to yourself. Any issue that is labeled and in the backlog on our project board (as long as it's not hmm 🛑🤔
) is fair game.
Members of the @deislabs/porters team have permission to self-assign issues. I am working on updating the contributing guide to explain the team permissions soon, now that we have more contributors. 💃
Install the following:
Note that the
az
mixin you have used extensively is there, version v0.4.1-beta.1 (c27e188). So, put- az
in the porter.yaml file:Build the bundle:
Generating Dockerfile =======> panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x83a057]
goroutine 1 [running]: get.porter.sh/porter/pkg/manifest.(Step).GetMixinName(0x0, 0xc0000ce4f0, 0x5) /home/vsts/work/1/s/gopath/src/get.porter.sh/porter/pkg/manifest/manifest.go:445 +0x37 get.porter.sh/porter/pkg/build.(DockerfileGenerator).getMixinBuildInput.func1(0x1bdcea2, 0x7, 0xc00037f9b0, 0x5, 0x5) /home/vsts/work/1/s/gopath/src/get.porter.sh/porter/pkg/build/dockerfile-generater.go:212 +0xbd get.porter.sh/porter/pkg/build.(DockerfileGenerator).getMixinBuildInput(0xc0004fdd18, 0xc0000ce3f8, 0x4, 0x2d406c0, 0x0, 0x4d5b38) /home/vsts/work/1/s/gopath/src/get.porter.sh/porter/pkg/build/dockerfile-generater.go:219 +0x12f get.porter.sh/porter/pkg/build.(DockerfileGenerator).buildMixinsSection(0xc0004fdd18, 0xc000120000, 0x9, 0x10, 0x0, 0x0) /home/vsts/work/1/s/gopath/src/get.porter.sh/porter/pkg/build/dockerfile-generater.go:178 +0x1c3 get.porter.sh/porter/pkg/build.(DockerfileGenerator).buildDockerfile(0xc0004fdd18, 0x0, 0x0, 0x83b565, 0x22, 0x4f) /home/vsts/work/1/s/gopath/src/get.porter.sh/porter/pkg/build/dockerfile-generater.go:61 +0xd4 get.porter.sh/porter/pkg/build.(DockerfileGenerator).GenerateDockerFile(0xc0004fdd18, 0x0, 0x0) /home/vsts/work/1/s/gopath/src/get.porter.sh/porter/pkg/build/dockerfile-generater.go:37 +0x40 get.porter.sh/porter/pkg/porter.(Porter).Build(0xc00038cc00, 0xc0004fdd00, 0x0, 0x0) /home/vsts/work/1/s/gopath/src/get.porter.sh/porter/pkg/porter/build.go:38 +0x155 main.buildBundleBuildCommand.func1(0xc000435400, 0x2d406c0, 0x0, 0x0, 0x0, 0x0) /home/vsts/work/1/s/gopath/src/get.porter.sh/porter/cmd/porter/bundle.go:53 +0x35 github.com/spf13/cobra.(Command).execute(0xc000435400, 0x2d406c0, 0x0, 0x0, 0xc000435400, 0x2d406c0) /home/vsts/work/1/s/gopath/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:826 +0x460 github.com/spf13/cobra.(Command).ExecuteC(0xc0002d6780, 0x0, 0x18dc300, 0xc0000ac058) /home/vsts/work/1/s/gopath/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914 +0x2fb github.com/spf13/cobra.(Command).Execute(...) /home/vsts/work/1/s/gopath/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864 main.main() /home/vsts/work/1/s/gopath/src/get.porter.sh/porter/cmd/porter/main.go:18 +0x27