-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
cmd/agent/TestStartStopRace deadlocks #2601
Comments
temporarily fixed by adding a 500ms sleep, which is not ideal nor robust. |
Timing wise, could this have been introduced by #2583 ? 🤔 |
Make a tiny state machine to detect the transition init -> stopped (not via serving) Fixes jaegertracing#2601 Related jaegertracing#103 Signed-off-by: Carl Henrik Lunde <[email protected]>
Slightly related, the tests in app does not support A workaround is to use random ports, but I had hoped stop would work for this test now: diff --git a/cmd/agent/app/builder_test.go b/cmd/agent/app/builder_test.go
index 49c2e9d..bb279c5 100644
--- a/cmd/agent/app/builder_test.go
+++ b/cmd/agent/app/builder_test.go
@@ -288,8 +288,10 @@ func TestPublishOpts(t *testing.T) {
command.PersistentFlags().AddGoFlagSet(flags)
v.BindPFlags(command.PersistentFlags())
err := command.ParseFlags([]string{
- "--http-server.host-port=:8080",
- "--processor.jaeger-binary.server-host-port=:1111",
+ "--http-server.host-port=:0",
+ "--processor.zipkin-compact.server-host-port=:0",
+ "--processor.jaeger-binary.server-host-port=:0",
+ "--processor.jaeger-compact.server-host-port=:0",
"--processor.jaeger-binary.server-max-packet-size=4242",
"--processor.jaeger-binary.server-queue-size=24",
"--processor.jaeger-binary.workers=42",
@@ -303,6 +305,7 @@ func TestPublishOpts(t *testing.T) {
agent, err := cfg.CreateAgent(fakeCollectorProxy{}, zap.NewNop(), metricsFactory)
assert.NoError(t, err)
assert.NotNil(t, agent)
+ //defer agent.Stop()
forkFactory.AssertGaugeMetrics(t, metricstest.ExpectedMetric{
Name: "internal.processor.jaeger-binary.server-max-packet-size", |
Could be, but the deadlock I observed was with processors not starting in time, not the server.
Just that specific TestPublishOpts? I guess you could do
(still fails, but not because of port conflict) |
Make a tiny state machine to detect the transition init -> stopped (not via serving) Fixes #2601 Related #103 Signed-off-by: Carl Henrik Lunde <[email protected]>
Describe the bug
The test deadlocks under travis-ci.com https://travis-ci.com/github/jaegertracing/jaeger/jobs/417602049#L486.
To Reproduce
Only seems to happen in Travis. The call to agent.Stop() deadlocks:
jaeger/cmd/agent/app/agent_test.go
Line 140 in fe84288
More specifically, processor.Stop() deadlocks:
jaeger/cmd/agent/app/processors/thrift_processor.go
Lines 106 to 111 in fe84288
It appears that the processor does not get a change to start in the goroutine before processor.Stop() is called from the test.
Panic dump:
The text was updated successfully, but these errors were encountered: