Skip to content

Conversation

@ldez
Copy link
Contributor

@ldez ldez commented May 8, 2019

What does this PR do?

Don't add TCP proxy when error occurs during creation.

Motivation

Fixes #4856

Stack: goroutine 6489 [running]:
runtime/debug.Stack(0xc0000cc240, 0x1fd8c52, 0x17)
	/usr/local/go/src/runtime/debug/stack.go:24 +0x9d
github.com/containous/traefik/pkg/safe.defaultRecoverGoroutine(0x1c9ab60, 0x3a09680)
	/go/src/github.com/containous/traefik/pkg/safe/routine.go:148 +0x9e
github.com/containous/traefik/pkg/safe.GoWithRecover.func1.1(0x207e5c0)
	/go/src/github.com/containous/traefik/pkg/safe/routine.go:139 +0x57
panic(0x1c9ab60, 0x3a09680)
	/usr/local/go/src/runtime/panic.go:522 +0x1b5
github.com/containous/traefik/pkg/tcp.(*Proxy).ServeTCP(0x0, 0x23a9440, 0xc0004d6750)
	/go/src/github.com/containous/traefik/pkg/tcp/proxy.go:30 +0x115
github.com/containous/traefik/pkg/tcp.(*RRLoadBalancer).ServeTCP(0xc000089800, 0x23a9440, 0xc0004d6750)
	/go/src/github.com/containous/traefik/pkg/tcp/rr_load_balancer.go:24 +0x53
github.com/containous/traefik/pkg/tcp.(*Router).ServeTCP(0xc0008e5440, 0x23a93e0, 0xc000628080)
	/go/src/github.com/containous/traefik/pkg/tcp/router.go:35 +0x2c0
github.com/containous/traefik/pkg/tcp.(*HandlerSwitcher).ServeTCP(0xc0003ab320, 0x23a93e0, 0xc000628080)
	/go/src/github.com/containous/traefik/pkg/tcp/switcher.go:19 +0x6c
github.com/containous/traefik/pkg/server.(*TCPEntryPoint).startTCP.func1()
	/go/src/github.com/containous/traefik/pkg/server/server_entrypoint_tcp.go:108 +0xb4
github.com/containous/traefik/pkg/safe.GoWithRecover.func1(0x207e5c0, 0xc000628060)
	/go/src/github.com/containous/traefik/pkg/safe/routine.go:142 +0x4d
created by github.com/containous/traefik/pkg/safe.GoWithRecover
	/go/src/github.com/containous/traefik/pkg/safe/routine.go:136 +0x49

More

  • Added/updated tests
  • Added/updated documentation

@traefiker traefiker added this to the 2.0 milestone May 8, 2019
@ldez ldez force-pushed the fix/tcp-server branch 2 times, most recently from 292e85e to 5aab00a Compare May 8, 2019 02:33
@ldez ldez requested a review from juliens May 8, 2019 02:35
@ldez ldez changed the title fix: panic when error during TCP proxy creation. Don't add TCP proxy when error occurs during creation. May 8, 2019
@ldez ldez force-pushed the fix/tcp-server branch 4 times, most recently from 244b311 to 551cb74 Compare May 8, 2019 06:51
Copy link
Collaborator

@SantoDE SantoDE 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

@dtomcej dtomcej left a comment

Choose a reason for hiding this comment

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

LGTM
:shipit:

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

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