Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExternalInputDeviceHub::remove_observer() hangs #359

Closed
AlanGriffiths opened this issue May 9, 2018 · 0 comments
Closed

ExternalInputDeviceHub::remove_observer() hangs #359

AlanGriffiths opened this issue May 9, 2018 · 0 comments
Assignees
Labels

Comments

@AlanGriffiths
Copy link
Contributor

AlanGriffiths commented May 9, 2018

Repeatedly running wlcs tests leads to an intermittent hang as follows.

  1. The main loop has stopped.
  2. The base thread is waiting on server.stop()
  3. The AsyncServer thead is waiting on wayland->stop() (in DisplayServer::run())
  4. The Wayland thread is waiting on ExternalInputDeviceHub::remove_observer()
  5. This is waiting on a condition_variable that should be notified by functor enqueued with enqueue_with_guaranteed_execution()

This seems to be a race in that enqueue_with_guaranteed_execution() has enqueued the action.I.e. it has seen "running" as true (and not run the action on the calling thread).

@AlanGriffiths AlanGriffiths self-assigned this May 9, 2018
bors bot added a commit that referenced this issue May 10, 2018
360: Ensure actions queued by GLibMainLoop::enqueue_with_guaranteed_execution() are executed r=RAOF a=AlanGriffiths

Ensure actions queued by GLibMainLoop::enqueue_with_guaranteed_execution() are executed. (Fixes #359)

Co-authored-by: Alan Griffiths <alan@octopull.co.uk>
@AlanGriffiths AlanGriffiths changed the title mir::GLibMainLoop::enqueue_with_guaranteed_execution() does not guarantee execution ExternalInputDeviceHub::remove_observer() hangs May 10, 2018
bors bot added a commit that referenced this issue May 11, 2018
360: Ensure ExternalInputDeviceHub::remove_observer() synchronizes memory across threads r=gerboland a=AlanGriffiths

Ensure ExternalInputDeviceHub::remove_observer() synchronizes memory across threads. (Fixes #359)

Co-authored-by: Alan Griffiths <alan@octopull.co.uk>
@bors bors bot closed this as completed in #360 May 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant