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

In dev v285.x had a waitgroup panic #2063

Closed
matt2e opened this issue Jul 12, 2024 · 1 comment
Closed

In dev v285.x had a waitgroup panic #2063

matt2e opened this issue Jul 12, 2024 · 1 comment
Assignees
Labels
next Work that will be be picked up next P2

Comments

@matt2e
Copy link
Collaborator

matt2e commented Jul 12, 2024

From the logs:
/home/runner/go/pkg/mod/github.com/!t!b!d54566975/[email protected]/internal/modulecontext/module_context.go:206 +0x1c5
created by github.com/TBD54566975/ftl/internal/modulecontext.grpcModuleContextSupplier.Subscribe in goroutine 1
/home/runner/go/pkg/mod/github.com/!t!b!d54566975/[email protected]/internal/rpc/rpc.go:252 +0x262
github.com/TBD54566975/ftl/internal/rpc.RetryStreamingServerStream[...]({0x127c930, 0xc00040a550}, {0x0, 0x0, 0x0, 0x0, 0x0}, 0xc0003bc200, 0xc000118648, 0xc00033a4a0, ...)
/home/runner/go/pkg/mod/github.com/!t!b!d54566975/[email protected]/internal/modulecontext/module_context.go:242 +0x8f
github.com/TBD54566975/ftl/internal/modulecontext.NewDynamicContext.func2({0x126d180, 0xc0003bd200})
/home/runner/.cache/hermit/pkg/go-1.22.2/src/sync/waitgroup.go:87
sync.(*WaitGroup).Done(...)
/home/runner/.cache/hermit/pkg/go-1.22.2/src/sync/waitgroup.go:62 +0xd8
sync.(*WaitGroup).Add(0x126d180?, 0xc0003bd200?)
goroutine 51 [running]:
{"level":"error","attributes":{"module":"kcc","scope":"kcc","deployment":"dpl-kcc-161a9z4k3cc0kvdv"},"time":"2024-07-12T07:25:17.991920295Z"}
panic: sync: negative WaitGroup counter

I thought this would have been fixed earlier here, but is it still happening?
fix: module context errors should not cause a negative wait group (

cc @alec-brooks

@github-actions github-actions bot added the triage Issue needs triaging label Jul 12, 2024
@ftl-robot ftl-robot mentioned this issue Jul 12, 2024
@github-actions github-actions bot removed the triage Issue needs triaging label Jul 15, 2024
@wesbillman wesbillman added next Work that will be be picked up next P2 labels Jul 15, 2024
@jonathanj-square
Copy link
Contributor

jonathanj-square commented Jul 16, 2024

This issue appears to have been reported against a version that does not include fix: a8bc627

That fix puts both await.Done calls behind ReleaseOnce as a means of guarding against multiple invocations.

Furthermore, the stack notes this call-site as the coordinate for the failure:
/home/runner/go/pkg/mod/github.com/!t!b!d54566975/[email protected]/internal/modulecontext/module_context.go:242 +0x8f
github.com/TBD54566975/ftl/internal/modulecontext.NewDynamicContext.func2

The line number noted is 242; however, the new line number for this await.Done call is 244. Prior to this fix the line number was 242.

The nested method name noted is modulecontext.NewDynamicContext.func2; however, the new name is modulecontext.NewDynamicContext.func2.1 given this call to await.Done is now embedded inline of modulecontext.NewDynamicContext.func2 after the fix. Prior to the fix it was contained directly in the body of modulecontext.NewDynamicContext.func2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next Work that will be be picked up next P2
Projects
None yet
Development

No branches or pull requests

3 participants