[Merge] lp:~alextu/ciborium/LP1576013_wait_udiskd_ready into lp:ciborium

Alex Tu alex.tu at canonical.com
Thu May 19 07:36:12 UTC 2016


The proposal to merge lp:~alextu/ciborium/LP1576013_wait_udiskd_ready into lp:ciborium has been updated.

Commit Message changed to:

sdcard: fix racing condition between ciborium and udisks

udisks is a D-Bus activated service. When its first client, currently seems to be ciborium, starts up and tries to connect udisks D-Bus service, udisks starts up and being to process uevents. When ciborium then tries to retrieve all the managed objects through standard ObjectManager interface, udisks may or may not have finished the processing. Then ciborium goes ahead to register event signals from udisks, and, again, udisks may or may not have finished his job. There is a very high possibility, observed on Turbo after the media scanner patch, that udisks finishes his job right between the objects retrieval and signal registration. It follows, ciborium is not aware of the existence of SD card device in the first place because it just doesn't appear in the object tree, and there won't be a PropertiesChanged signal for further tracing because that signal has been emitted before udisks finished his queue. There only way is to restart ciborium service so that SD card device appears in the object retrieval.

This patch adds a pre-start section to ciborium service which activates udisks service before ciborium itself, and adds a 3-second sleep to buy some time for udisks to finish its uevent queue.

Bug: https://bugs.launchpad.net/zhongshan/+bug/1574611
Bug: https://bugs.launchpad.net/zhongshan/+bug/1576013

For more details, see:
https://code.launchpad.net/~alextu/ciborium/LP1576013_wait_udiskd_ready/+merge/293640
-- 
Your team Ubuntu Phablet Team is subscribed to branch lp:ciborium.



More information about the Ubuntu-reviews mailing list