github-vet / github-vet/rangeloop-pointer-findings
puyangsky/PKU-Kubernetes: test/e2e/federated-service.go; 3 LoC
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- PR metrics pending
Description
Found a possible issue in [puyangsky/PKU-Kubernetes](https://www.github.com/puyangsky/PKU-Kubernetes) at [test/e2e/federated-service.go](https://github.com/puyangsky/PKU-Kubernetes/blob/82efc9291d4771781c738a3753c855e1e499e5bb/test/e2e/federated-service.go#L79-L81)
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 context at line 80 may start a goroutine
[Click here to see the code in its original context.](https://github.com/puyangsky/PKU-Kubernetes/blob/82efc9291d4771781c738a3753c855e1e499e5bb/test/e2e/federated-service.go#L79-L81)
Click here to show the 3 line(s) of Go which triggered the analyzer.
```go
for _, context := range contexts {
createClusterObjectOrFail(f, &context)
}
```
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 {
"(DeclineOffer, 2)" -> {"(LaunchTasks, 3)";}
"(Do, 3)" -> {}
"(StatusUpdate, 2)" -> {}
"(handleHttps, 2)" -> {"(Server, 2)";}
"(send, 2)" -> {"(httpDo, 3)";}
"(httpDo, 3)" -> {}
"(configureTransport, 1)" -> {"(addConnIfNeeded, 3)";}
"(watchServices, 1)" -> {}
"(Update, 4)" -> {"(Get, 1)";}
"(initHandlers, 1)" -> {"(Remove, 1)";}
"(Remove, 1)" -> {"(Remove, 2)";}
"(restartAsStandaloneNode, 2)" -> {"(RestartNode, 1)";}
"(get, 1)" -> {"(SetTransportDefaults, 1)";}
"(runExecutor, 5)" -> {"(Init, 1)";}
"(statusUpdated, 3)" -> {"(StatusUpdate, 2)";}
"(Remove, 2)" -> {"(Do, 2)";}
"(dialWithoutProxy, 1)" -> {"(Dial, 3)";}
"(NewDockerManager, 24)" -> {"(NewSerializedImagePuller, 3)";}
"(quote, 2)" -> {"(Write, 1)";}
"(StartNode, 2)" -> {}
"(Run, 1)" -> {"(StartControllers, 2)";"(NewSSHTunnelList, 4)";"(ServerAPIVersions, 1)";"(NewConfigFactory, 4)";"(Update, 4)";"(StartControllers, 4)";"(Start, 1)";"(Run, 2)";"(Add, 1)";"(Write, 1)";"(Has, 1)";"(BasicLongRunningRequestCheck, 2)";}
"(send, 3)" -> {"(Set, 2)";"(Send, 3)";}
"(ConfigureTransport, 1)" -> {"(configureTransport, 1)";}
"(InstallVersionHandler, 2)" -> {"(Add, 1)";}
"(start, 1)" -> {}
"(startKubelet, 3)" -> {}
"(newClientTransport, 6)" -> {}
"(createClusterObjectOrFail, 2)" -> {"(Create, 1)";}
"(Do, 2)" -> {"(RoundTrip, 1)";}
"(Do, 1)" -> {"(block, 2)";"(Decode, 1)";}
"(Send, 2)" -> {"(send, 2)";}
"(dial, 1)" -> {"(dialWithoutProxy, 1)";}
"(Create, 1)" -> {"(New, 1)";}
"(init, 1)" -> {"(SetTransportDefaults, 1)";"(InstallVersionHandler, 2)";}
"(Has, 1)" -> {"(Get, 1)";"(Do, 3)";}
"(addConnIfNeeded, 3)" -> {}
"(unmarshal, 2)" -> {"(Copy, 2)";}
"(NewServer, 1)" -> {"(startNode, 3)";"(restartNode, 2)";"(restartAsStandaloneNode, 2)";}
"(Init, 1)" -> {"(NewConn, 1)";}
"(LaunchTasks, 3)" -> {"(send, 3)";"(pushLostTask, 3)";"(Equal, 1)";}
"(SetTransportDefaults, 1)" -> {"(ConfigureTransport, 1)";}
"(List, 1)" -> {"(List, 2)";"(Do, 2)";}
"(Set, 1)" -> {"(Set, 2)";}
"(Decode, 1)" -> {"(DecodeElement, 2)";}
"(DecodeElement, 2)" -> {"(unmarshal, 2)";}
"(Send, 3)" -> {"(Copy, 2)";"(Send, 2)";}
"(ServerAPIVersions, 1)" -> {"(Get, 1)";}
"(RunKubelet, 1)" -> {"(startKubelet, 3)";}
"(Start, 1)" -> {"(start, 1)";}
"(Set, 2)" -> {"(Do, 3)";}
"(block, 2)" -> {"(code, 2)";"(fencedCode, 3)";"(quote, 2)";}
"(ServeHTTP, 2)" -> {"(tryUpgrade, 6)";"(tryUpgrade, 2)";"(handleHttps, 2)";}
"(Server, 2)" -> {"(NewServer, 1)";}
"(startNode, 3)" -> {"(StartNode, 2)";}
"(StartControllers, 4)" -> {}
"(Copy, 2)" -> {"(ServeHTTP, 2)";}
"(pushLostTask, 3)" -> {"(statusUpdated, 3)";}
"(tryUpgrade, 6)" -> {"(DialURL, 2)";}
"(CreateAndInitKubelet, 1)" -> {"(NewMainKubelet, 66)";}
"(NewSerializedImagePuller, 3)" -> {}
"(newClient, 1)" -> {"(NewWatcher, 1)";"(Set, 1)";"(New, 3)";"(NewLease, 1)";}
"(fencedCode, 3)" -> {"(Write, 1)";}
"(Delete, 3)" -> {"(Do, 2)";}
"(DialURL, 2)" -> {"(Dial, 3)";}
"(New, 1)" -> {"(InstallAPIs, 1)";"(SetTransportDefaults, 1)";"(Do, 1)";"(DeclineOffer, 2)";"(newClient, 1)";"(New, 3)";"(get, 1)";"(init, 1)";"(initHandlers, 1)";}
"(NewSSHTunnelList, 4)" -> {}
"(New, 3)" -> {"(List, 1)";"(Delete, 2)";}
"(Equal, 1)" -> {"(Get, 1)";}
"(tryUpgrade, 2)" -> {"(DialURL, 2)";}
"(Dial, 3)" -> {"(NewClientConn, 3)";}
"(restartNode, 2)" -> {"(RestartNode, 1)";}
"(NewConfigFactory, 4)" -> {"(New, 2)";}
"(Get, 1)" -> {"(New, 2)";"(Do, 2)";}
"(RoundTrip, 1)" -> {"(dial, 1)";}
"(NewConn, 1)" -> {}
"(RestartNode, 1)" -> {}
"(clientHandshake, 2)" -> {"(newClientTransport, 6)";}
"(InstallAPIs, 1)" -> {"(Run, 1)";"(getExtensionResources, 1)";}
"(Write, 1)" -> {"(Copy, 2)";}
"(New, 2)" -> {}
"(BasicLongRunningRequestCheck, 2)" -> {"(Get, 1)";}
"(NewLease, 1)" -> {}
"(List, 2)" -> {}
"(Add, 1)" -> {"(Do, 3)";"(Has, 1)";"(Get, 1)";}
"(run, 2)" -> {"(New, 2)";"(RunKubelet, 1)";}
"(runKubelet, 7)" -> {"(CreateAndInitKubelet, 1)";}
"(Delete, 2)" -> {"(Get, 1)";"(Delete, 3)";}
"(code, 2)" -> {"(Write, 1)";}
"(getExtensionResources, 1)" -> {}
"(NewWatcher, 1)" -> {}
"(StartControllers, 2)" -> {}
"(Run, 2)" -> {"(run, 2)";"(runExecutor, 5)";"(runKubelet, 7)";"(watchServices, 1)";}
"(NewMainKubelet, 66)" -> {"(NewDockerManager, 24)";"(New, 15)";}
"(New, 15)" -> {"(NewSerializedImagePuller, 3)";}
"(NewClientConn, 3)" -> {"(clientHandshake, 2)";}
}
```
Leave a reaction on this issue to contribute to the project by classifying this instance as a **Bug** :-1:, **Mitigated** :+1:, or **Desirable Behavior** :rocket:
See the descriptions of the classifications [here](https://github.com/github-vet/rangeclosure-findings#how-can-i-help) for more information.
commit ID: 82efc9291d4771781c738a3753c855e1e499e5bb
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.