Merge lp:~alan-griffiths/mir/preserve-ExternalInputDeviceHub into lp:mir
| Status: | Merged |
|---|---|
| Approved by: | Alan Griffiths on 2017-04-06 |
| Approved revision: | 4145 |
| Merged at revision: | 4142 |
| Proposed branch: | lp:~alan-griffiths/mir/preserve-ExternalInputDeviceHub |
| Merge into: | lp:mir |
| Diff against target: |
146 lines (+40/-9) 7 files modified
src/server/input/config_changer.cpp (+3/-1) src/server/input/config_changer.h (+4/-1) src/server/input/default_configuration.cpp (+3/-1) src/server/input/default_input_device_hub.cpp (+21/-1) tests/acceptance-tests/test_client_input.cpp (+5/-3) tests/integration-tests/input/test_single_seat_setup.cpp (+2/-1) tests/unit-tests/input/test_config_changer.cpp (+2/-1) |
| To merge this branch: | bzr merge lp:~alan-griffiths/mir/preserve-ExternalInputDeviceHub |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Mir CI Bot | continuous-integration | Approve on 2017-04-06 | |
| Alberto Aguirre | Approve on 2017-04-06 | ||
| Alan Griffiths | Abstain on 2017-04-06 | ||
| Andreas Pokorny (community) | 2017-04-04 | Approve on 2017-04-04 | |
|
Review via email:
|
|||
Commit Message
Recent changes mean that the_input_
| Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:4140
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
| Alan Griffiths (alan-griffiths) wrote : | # |
Logged as lp:1679713 - but two architectures on the same MP?
| Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:4140
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
| Alan Griffiths (alan-griffiths) wrote : | # |
The problem code manifests in TestClientInput
It appears that (as the hub now lives longer than the function scope) there is a callback presumably after the scope is left that accesses memory that is no longer valid.
Not sure how this happens (unless there's an exception) as remove_observer() is invoked before the function exits.
That should not happen, so the problem seems to lie in mi::ExternalInp
| Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:4141
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
| Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:4141
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
ABORTED: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
| Andreas Pokorny (andreas-pokorny) wrote : | # |
> The problem code manifests in TestClientInput
>
> It appears that (as the hub now lives longer than the function scope) there is
> a callback presumably after the scope is left that accesses memory that is no
> longer valid.
>
> Not sure how this happens (unless there's an exception) as remove_observer()
> is invoked before the function exits.
>
> That should not happen, so the problem seems to lie in
> mi::ExternalInp
I suspect a race between mir::GLibMainLo
Mir/Input: trigger notifications due to device removal in DefaultInputDev
Mir/Input: ExternalInputDe
MirMainLoop: GlibMainLoop:
main-thread: pause_processin
MirMainLoop: action()
| Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:4142
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
| Alan Griffiths (alan-griffiths) wrote : | # |
OK, finally looked at the right line of code.
ExternalInputDe
So there's no ordering that guarantees that "add(observer)" happens-before "remove(observer)". And if that order is inverted... BOOM
| Mir CI Bot (mir-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:4144
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
| Mir CI Bot (mir-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:4144
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
| Alberto Aguirre (albaguirre) wrote : | # |
Makes sense..
Sleep is still there.
- 4145. By Alan Griffiths on 2017-04-06
-
Remove test code
| Alan Griffiths (alan-griffiths) wrote : | # |
> Makes sense..
>
> Sleep is still there.
Thanks.
| Mir CI Bot (mir-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:4145
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/

ok .. the DO_NOT_USE is a bit excessive..