Skip to content

thed00de/hypernetes: pkg/controller/network/network_controller.go; 3 LoC #7114

Open
@githubvet

Description

@githubvet

Found a possible issue in thed00de/hypernetes at pkg/controller/network/network_controller.go

Below is the message reported by the analyzer for this snippet of code. Beware that the analyzer only reports the first issue it finds, so please do not limit your consideration to the contents of the below message.

function call which takes a reference to ep at line 599 may start a goroutine

Click here to see the code in its original context.

Click here to show the 3 line(s) of Go which triggered the analyzer.
for _, ep := range endpointList.Items {
	e.addEndpoint(&ep)
}
Click here to show extra information the analyzer produced.
The following graphviz dot graph describes paths through the callgraph that could lead to a function calling a goroutine:
digraph G {
  "(addEndpoint, 1)" -> {"(Get, 1)";}
  "(getConn, 1)" -> {}
  "(dial, 1)" -> {"(dialWithoutProxy, 1)";}
  "(send, 2)" -> {"(httpDo, 3)";}
  "(httpDo, 3)" -> {}
  "(NewSerializedImagePuller, 3)" -> {}
  "(RoundTrip, 1)" -> {"(DetailedRoundTrip, 1)";"(Write, 1)";"(dial, 1)";}
  "(StatusUpdate, 2)" -> {}
  "(Do, 1)" -> {"(ServeHTTP, 2)";}
  "(DetailedRoundTrip, 1)" -> {"(getConn, 1)";}
  "(send, 3)" -> {"(Send, 3)";}
  "(clientHandshake, 2)" -> {"(newClientTransport, 6)";}
  "(New, 13)" -> {"(NewSerializedImagePuller, 3)";}
  "(RunKubelet, 1)" -> {"(startKubelet, 3)";}
  "(Send, 2)" -> {"(send, 2)";}
  "(Do, 3)" -> {}
  "(ServeHTTP, 2)" -> {"(handleHttps, 2)";"(Copy, 2)";"(tryUpgrade, 6)";"(tryUpgrade, 2)";}
  "(Add, 1)" -> {"(Do, 3)";}
  "(tryUpgrade, 6)" -> {"(DialURL, 2)";}
  "(Run, 1)" -> {"(Start, 1)";"(StartControllers, 4)";"(NewSSHTunnelList, 4)";"(Run, 2)";}
  "(statusUpdated, 3)" -> {"(StatusUpdate, 2)";}
  "(Set, 2)" -> {"(Do, 3)";}
  "(watchServices, 1)" -> {}
  "(Init, 1)" -> {"(NewConn, 1)";}
  "(New, 2)" -> {}
  "(Get, 2)" -> {"(Do, 3)";}
  "(Run, 2)" -> {"(run, 2)";"(runExecutor, 5)";"(runKubelet, 7)";"(watchServices, 1)";}
  "(runExecutor, 5)" -> {"(Init, 1)";}
  "(run, 2)" -> {"(RunKubelet, 1)";}
  "(Send, 3)" -> {"(Send, 2)";}
  "(Do, 2)" -> {"(RoundTrip, 1)";"(Write, 1)";"(Do, 1)";"(New, 1)";}
  "(handleHttps, 2)" -> {}
  "(LaunchTasks, 3)" -> {"(send, 3)";"(pushLostTask, 3)";}
  "(InstallAPIs, 1)" -> {"(Run, 1)";"(getExtensionResources, 1)";}
  "(getExtensionResources, 1)" -> {}
  "(StartControllers, 4)" -> {}
  "(New, 8)" -> {"(NewSerializedImagePuller, 3)";}
  "(Get, 3)" -> {"(Do, 2)";"(Do, 3)";}
  "(New, 3)" -> {"(List, 1)";}
  "(runKubelet, 7)" -> {"(CreateAndInitKubelet, 1)";}
  "(tryUpgrade, 2)" -> {"(DialURL, 2)";}
  "(List, 1)" -> {"(List, 2)";}
  "(NewConn, 1)" -> {}
  "(NewSSHTunnelList, 4)" -> {}
  "(dialWithoutProxy, 1)" -> {"(Dial, 3)";}
  "(NewClientConn, 3)" -> {"(clientHandshake, 2)";}
  "(newClientTransport, 6)" -> {}
  "(NewDockerManager, 23)" -> {"(NewSerializedImagePuller, 3)";}
  "(Dial, 3)" -> {"(NewClientConn, 3)";}
  "(Get, 1)" -> {"(Get, 2)";"(Do, 2)";"(Set, 2)";"(Do, 1)";"(Add, 2)";"(Remove, 1)";"(New, 2)";"(Get, 3)";}
  "(Write, 1)" -> {"(Copy, 2)";}
  "(Remove, 1)" -> {"(New, 1)";}
  "(DeclineOffer, 2)" -> {"(LaunchTasks, 3)";}
  "(New, 1)" -> {"(InstallAPIs, 1)";"(New, 3)";"(DeclineOffer, 2)";}
  "(List, 2)" -> {}
  "(start, 1)" -> {}
  "(Add, 2)" -> {"(Do, 2)";"(Add, 1)";}
  "(Copy, 2)" -> {}
  "(startKubelet, 3)" -> {}
  "(Start, 1)" -> {"(start, 1)";}
  "(pushLostTask, 3)" -> {"(statusUpdated, 3)";}
  "(DialURL, 2)" -> {"(Dial, 3)";}
  "(CreateAndInitKubelet, 1)" -> {"(NewMainKubelet, 61)";}
  "(NewMainKubelet, 61)" -> {"(NewDockerManager, 23)";"(New, 8)";"(New, 13)";}
}

Leave a reaction on this issue to contribute to the project by classifying this instance as a Bug 👎, Mitigated 👍, or Desirable Behavior 🚀
See the descriptions of the classifications here for more information.

commit ID: 19ee49a4c0c598d63a248593eb48ec1103dfd37f

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions