Closed Bug 807012 Opened 12 years ago Closed 12 years ago

WebRTC possible data race with CSF::CallControlManagerImpl::notifyDeviceEventObservers vs. sipcc::PeerConnectionCtx::Initialize

Categories

(Core :: WebRTC: Signaling, defect)

x86
Linux
defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: posidron, Assigned: ehugg)

References

Details

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

Attachments

(2 files)

Attached file callstack
media/webrtc/signaling/src/callcontrol/CallControlManagerImpl.cpp:463 void CallControlManagerImpl::notifyDeviceEventObservers (ccapi_device_event_e deviceEvent, CC_DevicePtr devicePtr, CC_DeviceInfoPtr info) { mozilla::MutexAutoLock lock(m_lock); set<CC_Observer*>::const_iterator it = ccObservers.begin(); for ( ; it != ccObservers.end(); it++ ) { (*it)->onDeviceEvent(deviceEvent, devicePtr, info); } } media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.cpp:83 mCCM->addCCObserver(this); mDevice = mCCM->getActiveDevice(); NS_ENSURE_TRUE(mDevice.get(), NS_ERROR_FAILURE); ChangeSipccState(PeerConnectionImpl::kStarting); return NS_OK; Tested with m-c changeset: 111684:e19e170d2f6d
Whiteboard: [tsan] → [tsan] [WebRTC] [blocking-webrtc+]
Ethan - can you verify if there's a real race here? I doubt it, but you'd be better at being sure.
Assignee: nobody → ethanhugg
Comment on attachment 693032 [details] [diff] [review] Signaling - reorder initiialization of CallControlManagerImpl I don't think this is a particularly dangerous race on initialization since things work either way, but it can be avoided by setting the device in the ctx before adding it as an observer.
Attachment #693032 - Flags: review?(rjesup)
Attachment #693032 - Flags: review?(rjesup) → review+
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
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: