Closed Bug 806828 Opened 13 years ago Closed 12 years ago

WebRTC possible data race with updateVidCapTbl vs gsmsdp_get_media_capability

Categories

(Core :: WebRTC: Signaling, defect, P2)

x86
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: posidron, Assigned: ehugg)

References

Details

(Whiteboard: [tsan] [WebRTC] [blocking-webrtc-] [qa-])

Attachments

(2 files)

Attached file callstack
media/webrtc/signaling/src/sipcc/core/gsm/media_cap_tbl.c:72 // we can do native now enable cap g_media_table.cap[CC_VIDEO_1].enabled = TRUE; media/webrtc/signaling/src/sipcc/core/gsm/gsm_sdp.c:125 *(dcb_p->media_cap_tbl) = g_media_table; Tested with m-c changeset: 111684:e19e170d2f6d
Whiteboard: [tsan] → [tsan] [WebRTC] [blocking-webrtc+]
No locks involved; the TSan mode was pure-happens-before, false positive and/or the data race between 'g_media_table' is unimportant.
How can i reproduce this issue ....
Assignee: nobody → ethanhugg
Severity: major → normal
Priority: -- → P2
Whiteboard: [tsan] [WebRTC] [blocking-webrtc+] → [tsan] [WebRTC] [blocking-webrtc-]
This is indeed a data race. Couldn't repro with TSan, but I can see it with the debugger. However those values set in media_cap_tbl.c:72 don't matter because they're reset 8 lines after the line listed in gsm_sdp.c since "if (sdpmode)" is always true. For example, I set the cap[CC_VIDEO_1].enabled = FALSE instead of TRUE and the video still works because it's being set again. So I don't think there's a danger here, but it does point to some cleanup needed.
Comment on attachment 709909 [details] [diff] [review] Signaling - copy selectively from g_media_table on init Review of attachment 709909 [details] [diff] [review]: ----------------------------------------------------------------- This patch avoids the struct copy of g_media_table altogether when sdpmode is on which is always true in Firefox.
Attachment #709909 - Flags: review?(rjesup)
Attachment #709909 - Flags: review?(rjesup) → review+
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
Whiteboard: [tsan] [WebRTC] [blocking-webrtc-] → [tsan] [WebRTC] [blocking-webrtc-] [qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: