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

Race condition in it_sidecar #130

Open
apesternikov opened this issue Mar 22, 2023 · 0 comments
Open

Race condition in it_sidecar #130

apesternikov opened this issue Mar 22, 2023 · 0 comments

Comments

@apesternikov
Copy link
Collaborator

apesternikov commented Mar 22, 2023

@harjsing7 reported a race condition in a sidecar on pod removal.

2023-03-22T05:44:02Z | INFO | 2023/03/22 05:44:02 panic: close of closed channel
2023-03-22T05:44:02Z | INFO | 2023/03/22 05:44:02 
2023-03-22T05:44:02Z | INFO | 2023/03/22 05:44:02 goroutine 108 [running]:
2023-03-22T05:44:02Z | INFO | 2023/03/22 05:44:02 github.com/adobe/rules_gitops/testing/it_sidecar/stern.(*Tail).Start.func2()
2023-03-22T05:44:02Z | INFO | 2023/03/22 05:44:02 	external/com_adobe_rules_gitops/testing/it_sidecar/stern/tail.go:86 +0x45
2023-03-22T05:44:02Z | INFO | 2023/03/22 05:44:02 created by github.com/adobe/rules_gitops/testing/it_sidecar/stern.(*Tail).Start
2023-03-22T05:44:02Z | INFO | 2023/03/22 05:44:02 	external/com_adobe_rules_gitops/testing/it_sidecar/stern/tail.go:84 +0x12b
2023-03-22T05:44:02Z | INFO | 2023/03/22 05:44:02 exit status 2

The closing of the channel can happen in two spots:


We need to handle this situation properly, using cancellable context would be appropriate here
Also, we should add a warning in a log on pod deletion, since it is typically an indication of a problem in the test - like pod crashlooping or even early test failure (configurable)

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

1 participant