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

[BUG] panic: sync: WaitGroup is reused before previous Wait has returned #35767

Open
darwayne opened this issue Apr 2, 2025 · 0 comments
Open

Comments

@darwayne
Copy link

darwayne commented Apr 2, 2025

Agent Environment

  • AWS Lambda ARM Environment
  • Docker Lambda extension version: 68
  • Go based binary
  • Agent Version: 7.62.0 (based on the lambda extension version)

Describe what happened:
I am getting the following stack trace sporadically (note I see an open issue DataDog/datadog-lambda-extension#564 as well about this; and left a similar comment there)

panic: sync: WaitGroup is reused before previous Wait has returned

goroutine 4285 [running]:
sync.(*WaitGroup).Wait(0x4000397df0)
    /root/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.23.3.linux-arm64/src/sync/waitgroup.go:120 +0xac
github.com/DataDog/datadog-agent/pkg/logs/pipeline.(*Pipeline).Flush(0x4000386820, {0x1e77650, 0x400037d7a0})
    /tmp/dd/datadog-agent/pkg/logs/pipeline/pipeline.go:121 +0x5c
github.com/DataDog/datadog-agent/pkg/logs/pipeline.(*provider).Flush(0x1?, {0x1e77650, 0x400037d7a0})
    /tmp/dd/datadog-agent/pkg/logs/pipeline/provider.go:209 +0x48
github.com/DataDog/datadog-agent/comp/logs/agent/agentimpl.(*logAgent).Flush(0x40003a0ea0, {0x1e77650, 0x400037d7a0})
    /tmp/dd/datadog-agent/comp/logs/agent/agentimpl/serverless.go:51 +0x94
github.com/DataDog/datadog-agent/pkg/serverless/daemon.(*Daemon).flushLogs(0x4000210960, {0x1e77650, 0x400037d7a0}, 0x400368aa50)
    /tmp/dd/datadog-agent/pkg/serverless/daemon/daemon.go:258 +0x1fc

created by github.com/DataDog/datadog-agent/pkg/serverless/daemon.(*Daemon).TriggerFlush in goroutine 4277
    /tmp/dd/datadog-agent/pkg/serverless/daemon/daemon.go:310 +0x154

Describe what you expected:
I expected to NOT see a panic in the datadog agent. As this panic is causing my lambda logic to fail

Steps to reproduce the issue:
Since this is a race condition I am not sure how to reproduce .. however I believe the culprits are

Additional environment details (Operating System, Cloud provider, etc):

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

No branches or pull requests

3 participants