Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nil pointer dereference when shutting down cells #325

Closed
skozlov404 opened this issue May 23, 2021 · 1 comment
Closed

nil pointer dereference when shutting down cells #325

skozlov404 opened this issue May 23, 2021 · 1 comment

Comments

@skozlov404
Copy link

It seems like the logic in the code below is wrong. When (process == nil || len(process.Services) == 0), but at the same time len(childrenProcesses) != 0 - the code doesn't return nil, but instead continuing to log.Info, where process == nil is deferenced.

cells/cmd/start.go

Lines 288 to 292 in e36a254

childrenProcesses := registry.Default.GetCurrentChildrenProcesses()
if (process == nil || len(process.Services) == 0) && len(childrenProcesses) == 0 {
return nil
}
log.Info("Services are still running ", zap.Any("services", process.Services))

@cdujeu
Copy link
Member

cdujeu commented May 24, 2021

Hi @skozlov404 , thanks for reporting. @ghecquet can you have a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants