There's a lock order inversion report (with a TSan build)
but It looks benign since the only time the locks in question are acquired in different order is during surface creation.
During creation:
Callback MirSurface::created is invoked -locks MirSurface::mutex -calls buffer_stream_factory->make_producer_stream --calls MirConnection::on_stream_created ---calls ConnectionSurfaceMap::insert ----write locks ConnectionSurfaceMap::guard
During normal operation:
MirProtobufRpcChannel::process_event_sequence -calls ConnectionSurfaceMap::with_surface_do --Read locks ConnectionSurfaceMap::guard ---Invokes callback which does MirSurface::handle_event ----locks MirSurface::mutex
http://paste.ubuntu.com/14054652/
I don't think the buffer stream creation needs to be done with a locked MirSurface::mutex; We should take a closer look at the uses of MirSurface::mutex, some don't seem necessary -but that's a separate issue outside the scope of this MP.
« Back to merge proposal
There's a lock order inversion report (with a TSan build)
but It looks benign since the only time the locks in question are acquired in different order is during surface creation.
During creation:
Callback MirSurface::created is invoked stream_ factory- >make_producer_ stream :on_stream_ created ceMap:: insert ceMap:: guard
-locks MirSurface::mutex
-calls buffer_
--calls MirConnection:
---calls ConnectionSurfa
----write locks ConnectionSurfa
During normal operation:
MirProtobufRpcC hannel: :process_ event_sequence ceMap:: with_surface_ do ceMap:: guard :handle_ event
-calls ConnectionSurfa
--Read locks ConnectionSurfa
---Invokes callback which does MirSurface:
----locks MirSurface::mutex
http:// paste.ubuntu. com/14054652/
I don't think the buffer stream creation needs to be done with a locked MirSurface::mutex; We should take a closer look at the uses of MirSurface::mutex, some don't seem necessary -but that's a separate issue outside the scope of this MP.