Skip to content

Check for ExecFunc failure#1459

Merged
mavenugo merged 1 commit intomoby:masterfrom
sanimej:panic
Sep 21, 2016
Merged

Check for ExecFunc failure#1459
mavenugo merged 1 commit intomoby:masterfrom
sanimej:panic

Conversation

@sanimej
Copy link
Copy Markdown

@sanimej sanimej commented Sep 21, 2016

Related to docker #26356

Panic was in ServeDNS(), in this dereference extConn.LocalAddr().String()

                        log.Debugf("Query %s[%d] from %s, forwarding to %s:%s", name, query.Question[0].Qtype,
                                extConn.LocalAddr().String(), proto, extDNS.ipStr)

It can happen only if the execFunc failed for some reason. #1412 already added a check for the execFunc failure. But the error from InvokeFunc was being ignored. Fixed that and also added error checks for other calls to InvokeFunc()

There is a 2nd panic mentioned in the same issue. Its a different decode. We can ask the submitter to open a different issue after collecting the required info to root cause it.

Signed-off-by: Santhosh Manohar santhosh@docker.com

Signed-off-by: Santhosh Manohar <santhosh@docker.com>
Comment thread sandbox.go
sb.osSbox.InvokeFunc(sb.resolver.SetupFunc(0))
if err := sb.resolver.Start(); err != nil {
log.Errorf("Resolver Setup/Start failed for container %s, %q", sb.ContainerID(), err)
if err := sb.osSbox.InvokeFunc(sb.resolver.SetupFunc(0)); err == nil {
Copy link
Copy Markdown
Contributor

@aboch aboch Sep 21, 2016

Choose a reason for hiding this comment

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

I don't think invokeFunc does return any error from the execution of the parameter function.
https://github.com/docker/libnetwork/blob/master/osl/namespace_linux.go#L333

never mind...

@aboch
Copy link
Copy Markdown
Contributor

aboch commented Sep 21, 2016

LGTM

@mavenugo
Copy link
Copy Markdown
Contributor

@sanimej just to be clear. #1412 already addressed the panic issue & this PR doesn't address the panic issue directly.

The primary purpose of this PR is to cherry-pick into release/v0.8. And #1412 is NOT in that branch. Hence i think you should push another PR just fixing the panic issue to release/v0.8.

@mavenugo
Copy link
Copy Markdown
Contributor

since this is going in master... its fine I guess. When cherry-picking to 1.12.2, we have to redo the patch to take into account that #1412 is not there.

LGTM

@mavenugo mavenugo merged commit 892324f into moby:master Sep 21, 2016
@sanimej
Copy link
Copy Markdown
Author

sanimej commented Sep 21, 2016

just to be clear. #1412 already addressed the panic issue & this PR doesn't address the panic issue directly.

#1412 will not fix the panic. Because the error from InvokeFunc is not being returned in ExecFunc.

@mavenugo
Copy link
Copy Markdown
Contributor

@sanimej thats correct #1412 didn't fix the panic. And yes, this PR is still required.

@aboch aboch mentioned this pull request Sep 22, 2016
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.

4 participants