[Bug 52482] Allow replacing running CMs

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Jul 26 20:57:45 CEST 2012


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

--- Comment #3 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2012-07-26 11:57:45 PDT ---
(I have not reviewed in detail.)

Doesn't this have a race condition?

old Gabble            new Gabble
-----------------------------------
has 2 connections
                      starts
                      takes CM name
loses CM name
closes connections    starts connecting
                  RACE

If the new Gabble starts taking Connection names before the old Gabble has
closed and released them, then the new Gabble's RequestConnection() is going to
fail.

Perhaps that's OK if MC will try reconnecting or something? But be careful.

Also be very careful with shared resources. If Gabble is writing to a file and
assumes it will be the only one doing so because the bus name is a mutex - that
assumption isn't true any more.

(In reply to comment #1)
> could do the same for MC

Be very, very careful about this sort of thing in MC. Unlike Gabble, MC does
definitely write to several files with non-cache semantics (potential for data
loss if something goes wrong). Because delivering and processing a D-Bus
message isn't atomic, there may be a window during which the new MC thinks it
has the name, but the old MC still thinks it *also* has the name, and is still
happy to write to the files.

-- 
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