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

Fix nil value when tracing is enabled #3192

Merged
merged 1 commit into from
Apr 16, 2018
Merged

Conversation

mmatur
Copy link
Member

@mmatur mmatur commented Apr 16, 2018

What does this PR do?

Fix nil value when tracing is enabled

Motivation

$ docker run traefik:1.6.0-rc5 --tracing --tracing.backend=zipkin --tracing.jaeger=false
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x87f6d7]goroutine 1 [running]:
github.com/containous/traefik/middlewares/tracing/zipkin.(*Config).Setup(0x0, 0x21b1c7b, 0x7, 0xb7413b, 0xc4208d2000, 0xc4208d4000, 0x0, 0x0, 0xc4205ef578)
    /go/src/github.com/containous/traefik/middlewares/tracing/zipkin/zipkin.go:23 +0x37
github.com/containous/traefik/middlewares/tracing.(*Tracing).Setup(0xc4203d8910)
    /go/src/github.com/containous/traefik/middlewares/tracing/tracing.go:54 +0x111
github.com/containous/traefik/server.NewServer(0xc4201d44f0, 0x0, 0x100, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc4203d8910, ...)
    /go/src/github.com/containous/traefik/server/server.go:114 +0x58e
main.runCmd(0xc4201f8000, 0x0, 0x0)
    /go/src/github.com/containous/traefik/cmd/traefik/traefik.go:180 +0x330
main.main.func1(0x1f0c4e0, 0xc420526660)
    /go/src/github.com/containous/traefik/cmd/traefik/traefik.go:54 +0x42
github.com/containous/traefik/vendor/github.com/containous/staert.(*Staert).Run(0xc420128360, 0xc4201f8000, 0xc420526660)
    /go/src/github.com/containous/traefik/vendor/github.com/containous/staert/staert.go:84 +0x2e
main.main()
    /go/src/github.com/containous/traefik/cmd/traefik/traefik.go:142 +0x1b19

More

  • Added/updated tests

Copy link
Contributor

@ldez ldez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@juliens juliens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@nmengin nmengin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@traefiker traefiker merged commit 8519b0d into traefik:v1.6 Apr 16, 2018
@mmatur mmatur deleted the fix/tracing-nil branch April 16, 2018 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants