github-vet / github-vet/rangeloop-pointer-findings

evergreen-ci/evergreen: model/task_lifecycle.go; 3 LoC

Open
#9,522 0 comments 0 reactions 0 assignees View on GitHub
fresh tiny
Dominant language
No language data
Stars
0
Forks
0
PR merge metrics
PR metrics pending

Description

Found a possible issue in [evergreen-ci/evergreen](https://www.github.com/evergreen-ci/evergreen) at [model/task_lifecycle.go](https://github.com/evergreen-ci/evergreen/blob/a30fb318ff554bfa7becbbbc3d5ad63e356be156/model/task_lifecycle.go#L415-L417)

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 et at line 416 may start a goroutine

[Click here to see the code in its original context.](https://github.com/evergreen-ci/evergreen/blob/a30fb318ff554bfa7becbbbc3d5ad63e356be156/model/task_lifecycle.go#L415-L417)

Click here to show the 3 line(s) of Go which triggered the analyzer.

```go
for _, et := range execTasks {
catcher.Add(doStepback(&et))
}

```

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 {
"(CopyConsole, 6)" -> {}
"(find, 1)" -> {"(String, 1)";}
"(newServerTransport, 4)" -> {}
"(Process, 3)" -> {"(fixImports, 3)";"(fixImports, 2)";}
"(GetDockerLogs, 5)" -> {"(GetDockerLogs, 4)";}
"(Walk, 3)" -> {"(Push, 1)";}
"(monitor, 4)" -> {}
"(copyPipes, 7)" -> {}
"(Join, 2)" -> {"(GetMember, 1)";}
"(NewClient, 1)" -> {"(NewClient, 3)";}
"(TryDial, 1)" -> {"(TryDialWithAddr, 2)";}
"(List, 2)" -> {"(Walk, 3)";}
"(sendTestLogs, 5)" -> {"(sendTestLog, 4)";}
"(Find, 1)" -> {"(find, 1)";"(Open, 1)";"(Copy, 2)";"(Add, 1)";"(Load, 1)";"(Resolve, 1)";}
"(WatchFrom, 3)" -> {}
"(Decode, 1)" -> {"(Close, 1)";}
"(Walk, 2)" -> {"(List, 2)";}
"(pullOCI, 4)" -> {"(pullSchema2Layers, 4)";}
"(StartTLS, 1)" -> {}
"(Start, 1)" -> {"(start, 1)";"(CopyConsole, 6)";"(worker, 4)";}
"(allPackages, 4)" -> {}
"(newTaskManager, 4)" -> {}
"(containerStart, 4)" -> {"(initHealthMonitor, 1)";}
"(Create, 3)" -> {"(Validate, 2)";}
"(NewLoggerWithContext, 4)" -> {"(MakeLoggerWithContext, 3)";}
"(insert, 4)" -> {}
"(serveBiDirectionalStream, 2)" -> {}
"(GetMember, 1)" -> {"(Send, 0)";}
"(referrers, 1)" -> {"(Build, 1)";}
"(PullContext, 2)" -> {"(fetch, 2)";}
"(Push, 1)" -> {"(PushContext, 2)";}
"(pullV2Tag, 3)" -> {"(pullOCI, 4)";"(pullSchema2, 4)";}
"(New, 3)" -> {"(configureTLS, 4)";"(Release, 1)";"(newOracle, 4)";"(Pull, 1)";}
"(DelayStart, 6)" -> {}
"(Add, 2)" -> {"(Spec, 1)";}
"(Import, 1)" -> {"(newLeaseUpdater, 3)";}
"(Copy, 2)" -> {"(copyPipes, 7)";"(Create, 1)";"(Put, 1)";"(Get, 0)";"(String, 1)";}
"(Search, 2)" -> {"(Do, 2)";"(Parse, 1)";"(Set, 2)";"(Execute, 2)";}
"(start, 2)" -> {"(Session, 2)";"(Remove, 1)";}
"(SendRequest, 3)" -> {"(Do, 3)";}
"(runCommandSet, 7)" -> {"(Execute, 4)";}
"(runTaskCommands, 2)" -> {"(runCommands, 4)";}
"(append, 1)" -> {}
"(UpdateRole, 1)" -> {"(Send, 0)";}
"(Sign, 1)" -> {"(New, 2)";"(Send, 0)";}
"(newServer, 2)" -> {"(NewServerConn, 2)";}
"(ServeHTTP, 2)" -> {"(serveBiDirectionalStream, 2)";}
"(Update, 1)" -> {"(ConcurrentUpdate, 4)";"(Update, 2)";}
"(Prepare, 1)" -> {"(Upgrade, 7)";"(Pull, 8)";}
"(initializeSubsystem, 3)" -> {"(Create, 2)";}
"(Load, 2)" -> {"(newVertex, 5)";}
"(NewSigner, 4)" -> {"(New, 2)";}
"(Get, 2)" -> {"(get, 1)";"(New, 2)";"(Start, 1)";"(implements, 1)";"(Do, 3)";}
"(apply, 2)" -> {"(Update, 2)";}
"(load, 1)" -> {"(parsePackageFiles, 2)";}
"(NewClient, 3)" -> {"(Prepare, 1)";}
"(Verify, 3)" -> {"(verify, 3)";}
"(loadListeners, 2)" -> {"(Init, 4)";}
"(New, 1)" -> {"(Init, 0)";"(NewServer, 1)";"(Get, 2)";"(apply, 2)";"(Get, 0)";"(Parse, 1)";"(newV2Client, 4)";"(New, 5)";"(Get, 1)";"(CreateNode, 1)";"(New, 2)";"(NewSigner, 4)";"(New, 3)";"(enableCSM, 3)";"(Sign, 1)";"(run, 1)";"(Load, 2)";"(Log, 1)";}
"(Do, 2)" -> {"(RoundTrip, 1)";"(Write, 1)";}
"(write, 3)" -> {"(Prune, 3)";}
"(New, 2)" -> {"(load, 1)";"(Update, 1)";"(Init, 2)";"(initializeSubsystem, 3)";}
"(superviseManager, 5)" -> {"(runManager, 5)";}
"(Update, 2)" -> {"(reconcileTaskState, 4)";"(Create, 2)";}
"(parseFiles, 6)" -> {}
"(Dial, 3)" -> {"(NewClientConn, 3)";}
"(newClientTransport, 6)" -> {}
"(Clean, 1)" -> {"(Remove, 1)";}
"(New, 5)" -> {"(NewClient, 5)";}
"(Get, 0)" -> {"(Do, 2)";"(run, 4)";}
"(Init, 1)" -> {"(startTask, 3)";}
"(CreateNode, 1)" -> {"(Send, 0)";}
"(doStepback, 1)" -> {"(Add, 1)";"(Find, 1)";}
"(delete, 1)" -> {"(Update, 1)";}
"(ForEachPackage, 2)" -> {"(allPackages, 3)";"(allPackages, 4)";}
"(Build, 1)" -> {"(ForEachPackage, 2)";}
"(runAgent, 4)" -> {}
"(newLeaseUpdater, 3)" -> {}
"(Prune, 3)" -> {"(Process, 3)";}
"(GetDockerLogs, 4)" -> {"(ContainerLogs, 3)";}
"(PushContext, 2)" -> {"(pushHashes, 5)";}
"(Create, 1)" -> {"(newSerfQueries, 4)";"(NewSnapshotter, 8)";"(New, 3)";"(Run, 2)";"(Get, 1)";"(CreateInstance, 2)";"(Dial, 1)";"(newMemberlist, 1)";"(StartTLS, 1)";"(Init, 0)";"(Do, 2)";"(NewClient, 1)";}
"(newDirectIO, 2)" -> {"(newStdioPipes, 1)";}
"(startTask, 3)" -> {"(logStats, 2)";"(runPreTaskCommands, 2)";"(runTaskCommands, 2)";"(taskManager, 3)";}
"(fixImports, 3)" -> {}
"(callSSA, 6)" -> {"(runFrame, 1)";}
"(Insert, 2)" -> {"(Get, 1)";"(Delete, 1)";"(Set, 2)";"(Insert, 1)";"(insert, 4)";}
"(SetUpTest, 1)" -> {}
"(CreateInstance, 2)" -> {"(Create, 2)";}
"(serverHandshake, 1)" -> {"(newServerTransport, 4)";}
"(clientHandshake, 2)" -> {"(newClientTransport, 6)";}
"(Close, 1)" -> {"(List, 2)";}
"(Push, 2)" -> {"(doRequest, 2)";"(Get, 0)";"(Add, 2)";"(tarFile, 3)";"(Parse, 1)";"(Remove, 2)";"(Get, 1)";}
"(worker, 3)" -> {"(useExistingTask, 3)";"(updateTask, 4)";}
"(call, 5)" -> {"(callSSA, 6)";}
"(send, 3)" -> {}
"(Unmarshal, 2)" -> {"(Get, 1)";"(Decode, 1)";}
"(shutdownDaemon, 1)" -> {}
"(Load, 1)" -> {"(Create, 1)";"(New, 3)";"(GetObject, 1)";"(Get, 1)";"(String, 1)";"(Unmarshal, 2)";"(Decode, 1)";}
"(awaitOpenSlotForRequest, 1)" -> {}
"(UploadPack, 2)" -> {}
"(createIO, 5)" -> {"(newDirectIO, 2)";}
"(runManager, 5)" -> {}
"(readPacket, 1)" -> {"(Write, 1)";}
"(NewClientConn, 3)" -> {"(clientHandshake, 2)";}
"(NewNetTransport, 1)" -> {}
"(Pull, 1)" -> {"(PullContext, 2)";}
"(initHealthMonitor, 1)" -> {"(updateHealthMonitor, 1)";}
"(Spec, 1)" -> {"(FromURL, 2)";}
"(AppendChild, 1)" -> {"(Write, 1)";}
"(Marshal, 1)" -> {"(Get, 1)";"(Get, 0)";}
"(FromBytes, 1)" -> {"(Write, 1)";}
"(sendTestLog, 4)" -> {"(sendTestLogToCedar, 4)";}
"(NewClient, 5)" -> {}
"(newBasicProcess, 2)" -> {}
"(Init, 4)" -> {"(ListenPipe, 2)";}
"(runCommands, 4)" -> {"(runCommandSet, 7)";}
"(Run, 1)" -> {"(GetDockerLogs, 5)";"(UpdateNode, 1)";"(stop, 1)";"(wait, 1)";}
"(String, 1)" -> {"(Get, 1)";}
"(run, 3)" -> {}
"(UpdateTaskStatus, 3)" -> {}
"(AddPermissions, 1)" -> {"(UpdateRole, 1)";}
"(newStdioPipes, 1)" -> {"(ListenPipe, 2)";}
"(fulfill, 3)" -> {}
"(Dial, 1)" -> {"(TryDial, 1)";}
"(Remove, 1)" -> {"(Remove, 2)";"(Close, 1)";}
"(Validate, 2)" -> {"(Walk, 3)";}
"(Watch, 2)" -> {"(WatchFrom, 3)";}
"(updateHealthMonitor, 1)" -> {"(monitor, 4)";}
"(newSerfQueries, 4)" -> {}
"(NewServer, 1)" -> {"(newServer, 2)";}
"(Add, 1)" -> {"(Put, 1)";"(Clean, 1)";"(Marshal, 1)";"(AppendChild, 1)";"(AddPermissions, 1)";"(New, 1)";"(Open, 1)";"(add, 1)";"(Search, 2)";"(Insert, 2)";"(Load, 1)";"(readPacket, 1)";"(Store, 2)";"(Push, 2)";"(doRequest, 1)";}
"(start, 1)" -> {"(CopyConsole, 6)";"(loadListeners, 2)";"(ContainerStart, 4)";"(NewDaemon, 3)";"(shutdownDaemon, 1)";"(handleControlSocketChange, 2)";"(createIO, 5)";}
"(Release, 1)" -> {"(Update, 1)";}
"(Insert, 1)" -> {"(Write, 1)";}
"(add, 1)" -> {"(Get, 1)";"(Put, 1)";"(Insert, 1)";"(New, 1)";}
"(Upgrade, 7)" -> {"(pull, 4)";}
"(Parse, 1)" -> {"(parse, 2)";"(Walk, 2)";}
"(newBlockingProcess, 2)" -> {}
"(visitInstr, 2)" -> {}
"(Remove, 2)" -> {"(SetReference, 1)";"(Update, 1)";"(List, 1)";"(Close, 1)";}
"(fetch, 2)" -> {"(fetchPack, 4)";}
"(WaitUntilStatus, 2)" -> {}
"(parsePackageFiles, 2)" -> {"(parseFiles, 6)";}
"(Init, 2)" -> {"(SetReference, 1)";}
"(Execute, 2)" -> {"(Decrypt, 2)";}
"(sendTestLogToCedar, 4)" -> {"(NewLoggerWithContext, 4)";}
"(run, 1)" -> {"(Start, 1)";"(runAgent, 4)";"(Init, 1)";"(Write, 1)";"(Dial, 1)";"(newSession, 5)";"(Update, 2)";"(Do, 3)";"(UpdateRootCA, 1)";"(superviseManager, 5)";"(send, 3)";"(UpdateTaskStatus, 3)";"(run, 4)";"(Subscribe, 2)";}
"(parse, 2)" -> {"(Init, 1)";}
"(pullV2Repository, 3)" -> {"(pullV2Tag, 3)";}
"(pullSchema2Layers, 4)" -> {}
"(Create, 2)" -> {"(createIO, 5)";"(CopyConsole, 6)";"(CreateProcess, 2)";"(append, 1)";}
"(ConcurrentUpdate, 4)" -> {}
"(newOracle, 4)" -> {"(Create, 2)";}
"(updateTask, 4)" -> {"(DelayStart, 6)";}
"(aliveNode, 3)" -> {"(NotifyConflict, 2)";}
"(TryDialWithAddr, 2)" -> {"(NewClientConn, 3)";}
"(Delete, 1)" -> {"(delete, 1)";"(Update, 1)";"(Do, 2)";"(Release, 1)";}
"(GetObject, 1)" -> {"(Send, 0)";}
"(Reset, 1)" -> {"(Write, 1)";}
"(useExistingTask, 3)" -> {"(DelayStart, 6)";}
"(worker, 4)" -> {}
"(Set, 2)" -> {"(get, 1)";}
"(fetchPack, 4)" -> {"(UploadPack, 2)";}
"(TearDownSuite, 1)" -> {}
"(RoundTrip, 1)" -> {"(start, 1)";"(roundTrip, 1)";"(RoundTripOpt, 2)";}
"(SetUpSuite, 1)" -> {"(WaitUntilStatus, 2)";"(SetUpTest, 1)";}
"(Update, 4)" -> {}
"(verify, 3)" -> {"(fulfill, 3)";}
"(NewSnapshotter, 8)" -> {}
"(PutObject, 1)" -> {"(Send, 0)";}
"(Solve, 2)" -> {"(Solve, 3)";}
"(Decrypt, 2)" -> {"(Open, 4)";"(Decrypt, 1)";}
"(Decrypt, 1)" -> {"(Open, 4)";}
"(MakeLoggerWithContext, 3)" -> {}
"(Start, 2)" -> {"(Start, 1)";}
"(Resolve, 1)" -> {"(New, 1)";"(SetStatus, 1)";}
"(implements, 1)" -> {"(Build, 1)";}
"(ListenPipe, 2)" -> {}
"(tarFile, 3)" -> {"(Walk, 2)";}
"(Do, 3)" -> {"(Start, 1)";"(Prepare, 1)";}
"(logStats, 2)" -> {}
"(pull, 4)" -> {"(Pull, 3)";}
"(ContainerStart, 4)" -> {"(containerStart, 4)";}
"(parseAndUploadResults, 4)" -> {"(sendTestLog, 4)";}
"(newV2Client, 4)" -> {}
"(NewDaemon, 3)" -> {}
"(ViewAndWatch, 3)" -> {"(Watch, 2)";}
"(UpdateRootCA, 1)" -> {}
"(Pull, 3)" -> {"(pullV2Repository, 3)";}
"(runFrame, 1)" -> {"(visitInstr, 2)";}
"(taskManager, 3)" -> {"(newTaskManager, 3)";}
"(allPackages, 3)" -> {}
"(Pull, 8)" -> {"(pull, 4)";}
"(handleNodeConflict, 2)" -> {}
"(Execute, 4)" -> {"(executeOneFile, 5)";"(sendTestLogsAndResults, 6)";"(sendTestLogs, 5)";"(parseAndUploadResults, 4)";}
"(Run, 2)" -> {"(TearDownSuite, 1)";"(SetUpTest, 1)";"(run, 3)";"(Run, 1)";"(Start, 2)";"(Prepare, 1)";"(write, 3)";"(Create, 3)";"(serve, 3)";"(implements, 1)";"(Update, 2)";"(worker, 3)";"(List, 1)";"(SetUpSuite, 1)";"(Update, 4)";"(Watch, 2)";"(Solve, 2)";"(FromURL, 2)";"(Create, 2)";"(referrers, 1)";"(Import, 1)";"(Close, 1)";}
"(SetReference, 1)" -> {}
"(stop, 1)" -> {}
"(doRequest, 2)" -> {"(Do, 3)";}
"(Open, 1)" -> {"(start, 2)";"(Join, 2)";"(Resolve, 1)";"(Clean, 1)";}
"(CreateProcess, 2)" -> {"(NewProcess, 2)";}
"(FromURL, 2)" -> {"(Dial, 3)";}
"(List, 1)" -> {"(List, 2)";}
"(serve, 3)" -> {}
"(Subscribe, 2)" -> {}
"(reconcileTaskState, 4)" -> {}
"(ContainerLogs, 3)" -> {}
"(pushHashes, 5)" -> {}
"(pullSchema2, 4)" -> {"(pullSchema2Layers, 4)";}
"(newMemberlist, 1)" -> {"(NewNetTransport, 1)";}
"(NewProcess, 2)" -> {"(newBlockingProcess, 2)";"(newBasicProcess, 2)";}
"(Log, 1)" -> {"(Write, 1)";}
"(newSession, 5)" -> {}
"(UpdateNode, 1)" -> {"(aliveNode, 3)";}
"(executeOneFile, 5)" -> {"(sendTestLog, 4)";}
"(enableCSM, 3)" -> {"(Start, 2)";}
"(Interpret, 5)" -> {"(call, 5)";}
"(fixImports, 2)" -> {}
"(NewServerConn, 2)" -> {"(serverHandshake, 1)";}
"(runPreTaskCommands, 2)" -> {"(runCommands, 4)";}
"(Send, 0)" -> {"(Run, 1)";}
"(wait, 1)" -> {}
"(roundTrip, 1)" -> {"(awaitOpenSlotForRequest, 1)";}
"(Solve, 3)" -> {"(Exec, 6)";}
"(SetStatus, 1)" -> {"(Send, 0)";}
"(Init, 0)" -> {"(run, 3)";}
"(Exec, 6)" -> {}
"(configureTLS, 4)" -> {}
"(run, 4)" -> {"(Import, 1)";"(Create, 2)";"(Interpret, 5)";}
"(get, 1)" -> {"(load, 1)";}
"(Session, 2)" -> {"(ViewAndWatch, 3)";}
"(Write, 1)" -> {"(write, 3)";}
"(newTaskManager, 3)" -> {"(newTaskManager, 4)";}
"(sendTestLogsAndResults, 6)" -> {"(sendTestLog, 4)";}
"(Get, 1)" -> {"(Do, 2)";"(get, 1)";"(Decode, 1)";"(Remove, 1)";"(Get, 2)";"(ServeHTTP, 2)";}
"(handleControlSocketChange, 2)" -> {}
"(doRequest, 1)" -> {"(SendRequest, 3)";}
"(RoundTripOpt, 2)" -> {"(roundTrip, 1)";}
"(Open, 4)" -> {"(Verify, 3)";}
"(Store, 2)" -> {"(New, 1)";}
"(newVertex, 5)" -> {"(load, 1)";}
"(NotifyConflict, 2)" -> {"(handleNodeConflict, 2)";}
"(Put, 1)" -> {"(Create, 1)";"(Remove, 1)";"(PutObject, 1)";"(get, 1)";"(Write, 1)";"(Reset, 1)";"(FromBytes, 1)";}
}

```

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: a30fb318ff554bfa7becbbbc3d5ad63e356be156

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.