Masterminds / glide

Package Management for Golang
https://glide.sh
Other
8.15k stars 541 forks source link

Glide segmentation violation while building Helm #1021

Closed fxcoudert closed 6 years ago

fxcoudert commented 6 years ago

The issue was first reported to Helm, but I believe it may be a glide problem: https://github.com/helm/helm/issues/4584

Building Helm 2.10.0 on macOS (all version from 10.12 to 10.14) glide 0.13.1 fails with:

�[0;32m[INFO]   �[m--> Exporting k8s.io/apiserver
�[0;32m[INFO]   �[mReplacing existing vendor dependencies
�[0;32m[INFO]   �[mRemoving nested vendor and Godeps/_workspace directories...
�[0;32m[INFO]   �[mRemoving: /private/tmp/kubernetes-helm-20180924-57316-16wn6ua/src/k8s.io/helm/vendor/github.com/cyphar/filepath-securejoin/vendor
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x131f182]

goroutine 1 [running]:
github.com/Masterminds/glide/path.StripVendor.func1(0xc000036090, 0x82, 0x0, 0x0, 0x1540360, 0xc000241200, 0x0, 0x0)
    /private/tmp/glide-20180907-75095-1ck8wl4/glide-0.13.1/src/github.com/Masterminds/glide/path/strip.go:28 +0x42
path/filepath.walk(0xc00073f600, 0x77, 0x1547640, 0xc00057e5b0, 0xc0003e9140, 0x0, 0x0)
    /usr/local/Cellar/go/1.11/libexec/src/path/filepath/path.go:378 +0x21f
path/filepath.walk(0xc0004e3490, 0x70, 0x1547640, 0xc00057e000, 0xc0003e9140, 0x0, 0x0)
    /usr/local/Cellar/go/1.11/libexec/src/path/filepath/path.go:382 +0x2fe
path/filepath.walk(0xc00028c960, 0x5c, 0x1547640, 0xc0004ddee0, 0xc0003e9140, 0x0, 0x0)
    /usr/local/Cellar/go/1.11/libexec/src/path/filepath/path.go:382 +0x2fe
path/filepath.walk(0xc00028c000, 0x55, 0x1547640, 0xc000210c30, 0xc0003e9140, 0x0, 0x0)
    /usr/local/Cellar/go/1.11/libexec/src/path/filepath/path.go:382 +0x2fe
path/filepath.walk(0xc0005f6410, 0x4a, 0x1547640, 0xc0001ba270, 0xc0003e9140, 0x0, 0x20)
    /usr/local/Cellar/go/1.11/libexec/src/path/filepath/path.go:382 +0x2fe
path/filepath.Walk(0xc0005f6410, 0x4a, 0xc0003e9140, 0xc0001ba1a0, 0x0)
    /usr/local/Cellar/go/1.11/libexec/src/path/filepath/path.go:404 +0x105
github.com/Masterminds/glide/path.StripVendor(0x14d5ddf, 0x3b)
    /private/tmp/glide-20180907-75095-1ck8wl4/glide-0.13.1/src/github.com/Masterminds/glide/path/strip.go:22 +0x106
github.com/Masterminds/glide/action.Install(0xc0000a5480, 0x14c1501)
    /private/tmp/glide-20180907-75095-1ck8wl4/glide-0.13.1/src/github.com/Masterminds/glide/action/install.go:62 +0x351
main.commands.func12(0xc0001166e0, 0x0, 0xc0001166e0)
    /private/tmp/glide-20180907-75095-1ck8wl4/glide-0.13.1/src/github.com/Masterminds/glide/glide.go:510 +0x2b5
github.com/Masterminds/glide/vendor/github.com/codegangsta/cli.HandleAction(0x1438080, 0x14e03f0, 0xc0001166e0, 0xc0000b7100, 0x0)
    /private/tmp/glide-20180907-75095-1ck8wl4/glide-0.13.1/src/github.com/Masterminds/glide/vendor/github.com/codegangsta/cli/app.go:490 +0xc8
github.com/Masterminds/glide/vendor/github.com/codegangsta/cli.Command.Run(0x14bf842, 0x7, 0x14bde6b, 0x1, 0x0, 0x0, 0x0, 0x14cb14f, 0x20, 0x0, ...)
    /private/tmp/glide-20180907-75095-1ck8wl4/glide-0.13.1/src/github.com/Masterminds/glide/vendor/github.com/codegangsta/cli/command.go:210 +0x990
github.com/Masterminds/glide/vendor/github.com/codegangsta/cli.(*App).Run(0xc0001ea000, 0xc00009c090, 0x3, 0x3, 0x0, 0x0)
    /private/tmp/glide-20180907-75095-1ck8wl4/glide-0.13.1/src/github.com/Masterminds/glide/vendor/github.com/codegangsta/cli/app.go:255 +0x687
main.main()
    /private/tmp/glide-20180907-75095-1ck8wl4/glide-0.13.1/src/github.com/Masterminds/glide/glide.go:104 +0x556
make: *** [bootstrap] Error 2

This prevents us (Homebrew) from distributing a functional Helm: https://github.com/Homebrew/homebrew-core/issues/31486

mattfarina commented 6 years ago

I've identified the problem and will work to get it fixed and shipped over the next day.

mattfarina commented 6 years ago

Closing as this is fixed with the release of 0.13.2

fxcoudert commented 6 years ago

Thanks so much @mattfarina !