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

racy datagram queue may lead to deadlock #3550

Closed
marten-seemann opened this issue Sep 9, 2022 · 1 comment · Fixed by #3582
Closed

racy datagram queue may lead to deadlock #3550

marten-seemann opened this issue Sep 9, 2022 · 1 comment · Fixed by #3582
Labels
Milestone

Comments

@marten-seemann
Copy link
Member

Might be related to #3544.

• Failure [0.564 seconds]
Datagram test
/home/circleci/project/integrationtests/self/datagram_test.go:22
  with QUIC version v2
  /home/circleci/project/integrationtests/self/datagram_test.go:26
    sends datagrams [It]
    /home/circleci/project/integrationtests/self/datagram_test.go:111

    Expected
        <int>: 23
    to be >
        <int>: 87

    /home/circleci/project/integrationtests/self/datagram_test.go:144

    Full Stack Trace
    github.com/lucas-clemente/quic-go/integrationtests/self_test.glob..func4.1.4()
    	/home/circleci/project/integrationtests/self/datagram_test.go:144 +0x1165
    github.com/onsi/ginkgo/internal/leafnodes.(*runner).runSync(0xc0040f1440)
    	/home/circleci/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/leafnodes/runner.go:113 +0xf6
    github.com/onsi/ginkgo/internal/leafnodes.(*runner).run(0xc0040f1440)
    	/home/circleci/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/leafnodes/runner.go:64 +0x158
    github.com/onsi/ginkgo/internal/leafnodes.(*ItNode).Run(0xc0000af040)
    	/home/circleci/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/leafnodes/it_node.go:26 +0x95
    github.com/onsi/ginkgo/internal/spec.(*Spec).runSample(0xc003d42ff0, 0xfbf3f8?, {0xcdb240, 0xc0001988c0})
    	/home/circleci/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/spec/spec.go:215 +0x35a
    github.com/onsi/ginkgo/internal/spec.(*Spec).Run(0xc003d42ff0, {0xcdb240, 0xc0001988c0})
    	/home/circleci/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/spec/spec.go:138 +0x1ac
    github.com/onsi/ginkgo/internal/specrunner.(*SpecRunner).runSpec(0xc00019c000, 0xc003d42ff0)
    	/home/circleci/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/specrunner/spec_runner.go:200 +0x15b
    github.com/onsi/ginkgo/internal/specrunner.(*SpecRunner).runSpecs(0xc00019c000)
    	/home/circleci/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/specrunner/spec_runner.go:170 +0x256
    github.com/onsi/ginkgo/internal/specrunner.(*SpecRunner).Run(0xc00019c000)
    	/home/circleci/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/specrunner/spec_runner.go:66 +0x137
    github.com/onsi/ginkgo/internal/suite.(*Suite).Run(0xc000020af0, {0x7f7a7c0ce9a0, 0xc003580680}, {0xbe09ab, 0x16}, {0xc00010e1c0, 0x1, 0x1}, {0xce0710, 0xc0001988c0}, ...)
    	/home/circleci/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/internal/suite/suite.go:79 +0x6f6
    github.com/onsi/ginkgo.runSpecsWithCustomReporters({0xcdb860?, 0xc003580680}, {0xbe09ab, 0x16}, {0xc00009fe48, 0x1, 0x7f7aa4e10008?})
    	/home/circleci/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/ginkgo_dsl.go:238 +0x213
    github.com/onsi/ginkgo.RunSpecs({0xcdb860, 0xc003580680}, {0xbe09ab, 0x16})
    	/home/circleci/go/pkg/mod/github.com/onsi/ginkgo@v1.16.4/ginkgo_dsl.go:213 +0x268
    github.com/lucas-clemente/quic-go/integrationtests/self_test.TestSelf(0x0?)
    	/home/circleci/project/integrationtests/self/self_suite_test.go:399 +0x105
    testing.tRunner(0xc003580680, 0xc18c88)
    	/usr/local/go/src/testing/testing.go:1439 +0x214
    created by testing.(*T).Run
    	/usr/local/go/src/testin
@marten-seemann
Copy link
Member Author

This is not just a flaky test, this is a race condition in the datagramQueue. NextFrameSize might return protocol.InvalidByteCount (indicating that there's nothing to send), when the next frame isn't queued fast enough in AddAndWait.

@marten-seemann marten-seemann changed the title flaky datagram integration test racy datagram queue may lead to deadlock Oct 9, 2022
@marten-seemann marten-seemann added this to the v0.30.0 milestone Oct 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant