Mir

Merge lp://staging/~andreas-pokorny/mir/fix-1672955 into lp://staging/mir

Proposed by Andreas Pokorny
Status: Merged
Approved by: Daniel van Vugt
Approved revision: no longer in the source branch.
Merged at revision: 4114
Proposed branch: lp://staging/~andreas-pokorny/mir/fix-1672955
Merge into: lp://staging/mir
Prerequisite: lp://staging/~andreas-pokorny/mir/store-device-config
Diff against target: 308 lines (+99/-33)
6 files modified
src/server/input/default_device.cpp (+30/-15)
src/server/input/default_device.h (+2/-1)
src/server/input/default_input_device_hub.cpp (+19/-12)
src/server/input/default_input_device_hub.h (+6/-5)
tests/unit-tests/input/test_default_device.cpp (+23/-0)
tests/unit-tests/input/test_default_input_device_hub.cpp (+19/-0)
To merge this branch: bzr merge lp://staging/~andreas-pokorny/mir/fix-1672955
Reviewer Review Type Date Requested Status
Kevin DuBois (community) Approve
Alan Griffiths Approve
Alexandros Frantzis (community) Approve
Mir CI Bot continuous-integration Approve
Review via email: mp+320066@code.staging.launchpad.net

Commit message

Ensure that no action is still queued that may access the mir::input::InputDevice (LP: #1672955)

Shared pointers to mir::input::Device are handed out to other threads and may still be used after the mir::input::InputDevice was removed. To avoid this problem the ActionQueues for manipulating input devices are now per device and will be removed with the InputDevice

Description of the change

The attached bug was caused by actions in the queue that try to apply configuration while the device was already removed. mir::input::Device does not to keep the platform devices alive. Changing that to shared_ptr does not really improve the situation as we would keep the device alive until the queue is processed. Instead this change will remove the queue instead such that outstanding actions are canceled. All that happens inside the input thread..

Proposing that on top of lp:~andreas-pokorny/mir/store-device-config since it would conflict otherwise.

To post a comment you must log in.
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:4074
https://mir-jenkins.ubuntu.com/job/mir-ci/3180/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/4273
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4360
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/4350
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4350
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4350
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4300
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4300/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4300
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4300/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4300
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4300/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/4300
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/4300/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/4300
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/4300/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4300
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4300/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3180/rebuild

review: Approve (continuous-integration)
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

Looks good.

review: Approve
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

LGTM

review: Approve
Revision history for this message
Kevin DuBois (kdub) wrote :

lgtm too, would be nice to note bug in code comments somewhere

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches