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

TestDynamicEnqueueRequest is flaky #4692

Closed
barkbay opened this issue Jul 27, 2021 · 1 comment · Fixed by #4949
Closed

TestDynamicEnqueueRequest is flaky #4692

barkbay opened this issue Jul 27, 2021 · 1 comment · Fixed by #4949

Comments

@barkbay
Copy link
Contributor

barkbay commented Jul 27, 2021

TestDynamicEnqueueRequest is flaky.

=== FAIL: pkg/controller/common/watches TestDynamicEnqueueRequest (30.20s)
{
  "log.level":"info","@timestamp":"2021-10-12T12:48:01.129Z","log.logger":"controller-runtime.manager.controller.test-reconciler",
  "message":"Starting EventSource","service.version":"0.0.0-SNAPSHOT+00000000","service.type":"eck","ecs.version":"1.4.0","source":"kind source: /, Kind="}
{
  "log.level":"info","@timestamp":"2021-10-12T12:48:01.130Z","log.logger":"controller-runtime.manager.controller.test-reconciler",
  "message":"Starting Controller","service.version":"0.0.0-SNAPSHOT+00000000","service.type":"eck","ecs.version":"1.4.0"}
{
  "log.level":"info","@timestamp":"2021-10-12T12:48:01.232Z","log.logger":"controller-runtime.manager.controller.test-reconciler",
  "message":"Starting workers","service.version":"0.0.0-SNAPSHOT+00000000","service.type":"eck","ecs.version":"1.4.0","worker count":1}
{
  "log.level":"debug","@timestamp":"2021-10-12T12:48:01.239Z","log.logger":"dynamic-enqueue-request",
  "message":"Adding new handler registration","service.version":"0.0.0-SNAPSHOT+00000000","service.type":"eck","ecs.version":"1.4.0","key":"test-watch-1","current_registrations":{}}
{
  "log.level":"info","@timestamp":"2021-10-12T12:48:01.246Z","log.logger":"controller-runtime.manager.controller.test-reconciler",
  "message":"Shutdown signal received, waiting for all workers to finish","service.version":"0.0.0-SNAPSHOT+00000000","service.type":"eck","ecs.version":"1.4.0"}

integration.go:97: 
	Error Trace:	integration.go:97
        				handler_integration_test.go:82
	Error:      	Received unexpected error:
	            	failed waiting for all runnables to end within grace period of 30s: context deadline exceeded
	Test:       	TestDynamicEnqueueRequest

-> controller-runtime source code that returns this error (pkg/manager/internal.go)

It has been first noticed by @thbkrkr while we were upgrading controller-runtime to v0.9.1. It also failed a couple of times for these PRs:

@thbkrkr
Copy link
Contributor

thbkrkr commented Oct 13, 2021

I haven't found a way to reproduce the problem yet. My intuition would say that there is a deadlock somewhere that prevents the stop from ending but this is pure speculation.

I don't have a lot of ideas to mitigate this issue other than:

  • Completely remove the test as it doesn't test much, in particular since Transform dynamic watches integration tests into unit tests #911
  • Increase the gracefulShutdownTimeout duration, though I don't think it will change something
  • Do not fail the integration test when we get the error failed waiting for all runnables to end within grace period

Any other ideas?

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

Successfully merging a pull request may close this issue.

2 participants