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

Main go routine does not exit if there's no error #5106

Merged
merged 1 commit into from
Dec 3, 2021

Conversation

barkbay
Copy link
Contributor

@barkbay barkbay commented Dec 2, 2021

To reproduce:

  1. Send SGINT (kill -SIGINT or CTRL+C)
  2. Operator does not stop
  3. Dump main goroutine:
goroutine 1 [chan receive]:
github.com/elastic/cloud-on-k8s/cmd/manager.startOperator({0x5a43210, 0xc00025c480})
        /Users/michael/go/src/github.com/elastic/cloud-on-k8s/cmd/manager/main.go:622 +0x20e5
github.com/elastic/cloud-on-k8s/cmd/manager.doRun(0xc000609680, {0x5776fa6, 0xb, 0xb})
        /Users/michael/go/src/github.com/elastic/cloud-on-k8s/cmd/manager/main.go:317 +0x91
github.com/spf13/cobra.(*Command).execute(0xc000609680, {0xc0006280b0, 0xb, 0xb})
        /Users/michael/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:856 +0x60e
github.com/spf13/cobra.(*Command).ExecuteC(0xc000609400)
        /Users/michael/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:974 +0x3bc
github.com/spf13/cobra.(*Command).Execute(...)
        /Users/michael/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:902
main.main()
        /Users/michael/go/src/github.com/elastic/cloud-on-k8s/cmd/main.go:31 +0x245

cloud-on-k8s/cmd/manager/main.go:622 is

	return <-exitOnErr

@barkbay barkbay added the >bug Something isn't working label Dec 2, 2021
@barkbay barkbay requested a review from thbkrkr December 2, 2021 13:42
@barkbay barkbay force-pushed the bug/fix-exit-error branch from 4ba3b08 to d6d51f5 Compare December 2, 2021 13:54
@barkbay barkbay added the v2.0.0 label Dec 2, 2021
@barkbay barkbay merged commit 5e5bbda into elastic:master Dec 3, 2021
@barkbay barkbay deleted the bug/fix-exit-error branch December 3, 2021 06:55
fantapsody pushed a commit to fantapsody/cloud-on-k8s that referenced this pull request Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug Something isn't working v2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants