[Bug 37381] client-types.py appears to have a race

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Feb 8 18:46:11 CET 2012


https://bugs.freedesktop.org/show_bug.cgi?id=37381

--- Comment #1 from Alban Crequy <alban.crequy at collabora.co.uk> 2012-02-08 09:46:11 PST ---
The first race is fixed by your sync_stream.

The second race is interesting :) It can be reproduced at 100% if you add a
time.sleep(2) just before the "phone comes online". The race happens when the
'phone' and the 'pc' come online at different time in second since Epoch.

It is due to src/presence.c aggregate_resources(): the sort criteria to find
the best resource has 2 problems:

- it depends on last_available in seconds, and the unit tests cannot guarantee
that both resources will come online at the same Epoch-second.

- it sorts both on last_available and on client_type but none of them has a
priority over the other, so the result of the sorting will depend on the
previous order. We need to decide whether last_available or client_type is more
important.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.



More information about the telepathy-bugs mailing list