scope: ECS Probe - SIGSEGV: segmentation violation

When running scope on ECS with the --probe.ecs=true we get:

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

goroutine 51 [running]:
panic(0x1510980, 0xc420012050)
        /usr/lib/go-1.7/src/runtime/panic.go:500 +0x1a1
github.com/weaveworks/scope/probe/awsecs.ecsClientImpl.getTasks(0xc420021ca0, 0xc4232ce1e0, 0x18, 0x23b93c0, 0xc422d57c20, 0x23b93c0, 0xc422d57ce0, 0xc42360e000, 0x13, 0x20)
        /go/src/github.com/weaveworks/scope/probe/awsecs/client.go:236 +0x4a6
github.com/weaveworks/scope/probe/awsecs.ecsClientImpl.ensureTasksAreCached(0xc420021ca0, 0xc4232ce1e0, 0x18, 0x23b93c0, 0xc422d57c20, 0x23b93c0, 0xc422d57ce0, 0xc422e6cc80, 0x13, 0x13)
        /go/src/github.com/weaveworks/scope/probe/awsecs/client.go:289 +0x285
github.com/weaveworks/scope/probe/awsecs.ecsClientImpl.GetInfo(0xc420021ca0, 0xc4232ce1e0, 0x18, 0x23b93c0, 0xc422d57c20, 0x23b93c0, 0xc422d57ce0, 0xc422e6cc80, 0x13, 0x13, ...)
        /go/src/github.com/weaveworks/scope/probe/awsecs/client.go:353 +0x12f
github.com/weaveworks/scope/probe/awsecs.(*ecsClientImpl).GetInfo(0xc423664000, 0xc422e6cc80, 0x13, 0x13, 0x0, 0x13, 0xc4232ce1e0)
        <autogenerated>:12 +0x99
github.com/weaveworks/scope/probe/awsecs.Reporter.Tag(0xc4215bac00, 0x100000, 0x34630b8a000, 0xc421043270, 0xc421043150, 0x10, 0x0, 0x0, 0x0, 0x0, ...)
        /go/src/github.com/weaveworks/scope/probe/awsecs/reporter.go:145 +0x4b8
github.com/weaveworks/scope/probe/awsecs.(*Reporter).Tag(0xc4215bac90, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc4228dfa10, 0xc4228dfad0, 0x0, ...)
        <autogenerated>:18 +0xac
github.com/weaveworks/scope/probe.(*Probe).tag(0xc42035a090, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc4228dfa10, 0xc4228dfad0, 0x0, ...)
        /go/src/github.com/weaveworks/scope/probe/probe.go:180 +0x1b0
github.com/weaveworks/scope/probe.(*Probe).spyLoop(0xc42035a090)
        /go/src/github.com/weaveworks/scope/probe/probe.go:129 +0x1c1
created by github.com/weaveworks/scope/probe.(*Probe).Start
        /go/src/github.com/weaveworks/scope/probe/probe.go:102 +0x5c

Setting --probe.ecs=false works without issues.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 34 (16 by maintainers)

Commits related to this issue

Most upvoted comments

c is a struct, not a pointer, so it cannot be nil. Besides, it is used earlier on in the same function.