helgrind: Lock order violated (potential deadlock) in mir::scene::SurfaceStack::emit_change_notification() vs mir::compositor::MultiThreadedCompositor::schedule_compositing()
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mir |
Fix Released
|
Critical
|
Alberto Aguirre | ||
mir (Ubuntu) |
Fix Released
|
Critical
|
Unassigned |
Bug Description
helgrind: Lock order violated (potential deadlock) in mir::scene:
==19841== -------
==19841==
==19841== Thread #4: lock order "0xA9FF380 before 0xA9FF108" violated
==19841==
==19841== Observed (incorrect) order is: acquisition of lock at 0xA9FF108
==19841== at 0x4C30795: pthread_mutex_lock (in /usr/lib/
==19841== by 0x8F6481: __gthread_
==19841== by 0x8F7F67: std::mutex::lock() (mutex:134)
==19841== by 0x9EA695: std::lock_
==19841== by 0x5445AD6: mir::scene:
==19841== by 0x54456A4: mir::scene:
==19841== by 0x54457AF: mir::scene:
==19841== by 0x5449F0B: mir::scene:
==19841== by 0x544A405: mir::scene:
==19841== by 0x5474703: mir::shell:
==19841== by 0x5421602: mir::scene:
==19841== by 0x53B1314: mir::frontend:
==19841==
==19841== followed by a later acquisition of lock at 0xA9FF380
==19841== at 0x4C30795: pthread_mutex_lock (in /usr/lib/
==19841== by 0x8F6481: __gthread_
==19841== by 0x8F7F67: std::mutex::lock() (mutex:134)
==19841== by 0x8F8328: std::unique_
==19841== by 0x8F8110: std::unique_
==19841== by 0x539A2C1: mir::compositor
==19841== by 0x539A4B6: mir::compositor
==19841== by 0x539AC73: std::_Function_
==19841== by 0x95EB71: std::function<void ()>::operator()() const (functional:2464)
==19841== by 0x5445AE8: mir::scene:
==19841== by 0x54456A4: mir::scene:
==19841== by 0x54457AF: mir::scene:
==19841==
==19841== Required order was established by acquisition of lock at 0xA9FF380
==19841== at 0x4C30795: pthread_mutex_lock (in /usr/lib/
==19841== by 0x8F6481: __gthread_
==19841== by 0x8F7F67: std::mutex::lock() (mutex:134)
==19841== by 0x8F8328: std::unique_
==19841== by 0x8F8110: std::unique_
==19841== by 0x539A4EE: mir::compositor
==19841== by 0x5359A1B: mir::DisplaySer
==19841== by 0x5350353: mir::run_
==19841== by 0x9E06B1: mir_test_
==19841== by 0x9DD292: mir_test_
==19841== by 0x9B0F7B: TestClientInput
==19841== by 0xB1BE9B: void testing:
==19841==
==19841== followed by a later acquisition of lock at 0xA9FF108
==19841== at 0x4C30795: pthread_mutex_lock (in /usr/lib/
==19841== by 0x8F6481: __gthread_
==19841== by 0x8F7F67: std::mutex::lock() (mutex:134)
==19841== by 0x9EA695: std::lock_
==19841== by 0x54454D8: mir::scene:
==19841== by 0x539A5A8: mir::compositor
==19841== by 0x5359A1B: mir::DisplaySer
==19841== by 0x5350353: mir::run_
==19841== by 0x9E06B1: mir_test_
==19841== by 0x9DD292: mir_test_
==19841== by 0x9B0F7B: TestClientInput
==19841== by 0xB1BE9B: void testing:
==19841==
Related branches
- Alan Griffiths: Approve
- PS Jenkins bot (community): Approve (continuous-integration)
- Robert Carr (community): Approve
- Alexandros Frantzis (community): Approve
- Chris Halse Rogers: Approve
-
Diff: 338 lines (+170/-48)3 files modifiedsrc/server/compositor/multi_threaded_compositor.cpp (+97/-42)
src/server/compositor/multi_threaded_compositor.h (+13/-2)
tests/unit-tests/compositor/test_multi_threaded_compositor.cpp (+60/-4)
Changed in mir: | |
milestone: | 0.1.8 → 0.1.9 |
Changed in mir: | |
assignee: | nobody → Alberto Aguirre (albaguirre) |
status: | Triaged → In Progress |
Changed in mir: | |
status: | Fix Committed → Fix Released |
Changed in mir (Ubuntu): | |
importance: | Undecided → Critical |
status: | New → Triaged |
Produced by running: acceptance_ tests --gtest_ filter= "TestClientInpu t.clients_ receive_ key_input"
valgrind --tool=helgrind --log-file=out.txt bin/mir_