Open Bug 1892323 Opened 1 year ago Updated 1 year ago

Consider mitigating misbehaving DirectShow drivers (that only look at server lock count in DllCanUnloadNow)

Categories

(Core :: WebRTC: Audio/Video, task)

task

Tracking

()

People

(Reporter: pehrsons, Assigned: pehrsons)

References

(Blocks 2 open bugs)

Details

See bug 1707060 comment 28 and bug 1882923 comment 3. It appears to be a pattern that DirectShow-based virtual camera drivers in DllCanUnloadNow only look at server lock (as signaled by a client like us through IClassFactory::LockServer) count. It seems, based on the bugs linked above, that this can lead to premature unloading of the driver dll, as the driver itself reports it being OK to unload the dll, whereas we still hold references to objects managed by the dll.

As the docs for DllCanUnloadNow say:

DllCanUnloadNow should return S_FALSE if there are any existing references to objects that the DLL manages.

Looking at the crash signatures linked in bug 1707060 this mitigation would prevent some 5 crashes daily in release. Probably more since there are other signatures (of lower frequency) on crash-stats that have ~VideoCaptureDS on the stack.

You need to log in before you can comment on or make changes to this bug.