Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

dep init: pkgtree poisonblack panic due to nil map entry #617

Closed
ascandella opened this issue May 21, 2017 · 6 comments
Closed

dep init: pkgtree poisonblack panic due to nil map entry #617

ascandella opened this issue May 21, 2017 · 6 comments

Comments

@ascandella
Copy link
Contributor

ascandella commented May 21, 2017

Go Version
1.8.1

Architecture
Darwin x86_64 (Sierra 10.12.4)

I can consistently reproduce this on https://github.com/uber-go/zap@fab453050a7a08c35f31fc5fff6f2dbd962285ab (tip of master at the time of writing):

Running dep init with the latest master of dep (8bdd9e5)

zap - master! ❯ dep init -v
dep: Finding dependencies for "github.com/uber-go/zap"...
dep: Found 193 dependencies.
Searching GOPATH for projects...
dep: Building dependency graph...
dep: Found import of "github.com/Sirupsen/logrus", analyzing...
  Using ^0.8.7 as constraint for direct dep github.com/Sirupsen/logrus
  Locking in v0.8.7 (418b41d) for direct dep github.com/Sirupsen/logrus
dep: Found import of "github.com/VividCortex/gohistogram", analyzing...
dep: Could not determine version for "github.com/VividCortex/gohistogram", omitting from generated manifest
dep: Found import of "github.com/afex/hystrix-go/hystrix", analyzing...
dep: Could not determine version for "github.com/afex/hystrix-go", omitting from generated manifest
dep: Found import of "github.com/apache/thrift/lib/go/thrift", analyzing...
  Using cada370 as hint for direct dep github.com/apache/thrift
dep: Found import of "github.com/apex/log", analyzing...
dep: Could not determine version for "github.com/apex/log", omitting from generated manifest
dep: Found import of "github.com/aphistic/golf", analyzing...
dep: Could not determine version for "github.com/aphistic/golf", omitting from generated manifest
dep: Found import of "github.com/aws/aws-sdk-go/aws", analyzing...
  Using master as constraint for direct dep github.com/aws/aws-sdk-go
  Locking in master (64ecfaa) for direct dep github.com/aws/aws-sdk-go
dep: Found import of "github.com/bugsnag/bugsnag-go", analyzing...
dep: Could not determine version for "github.com/bugsnag/bugsnag-go", omitting from generated manifest
dep: Found import of "github.com/cactus/go-statsd-client/statsd", analyzing...
  Using dc93b85 as hint for direct dep github.com/cactus/go-statsd-client
dep: Found import of "github.com/coreos/etcd/client", analyzing...
  Using master as constraint for direct dep github.com/coreos/etcd
  Locking in master (f2a4993) for direct dep github.com/coreos/etcd
dep: Found import of "github.com/davecgh/go-spew/spew", analyzing...
  Using 5215b55 as hint for direct dep github.com/davecgh/go-spew
dep: Found import of "github.com/dgrijalva/jwt-go", analyzing...
dep: Could not determine version for "github.com/dgrijalva/jwt-go", omitting from generated manifest
dep: Found import of "github.com/getsentry/raven-go", analyzing...
  Using c8f8fb7 as hint for direct dep github.com/getsentry/raven-go
dep: Found import of "github.com/go-kit/kit/circuitbreaker", analyzing...
dep: Could not determine version for "github.com/go-kit/kit", omitting from generated manifest
dep: Found import of "github.com/go-logfmt/logfmt", analyzing...
dep: Could not determine version for "github.com/go-logfmt/logfmt", omitting from generated manifest
dep: Found import of "github.com/go-stack/stack", analyzing...
  Using master as constraint for direct dep github.com/go-stack/stack
  Locking in master (100eb0c) for direct dep github.com/go-stack/stack
dep: Found import of "github.com/golang/protobuf/proto", analyzing...
  Using 8df8a93 as hint for direct dep github.com/golang/protobuf
dep: Found import of "github.com/gorilla/mux", analyzing...
  Using master as constraint for direct dep github.com/gorilla/mux
  Locking in master (c9e326e) for direct dep github.com/gorilla/mux
dep: Found import of "github.com/hashicorp/consul/api", analyzing...
  Using master as constraint for direct dep github.com/hashicorp/consul
  Locking in master (71e3901) for direct dep github.com/hashicorp/consul
dep: Found import of "github.com/influxdata/influxdb/client/v2", analyzing...
dep: Could not determine version for "github.com/influxdata/influxdb", omitting from generated manifest
dep: Found import of "github.com/jessevdk/go-flags", analyzing...
  Using master as constraint for direct dep github.com/jessevdk/go-flags
  Locking in master (460c7bb) for direct dep github.com/jessevdk/go-flags
dep: Found import of "github.com/juju/ratelimit", analyzing...
dep: Could not determine version for "github.com/juju/ratelimit", omitting from generated manifest
dep: Found import of "github.com/kr/logfmt", analyzing...
dep: Could not determine version for "github.com/kr/logfmt", omitting from generated manifest
dep: Found import of "github.com/lightstep/lightstep-tracer-go", analyzing...
dep: Could not determine version for "github.com/lightstep/lightstep-tracer-go", omitting from generated manifest
dep: Found import of "github.com/mattn/go-colorable", analyzing...
  Using master as constraint for direct dep github.com/mattn/go-colorable
  Locking in master (d228849) for direct dep github.com/mattn/go-colorable
dep: Found import of "github.com/mattn/go-isatty", analyzing...
  Using master as constraint for direct dep github.com/mattn/go-isatty
  Locking in master (30a891c) for direct dep github.com/mattn/go-isatty
dep: Found import of "github.com/opentracing/opentracing-go", analyzing...
  Using 1b62b0c as hint for direct dep github.com/opentracing/opentracing-go
dep: Found import of "github.com/openzipkin/zipkin-go-opentracing", analyzing...
dep: Could not determine version for "github.com/openzipkin/zipkin-go-opentracing", omitting from generated manifest
dep: Found import of "github.com/pborman/uuid", analyzing...
  Using cccd189 as hint for direct dep github.com/pborman/uuid
dep: Found import of "github.com/performancecopilot/speed", analyzing...
dep: Could not determine version for "github.com/performancecopilot/speed", omitting from generated manifest
dep: Found import of "github.com/pkg/errors", analyzing...
  Using master as constraint for direct dep github.com/pkg/errors
  Locking in master (ff09b13) for direct dep github.com/pkg/errors
dep: Found import of "github.com/pmezard/go-difflib/difflib", analyzing...
  Using e8554b8 as hint for direct dep github.com/pmezard/go-difflib
dep: Found import of "github.com/prometheus/client_golang/prometheus", analyzing...
dep: Could not determine version for "github.com/prometheus/client_golang", omitting from generated manifest
dep: Found import of "github.com/rogpeppe/fastuuid", analyzing...
dep: Could not determine version for "github.com/rogpeppe/fastuuid", omitting from generated manifest
dep: Found import of "github.com/samuel/go-zookeeper/zk", analyzing...
dep: Could not determine version for "github.com/samuel/go-zookeeper", omitting from generated manifest
dep: Found import of "github.com/sirupsen/logrus", analyzing...
  Using ^0.8.7 as constraint for direct dep github.com/sirupsen/logrus
  Locking in v0.8.7 (418b41d) for direct dep github.com/sirupsen/logrus
dep: Found import of "github.com/sony/gobreaker", analyzing...
dep: Could not determine version for "github.com/sony/gobreaker", omitting from generated manifest
dep: Found import of "github.com/streadway/handy/breaker", analyzing...
dep: Could not determine version for "github.com/streadway/handy", omitting from generated manifest
dep: Found import of "github.com/stretchr/objx", analyzing...
  Using 1a9d0bb as hint for direct dep github.com/stretchr/objx
dep: Found import of "github.com/stretchr/testify/assert", analyzing...
  Using e3a8ff8 as hint for direct dep github.com/stretchr/testify
dep: Found import of "github.com/stvp/go-udp-testing", analyzing...
dep: Could not determine version for "github.com/stvp/go-udp-testing", omitting from generated manifest
dep: Found import of "github.com/tj/go-elastic/batch", analyzing...
dep: Could not determine version for "github.com/tj/go-elastic", omitting from generated manifest
dep: Found import of "github.com/tj/go-kinesis", analyzing...
dep: Could not determine version for "github.com/tj/go-kinesis", omitting from generated manifest
dep: Found import of "github.com/tobi/airbrake-go", analyzing...
dep: Could not determine version for "github.com/tobi/airbrake-go", omitting from generated manifest
dep: Found import of "github.com/uber/bark", analyzing...
dep: Could not determine version for "github.com/uber/bark", omitting from generated manifest
dep: Found import of "go.pedge.io/lion", analyzing...
dep: Could not determine version for "go.pedge.io/lion", omitting from generated manifest
dep: Found import of "go.uber.org/atomic", analyzing...
  Using master as constraint for direct dep go.uber.org/atomic
  Locking in master (4e33664) for direct dep go.uber.org/atomic
dep: Found import of "go.uber.org/zap", analyzing...
  Using master as constraint for direct dep go.uber.org/zap
  Locking in master (1550bc0) for direct dep go.uber.org/zap
dep: Found import of "golang.org/x/net/context", analyzing...
  Using 7f88271 as hint for direct dep golang.org/x/net
dep: Found import of "golang.org/x/sys/plan9", analyzing...
  Using master as constraint for direct dep golang.org/x/sys
  Locking in master (a646d33) for direct dep golang.org/x/sys
dep: Found import of "google.golang.org/grpc", analyzing...
dep: Could not determine version for "google.golang.org/grpc", omitting from generated manifest
dep: Found import of "gopkg.in/inconshreveable/log15.v2", analyzing...
dep: Could not determine version for "gopkg.in/inconshreveable/log15.v2", omitting from generated manifest
dep: Found import of "sourcegraph.com/sourcegraph/appdash", analyzing...
dep: Could not determine version for "sourcegraph.com/sourcegraph/appdash", omitting from generated manifest
dep: Analyzing transitive imports...
dep: Analyzing "github.com/go-kit/kit/examples/addsvc/thrift/gen-go/addsvc"...
dep: Analyzing "github.com/go-kit/kit/metrics/expvar"...
dep: Analyzing "github.com/hashicorp/consul/api"...
dep: Analyzing "github.com/hashicorp/go-cleanhttp"...
  Locking in master (ce617e7) for transitive dep github.com/hashicorp/go-cleanhttp
dep: Analyzing "github.com/hashicorp/serf/coordinate"...
  Locking in master (39c7c06) for transitive dep github.com/hashicorp/serf
dep: Analyzing "github.com/influxdata/influxdb/client/v2"...
dep: Analyzing "gopkg.in/inconshreveable/log15.v2"...
dep: Analyzing "github.com/bugsnag/bugsnag-go"...
dep: Analyzing "github.com/go-kit/kit/log/term"...
dep: Analyzing "github.com/go-kit/kit/metrics/dogstatsd"...
dep: Analyzing "github.com/opentracing/opentracing-go/mocktracer"...
dep: Analyzing "github.com/tj/go-elastic/batch"...
dep: Analyzing "go.uber.org/zap"...
dep: Analyzing "go.uber.org/atomic"...
dep: Analyzing "github.com/go-kit/kit/examples/shipping/booking"...
dep: Analyzing "github.com/stretchr/testify/assert"...
dep: Analyzing "github.com/davecgh/go-spew/spew"...
dep: Analyzing "github.com/pmezard/go-difflib/difflib"...
dep: Analyzing "go.uber.org/zap/internal/color"...
dep: Analyzing "go.uber.org/zap/internal/multierror"...
dep: Analyzing "github.com/davecgh/go-spew/spew/testdata"...
dep: Analyzing "github.com/getsentry/raven-go"...
dep: Analyzing "github.com/go-kit/kit/metrics/influx"...
dep: Analyzing "github.com/go-kit/kit/sd"...
dep: Analyzing "github.com/go-kit/kit/transport/grpc"...
dep: Analyzing "github.com/stvp/go-udp-testing"...
dep: Analyzing "github.com/Sirupsen/logrus/hooks/airbrake"...
dep: Analyzing "github.com/tobi/airbrake-go"...
dep: Analyzing "github.com/juju/ratelimit"...
dep: Analyzing "github.com/pborman/uuid"...
dep: Analyzing "sourcegraph.com/sourcegraph/appdash/opentracing"...
dep: Analyzing "github.com/coreos/etcd/client"...
dep: Analyzing "github.com/go-kit/kit/examples/profilesvc"...
dep: Analyzing "github.com/go-kit/kit/examples/shipping/handling"...
dep: Analyzing "github.com/go-kit/kit/sd/lb"...
dep: Analyzing "github.com/opentracing/opentracing-go"...
dep: Analyzing "gopkg.in/inconshreveable/log15.v2/term"...
dep: Analyzing "github.com/aws/aws-sdk-go/aws"...
dep: Analyzing "github.com/go-ini/ini"...
  Locking in master (afbd495) for transitive dep github.com/go-ini/ini
dep: Analyzing "github.com/go-kit/kit/examples/shipping/voyage"...
dep: Analyzing "github.com/go-kit/kit/log/level"...
dep: Analyzing "github.com/go-kit/kit/examples/addsvc/client/thrift"...
dep: Analyzing "github.com/go-kit/kit/transport/httprp"...
dep: Analyzing "github.com/uber/bark/mocks"...
dep: Analyzing "go.uber.org/zap/zaptest/observer"...
dep: Analyzing "gopkg.in/inconshreveable/log15.v2/stack"...
dep: Analyzing "golang.org/x/sys/unix"...
dep: Analyzing "golang.org/x/sys/windows"...
dep: Analyzing "github.com/VividCortex/gohistogram"...
dep: Analyzing "github.com/go-kit/kit/examples/addsvc/client/http"...
dep: Analyzing "github.com/go-kit/kit/examples/shipping/tracking"...
dep: Analyzing "github.com/go-kit/kit/metrics/teststat"...
dep: Analyzing "github.com/go-kit/kit/util/conn"...
dep: Analyzing "golang.org/x/net/context"...
dep: Analyzing "github.com/go-kit/kit/examples/shipping/inspection"...
dep: Analyzing "github.com/go-kit/kit/ratelimit"...
dep: Analyzing "github.com/go-stack/stack"...
dep: Analyzing "github.com/performancecopilot/speed"...
dep: Analyzing "go.uber.org/zap/internal/bufferpool"...
dep: Analyzing "golang.org/x/sys/windows/registry"...
dep: Analyzing "github.com/apex/log/handlers/text"...
dep: Analyzing "github.com/go-kit/kit/tracing/opentracing"...
dep: Analyzing "github.com/golang/protobuf/proto"...
dep: Analyzing "github.com/lightstep/lightstep-tracer-go"...
dep: Analyzing "github.com/pkg/errors"...
dep: Analyzing "github.com/apex/log/handlers/discard"...
dep: Analyzing "github.com/go-kit/kit/metrics/discard"...
dep: Analyzing "github.com/samuel/go-zookeeper/zk"...
dep: Analyzing "golang.org/x/sys/windows/svc/mgr"...
dep: Analyzing "github.com/go-kit/kit/examples/addsvc/pb"...
dep: Analyzing "github.com/jessevdk/go-flags"...
dep: Analyzing "github.com/stretchr/objx"...
dep: Analyzing "go.pedge.io/lion"...
dep: Analyzing "github.com/go-kit/kit/transport/grpc/_grpc_test/pb"...
dep: Analyzing "github.com/stretchr/testify/http"...
dep: Analyzing "golang.org/x/sys/windows/svc/eventlog"...
dep: Analyzing "github.com/go-kit/kit/examples/shipping/cargo"...
dep: Analyzing "github.com/sirupsen/logrus"...
dep: Analyzing "github.com/tj/go-kinesis"...
dep: Analyzing "golang.org/x/sys/windows/svc"...
dep: Analyzing "github.com/aws/aws-sdk-go/service/kinesis"...
dep: Analyzing "github.com/jmespath/go-jmespath"...
  Locking in master (c01cf91) for transitive dep github.com/jmespath/go-jmespath
dep: Analyzing "github.com/go-kit/kit/examples/shipping/routing"...
dep: Analyzing "github.com/stretchr/testify/mock"...
dep: Analyzing "github.com/go-kit/kit/metrics/internal/lv"...
dep: Analyzing "github.com/go-kit/kit/examples/addsvc"...
dep: Analyzing "github.com/go-kit/kit/metrics/graphite"...
dep: Analyzing "github.com/go-kit/kit/metrics/statsd"...
dep: Analyzing "github.com/rogpeppe/fastuuid"...
dep: Analyzing "github.com/stretchr/testify/require"...
dep: Analyzing "go.uber.org/zap/internal/exit"...
dep: Analyzing "github.com/Sirupsen/logrus"...
dep: Analyzing "github.com/apex/log"...
dep: Analyzing "github.com/apex/log/handlers/memory"...
dep: Analyzing "github.com/cactus/go-statsd-client/statsd"...
dep: Analyzing "github.com/go-kit/kit/log/deprecated_levels"...
dep: Analyzing "github.com/streadway/handy/breaker"...
dep: Analyzing "github.com/go-kit/kit/sd/consul"...
dep: Analyzing "github.com/sony/gobreaker"...
dep: Analyzing "github.com/go-kit/kit/examples/shipping/inmem"...
dep: Analyzing "github.com/uber/bark"...
dep: Analyzing "github.com/apex/log/handlers/json"...
dep: Analyzing "github.com/gorilla/mux"...
dep: Analyzing "github.com/gorilla/context"...
  Locking in master (1ea2538) for transitive dep github.com/gorilla/context
dep: Analyzing "google.golang.org/grpc/metadata"...
dep: Analyzing "github.com/apex/log/handlers/logfmt"...
dep: Analyzing "github.com/dgrijalva/jwt-go"...
dep: Analyzing "github.com/prometheus/client_golang/prometheus"...
dep: Analyzing "go.uber.org/zap/buffer"...
dep: Analyzing "github.com/afex/hystrix-go/hystrix"...
dep: Analyzing "github.com/go-kit/kit/examples/shipping/location"...
dep: Analyzing "github.com/go-kit/kit/metrics/generic"...
dep: Analyzing "github.com/go-kit/kit/metrics/prometheus"...
dep: Analyzing "github.com/opentracing/opentracing-go/ext"...
dep: Analyzing "go.uber.org/zap/zapcore"...
dep: Analyzing "github.com/aphistic/golf"...
dep: Analyzing "github.com/go-kit/kit/sd/cache"...
dep: Analyzing "github.com/go-kit/kit/transport/http"...
dep: Analyzing "github.com/mattn/go-isatty"...
dep: Analyzing "github.com/aws/aws-sdk-go/aws/session"...
dep: Analyzing "go.uber.org/zap/zaptest"...
dep: Analyzing "github.com/apex/log/handlers/multi"...
dep: Analyzing "github.com/go-kit/kit/metrics"...
dep: Analyzing "github.com/kr/logfmt"...
dep: Analyzing "github.com/mattn/go-colorable"...
dep: Analyzing "golang.org/x/net/context/ctxhttp"...
dep: Analyzing "github.com/apex/log/handlers/level"...
dep: Analyzing "github.com/go-kit/kit/examples/addsvc/client/grpc"...
dep: Analyzing "github.com/go-kit/kit/log"...
dep: Analyzing "github.com/go-kit/kit/transport/grpc/_grpc_test"...
dep: Analyzing "golang.org/x/sys/windows/svc/debug"...
dep: Analyzing "sourcegraph.com/sourcegraph/appdash"...
dep: Analyzing "github.com/go-kit/kit/endpoint"...
dep: Analyzing "github.com/go-kit/kit/metrics/internal/ratemap"...
dep: Analyzing "github.com/openzipkin/zipkin-go-opentracing"...
dep: Analyzing "golang.org/x/sys/plan9"...
dep: Analyzing "google.golang.org/grpc"...
dep: Analyzing "github.com/apache/thrift/lib/go/thrift"...
dep: Analyzing "github.com/go-kit/kit/circuitbreaker"...
dep: Analyzing "github.com/go-logfmt/logfmt"...
Using network for remaining projects...
dep: Solving...
Root project is "github.com/uber-go/zap"
 146 transitively valid internal packages
 135 external packages imported from 53 projects
(0)   ✓ select (root)
(1)     ? attempt github.com/Sirupsen/logrus with 2 pkgs; at least 1 versions to try
(1)         try github.com/Sirupsen/[email protected]
(1)     ✓ select github.com/Sirupsen/[email protected] w/2 pkgs
(2)     ? attempt github.com/aws/aws-sdk-go with 3 pkgs; at least 1 versions to try
(2)         try github.com/aws/aws-sdk-go@master
(2)     ✓ select github.com/aws/aws-sdk-go@master w/19 pkgs
(3)     ? attempt github.com/apache/thrift with 1 pkgs; at least 1 versions to try
(3)         try github.com/apache/thrift@cada37008ce6e609fe6312596d3ced760e5cd60c
(3)     ✓ select github.com/apache/thrift@cada37008ce6e609fe6312596d3ced760e5cd60c w/1 pkgs
(4)     ? attempt github.com/cactus/go-statsd-client with 1 pkgs; at least 1 versions to try
(4)         try github.com/cactus/go-statsd-client@dc93b8587d799a204e96175505fff9678a8ec3e1
(4)     ✓ select github.com/cactus/go-statsd-client@dc93b8587d799a204e96175505fff9678a8ec3e1 w/1 pkgs
(5)     ? attempt github.com/go-ini/ini with 1 pkgs; at least 1 versions to try
(5)         try github.com/go-ini/ini@master
(5)     ✓ select github.com/go-ini/ini@master w/1 pkgs
(6)     ? attempt github.com/coreos/etcd with 1 pkgs; at least 1 versions to try
(6)         try github.com/coreos/etcd@master
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x114d608]

goroutine 1 [running]:
github.com/golang/dep/internal/gps/pkgtree.wmToReach.func3(0xc42044a1c0, 0x1, 0x1, 0xc42027b9a1, 0x4b)
        /Users/aiden/src/go/src/github.com/golang/dep/internal/gps/pkgtree/pkgtree.go:632 +0x78
github.com/golang/dep/internal/gps/pkgtree.wmToReach.func4(0xc42027b9a1, 0x4b, 0xc42044a1c0, 0x1, 0x1, 0xc42044a101)
        /Users/aiden/src/go/src/github.com/golang/dep/internal/gps/pkgtree/pkgtree.go:771 +0x462
github.com/golang/dep/internal/gps/pkgtree.wmToReach.func4(0xc4207f8f30, 0x21, 0xc42044a1c0, 0x1, 0x1, 0x0)
        /Users/aiden/src/go/src/github.com/golang/dep/internal/gps/pkgtree/pkgtree.go:728 +0xd08
github.com/golang/dep/internal/gps/pkgtree.wmToReach(0xc4207cbd20, 0xc4207cbd01, 0xc4207cbd10, 0xc4208278d8)
        /Users/aiden/src/go/src/github.com/golang/dep/internal/gps/pkgtree/pkgtree.go:810 +0xd1c
github.com/golang/dep/internal/gps/pkgtree.PackageTree.ToReachMap(0xc4201f93a0, 0x16, 0xc420994840, 0x10001, 0xc4209871d0, 0x167f520, 0xc4202f0de0)
        /Users/aiden/src/go/src/github.com/golang/dep/internal/gps/pkgtree/pkgtree.go:501 +0x2c0
github.com/golang/dep/internal/gps.(*solver).getImportsAndConstraintsOf(0xc42001efc0, 0xc4201f93a0, 0x16, 0x0, 0x0, 0x167f520, 0xc4202f0de0, 0xc4203107f0, 0x1, 0x1, ...)
        /Users/aiden/src/go/src/github.com/golang/dep/internal/gps/solver.go:537 +0x1f7
github.com/golang/dep/internal/gps.(*solver).check(0xc42001efc0, 0xc4201f93a0, 0x16, 0x0, 0x0, 0x167f520, 0xc4202f0de0, 0xc4203107f0, 0x1, 0x1, ...)
        /Users/aiden/src/go/src/github.com/golang/dep/internal/gps/satisfy.go:43 +0x1f0
github.com/golang/dep/internal/gps.(*solver).findValidVersion(0xc42001efc0, 0xc420253900, 0xc4203107f0, 0x1, 0x1, 0x0, 0xc4203107f0)
        /Users/aiden/src/go/src/github.com/golang/dep/internal/gps/solver.go:807 +0x2d5
github.com/golang/dep/internal/gps.(*solver).createVersionQueue(0xc42001efc0, 0xc4201f93a0, 0x16, 0x0, 0x0, 0xc4203107f0, 0x1, 0x1, 0x0, 0x0, ...)
        /Users/aiden/src/go/src/github.com/golang/dep/internal/gps/solver.go:780 +0xafc
github.com/golang/dep/internal/gps.(*solver).solve(0xc42001efc0, 0x0, 0x0, 0x1e)
        /Users/aiden/src/go/src/github.com/golang/dep/internal/gps/solver.go:397 +0x471
github.com/golang/dep/internal/gps.(*solver).Solve(0xc42001efc0, 0x2e, 0x167b220, 0x16c8dc8, 0xc42001c09c)
        /Users/aiden/src/go/src/github.com/golang/dep/internal/gps/solver.go:348 +0xab
main.(*initCommand).Run(0xc420153732, 0xc420137840, 0xc420010320, 0x0, 0x0, 0x0, 0x0)
        /Users/aiden/src/go/src/github.com/golang/dep/cmd/dep/init.go:182 +0xf17
main.(*Config).Run(0xc42001af60, 0xc42001af60)
        /Users/aiden/src/go/src/github.com/golang/dep/cmd/dep/main.go:159 +0x8b3
main.main()
        /Users/aiden/src/go/src/github.com/golang/dep/cmd/dep/main.go:44 +0x253

Diving into variables with delve:

> github.com/golang/dep/internal/gps/pkgtree.wmToReach.func3() /Users/aiden/src/go/src/github.com/golang/dep/internal/gps/pkgtree/pkgtree.go:629 (hits goroutine(1):1 total:1) (PC: 0x114fd04)
   624:         poisonBlack := func(path []string, from string) {
   625:                 // Because the outer dfe loop ensures we never directly re-visit a pkg
   626:                 // that was already completed (black), we don't have to defend against
   627:                 // an empty path here.
   628:
=> 629:                 fromErr := errmap[from]
   630:                 err := &ProblemImportError{
   631:                         Err:   fromErr.Err,
   632:                         Cause: make([]string, 0, len(path)+len(fromErr.Cause)+1),
   633:                 }
   634:                 err.Cause = append(err.Cause, path...)
(dlv) p path
[]string len: 1, cap: 1, [
        "github.com/coreos/etcd/etcdserver/auth",
]
(dlv) p from
"github.com/coreos/etcd/Godeps/_workspace/src/github.com/coreos/p...+11 more"
(dlv) locals
poison = github.com/golang/dep/internal/gps/pkgtree.wmToReach.func1
fromErr = (*github.com/golang/dep/internal/gps/pkgtree.ProblemImportError)(0x1011acc)
errmap = map[string]*github.com/golang/dep/internal/gps/pkgtree.ProblemImportError [...]
err = (*github.com/golang/dep/internal/gps/pkgtree.ProblemImportError)(0xc420607b40)
(dlv) p errmap
map[string]*github.com/golang/dep/internal/gps/pkgtree.ProblemImportError [
        "github.com/coreos/etcd/snap/snappb": *{
                ImportPath: "github.com/coreos/etcd/snap/snappb",
                Cause: []string len: 1, cap: 1, [
                        "github.com/coreos/etcd/Godeps/_workspace/src/github.com/gogo/pro...+11 more",
                ],
                Err: error(*errors.errorString) ...,},
        "github.com/coreos/etcd/hack/insta-discovery": *{
                ImportPath: "github.com/coreos/etcd/hack/insta-discovery",
                Cause: []string len: 0, cap: 0, [],
                Err: error(*go/build.NoGoError) ...,},
        "github.com/coreos/etcd/hack/tls-setup/config": *{
                ImportPath: "github.com/coreos/etcd/hack/tls-setup/config",
                Cause: []string len: 0, cap: 0, [],
                Err: error(*go/build.NoGoError) ...,},
        "github.com/coreos/etcd/hack": *{
                ImportPath: "github.com/coreos/etcd/hack",
                Cause: []string len: 0, cap: 0, [],
                Err: error(*go/build.NoGoError) ...,},
        "github.com/coreos/etcd/version": *{
                ImportPath: "github.com/coreos/etcd/version",
                Cause: []string len: 2, cap: 2, [
                        "github.com/coreos/etcd/pkg/fileutil",
                        "github.com/coreos/etcd/Godeps/_workspace/src/github.com/coreos/p...+11 more",
                ],
                Err: error(*errors.errorString) ...,},
        "github.com/coreos/etcd/pkg/fileutil": *{
                ImportPath: "github.com/coreos/etcd/pkg/fileutil",
                Cause: []string len: 1, cap: 1, [
                        "github.com/coreos/etcd/Godeps/_workspace/src/github.com/coreos/p...+11 more",
                ],
                Err: error(*errors.errorString) ...,},
]

basically, fromErr is nil and the comment above suggests that should never be the case.

It would be pretty easy to add a comma-ok and check for that, but I'm unfamiliar with this part of the codebase and don't want to band-aid if this is indicative of a larger issue. Looks like the code was originally added in 3179508 but later moved.

@sdboyer
Copy link
Member

sdboyer commented May 22, 2017

Yeah I've had this backburnered for a little while - it's the same panic as #607 and #357. As far as I've surmised from previous passes, the actual, data-level problem is that the depth-first traversal logic in wmToReach() assumes that there are no "internal" import statements pointing to packages that do not exist.

One user-visible way that can arise is if a dependency's main is in the required list in Gopkg.toml. There are other ways we can get there too, though, as those conditions can't occur on dep init. Either way, the solution probably ends up being the same.

@sdboyer
Copy link
Member

sdboyer commented May 22, 2017

(not that i've decided on exactly what that solution should be just yet 😛 )

@sdboyer sdboyer added the bug label May 22, 2017
@ascandella
Copy link
Contributor Author

OK, we should probably just close this as a duplicate then, right? Or leave this open since I added the dlv output?

@sdboyer
Copy link
Member

sdboyer commented May 22, 2017

I'm fine to leave it open - the dlv output is helpful, but we also need to be cognizant of the different input circumstances that might lead to it occurring. as i'm not immediately clear on how a dep init could reach this bug, it seems like something new here 😄

@sdboyer
Copy link
Member

sdboyer commented May 23, 2017

Err whoops, not #357, #351

@sdboyer
Copy link
Member

sdboyer commented Aug 10, 2017

closing this, as it's band-aid-ed now and #351 is enough of a marker issue for the underlying problem that remains

@sdboyer sdboyer closed this as completed Aug 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants