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

Fix race in a03526d8eb82 #276

Merged
merged 1 commit into from
Oct 5, 2024
Merged

Fix race in a03526d8eb82 #276

merged 1 commit into from
Oct 5, 2024

Conversation

Sean-Der
Copy link
Member

@Sean-Der Sean-Der commented Oct 5, 2024

Modify packets before adding them to NACK buffer.

WARNING: DATA RACE
Read at 0x00c00056d456 by goroutine 10741:
github.com/pion/interceptor/pkg/nack.(*sendBuffer).get()
/home/runner/go/pkg/mod/github.com/pion/[email protected]/pkg/nack/send_buffer.go:95 +0x1e4
github.com/pion/interceptor/pkg/nack.(*ResponderInterceptor).resendPackets.func1()
/home/runner/go/pkg/mod/github.com/pion/[email protected]/pkg/nack/responder_interceptor.go:153 +0x70
github.com/pion/rtcp.(*NackPair).Range()
/home/runner/go/pkg/mod/github.com/pion/[email protected]/transport_layer_nack.go:65 +0x43
github.com/pion/interceptor/pkg/nack.(*ResponderInterceptor).resendPackets()
/home/runner/go/pkg/mod/github.com/pion/[email protected]/pkg/nack/responder_interceptor.go:152 +0x124
github.com/pion/interceptor/pkg/nack.(*ResponderInterceptor).BindRTCPReader.func1.gowrap1()
/home/runner/go/pkg/mod/github.com/pion/[email protected]/pkg/nack/responder_interceptor.go:100 +0x44

Previous write at 0x00c00056d456 by goroutine 10735:
github.com/pion/interceptor/pkg/nack.(*ResponderInterceptor).resendPackets.func1()
/home/runner/go/pkg/mod/github.com/pion/[email protected]/pkg/nack/responder_interceptor.go:186 +0x684
github.com/pion/rtcp.(*NackPair).Range()
/home/runner/go/pkg/mod/github.com/pion/[email protected]/transport_layer_nack.go:65 +0x43
github.com/pion/interceptor/pkg/nack.(*ResponderInterceptor).resendPackets()
/home/runner/go/pkg/mod/github.com/pion/[email protected]/pkg/nack/responder_interceptor.go:152 +0x124
github.com/pion/interceptor/pkg/nack.(*ResponderInterceptor).BindRTCPReader.func1.gowrap1()
/home/runner/go/pkg/mod/github.com/pion/[email protected]/pkg/nack/responder_interceptor.go:100 +0x44

Description

Reference issue

Fixes #...

Modify packets before adding them to NACK buffer.

WARNING: DATA RACE
Read at 0x00c00056d456 by goroutine 10741:
  github.com/pion/interceptor/pkg/nack.(*sendBuffer).get()
      /home/runner/go/pkg/mod/github.com/pion/[email protected]/pkg/nack/send_buffer.go:95 +0x1e4
  github.com/pion/interceptor/pkg/nack.(*ResponderInterceptor).resendPackets.func1()
      /home/runner/go/pkg/mod/github.com/pion/[email protected]/pkg/nack/responder_interceptor.go:153 +0x70
  github.com/pion/rtcp.(*NackPair).Range()
      /home/runner/go/pkg/mod/github.com/pion/[email protected]/transport_layer_nack.go:65 +0x43
  github.com/pion/interceptor/pkg/nack.(*ResponderInterceptor).resendPackets()
      /home/runner/go/pkg/mod/github.com/pion/[email protected]/pkg/nack/responder_interceptor.go:152 +0x124
  github.com/pion/interceptor/pkg/nack.(*ResponderInterceptor).BindRTCPReader.func1.gowrap1()
      /home/runner/go/pkg/mod/github.com/pion/[email protected]/pkg/nack/responder_interceptor.go:100 +0x44

Previous write at 0x00c00056d456 by goroutine 10735:
  github.com/pion/interceptor/pkg/nack.(*ResponderInterceptor).resendPackets.func1()
      /home/runner/go/pkg/mod/github.com/pion/[email protected]/pkg/nack/responder_interceptor.go:186 +0x684
  github.com/pion/rtcp.(*NackPair).Range()
      /home/runner/go/pkg/mod/github.com/pion/[email protected]/transport_layer_nack.go:65 +0x43
  github.com/pion/interceptor/pkg/nack.(*ResponderInterceptor).resendPackets()
      /home/runner/go/pkg/mod/github.com/pion/[email protected]/pkg/nack/responder_interceptor.go:152 +0x124
  github.com/pion/interceptor/pkg/nack.(*ResponderInterceptor).BindRTCPReader.func1.gowrap1()
      /home/runner/go/pkg/mod/github.com/pion/[email protected]/pkg/nack/responder_interceptor.go:100 +0x44
Copy link

codecov bot commented Oct 5, 2024

Codecov Report

Attention: Patch coverage is 78.57143% with 6 lines in your changes missing coverage. Please review.

Project coverage is 73.03%. Comparing base (a03526d) to head (a27b480).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
pkg/nack/retainable_packet.go 85.71% 2 Missing and 1 partial ⚠️
pkg/nack/responder_interceptor.go 60.00% 1 Missing and 1 partial ⚠️
pkg/nack/send_buffer.go 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #276      +/-   ##
==========================================
+ Coverage   72.93%   73.03%   +0.10%     
==========================================
  Files          79       79              
  Lines        3687     3679       -8     
==========================================
- Hits         2689     2687       -2     
+ Misses        865      862       -3     
+ Partials      133      130       -3     
Flag Coverage Δ
go 72.87% <78.57%> (+0.04%) ⬆️
wasm 71.05% <78.57%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Sean-Der Sean-Der merged commit bfda3e0 into master Oct 5, 2024
14 of 15 checks passed
@Sean-Der Sean-Der deleted the nack-race branch October 5, 2024 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant