Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: Prevent race between provisionerd connect and close#6206

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

mafredri
Copy link
Member

I'm hoping to have finally narrowed this down:

goleak: Errors on successful test run: found unexpected goroutines:[Goroutine 10 in state chan receive, with storj.io/drpc/drpcserver.(*Server).Serve.func1 on top of the stack:goroutine 10 [chan receive]:storj.io/drpc/drpcserver.(*Server).Serve.func1({0xc3eea0?, 0xc0004641b0?})/home/mafredri/.local/go/pkg/mod/storj.io/drpc@v0.0.33-0.20220622181519-9206537a4db7/drpcserver/server.go:80 +0x45storj.io/drpc/drpcctx.(*Tracker).track(0xc0004641b0, 0x0?)/home/mafredri/.local/go/pkg/mod/storj.io/drpc@v0.0.33-0.20220622181519-9206537a4db7/drpcctx/transport.go:52 +0x2bcreated by storj.io/drpc/drpcctx.(*Tracker).Run/home/mafredri/.local/go/pkg/mod/storj.io/drpc@v0.0.33-0.20220622181519-9206537a4db7/drpcctx/transport.go:47 +0x8d Goroutine 9 in state chan receive, with github.com/valyala/fasthttp/fasthttputil.(*InmemoryListener).Accept on top of the stack:goroutine 9 [chan receive]:github.com/valyala/fasthttp/fasthttputil.(*InmemoryListener).Accept(0xc0004641b0?)/home/mafredri/.local/go/pkg/mod/github.com/valyala/fasthttp@v1.44.0/fasthttputil/inmemory_listener.go:50 +0x35storj.io/drpc/drpcserver.(*Server).Serve(0xc0004aa000, {0xc3e810, 0xc00015a000}, {0xc3d230?, 0xc000122000})/home/mafredri/.local/go/pkg/mod/storj.io/drpc@v0.0.33-0.20220622181519-9206537a4db7/drpcserver/server.go:85 +0x1bbgithub.com/coder/coder/provisionerd_test.createProvisionerDaemonClient.func3()/home/mafredri/src/coder/coder/provisionerd/provisionerd_test.go:1096 +0x6ccreated by github.com/coder/coder/provisionerd_test.createProvisionerDaemonClient/home/mafredri/src/coder/coder/provisionerd/provisionerd_test.go:1094 +0x485]

By refactoring the tests, I found this:

panic: Fail in goroutine after TestProvisionerd/InstantClose has completedgoroutine 130 [running]:testing.(*common).Fail(0xc00050cea0)/usr/local/go/src/testing/testing.go:933 +0x1a8testing.(*common).Error(0xc00050cea0, {0xc0007a1c80, 0x1, 0x1})/usr/local/go/src/testing/testing.go:1043 +0x8fgithub.com/coder/coder/provisionerd_test.createProvisionerDaemonClient(0xc00050cea0, 0xc0001b6120, {0x0, 0x0, 0x0, 0x0, 0x0})/home/mafredri/src/coder/coder/provisionerd/provisionerd_test.go:1173 +0x92dgithub.com/coder/coder/provisionerd_test.TestProvisionerd.func2.2({0xc00056ce38?, 0x14a0540?})/home/mafredri/src/coder/coder/provisionerd/provisionerd_test.go:63 +0x7fgithub.com/coder/coder/provisionerd.(*Server).connect(0xc000792000, {0x14a0540?, 0xc00078c000})/home/mafredri/src/coder/coder/provisionerd/provisionerd.go:169 +0x209created by github.com/coder/coder/provisionerd.New/home/mafredri/src/coder/coder/provisionerd/provisionerd.go:109 +0x88eFAILgithub.com/coder/coder/provisionerd0.048sFAIL

This lead to the fix in connect where we might end up with a successfull connection after close.

  • fix: Prevent race between provisionerd connect and close
  • test: Add detection for provisioner creation after test completion

@mafredrimafredri self-assigned thisFeb 14, 2023
Copy link
Member

@kylecarbskylecarbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

🥳🥳🥳🥳🥳🥳

@mafredrimafredrienabled auto-merge (squash)February 14, 2023 16:06
@mafredrimafredri merged commit860e282 intomainFeb 14, 2023
@mafredrimafredri deleted the mafredri/test-try-to-capture-provisionerd-test-issue branchFebruary 14, 2023 16:37
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsFeb 14, 2023
@mafredrimafredri added release/experimentalThese changes are feature-flagged, they may change or be removed in future releases and removed release/experimentalThese changes are feature-flagged, they may change or be removed in future releases labelsFeb 14, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@kylecarbskylecarbskylecarbs approved these changes

Assignees

@mafredrimafredri

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@mafredri@kylecarbs

[8]ページ先頭

©2009-2025 Movatter.jp