← Back to team overview

syncany-team team mailing list archive

Re: Race Conditions


Hallo Stefan,

I realize that Syncany has a problem regarding the number of threads
and their synchronization. I already tried to minimize the number of
threads: the initial design contained one Indexer and one LocalWatcher
per profile, now it's only one for the whole application.

In regard to race conditions and thread synchronization I know that
there might be some problems in the code: around 20 threads (from
which half of them run at the same time) don't help with that. I
suppose we could eliminate a few of them in the future to avoid these
bugs in the first place.

Do you have extensive experience with these kind of issues? I must
admit that I am rather inexperienced when it comes to tackling race
conditions and other threading issues.


On Wed, Jun 1, 2011 at 8:26 AM, Stefan Mai <ubuntu@xxxxxxxxxxxxx> wrote:
> Phillip,
> I'm debugging Syncany in Windows and having some trouble mostly related to
> race conditions. There are a lot of instances where we spin up an anonymous
> thread to do some loading and *don't join the thread* before the data is
> needed. These are the hardest bugs to track down and I think it's important
> that we buckle this down now rather than later. The biggest instance is the
> load routine of the Plugins class which takes about 30 seconds on my PC. If
> we don't wait for the routine to finish, the dialogs aren't even navigable
> as there are no plugins to select.
> I'll be making changes as necessary, but I'd like to make sure that we're
> synchronizing threads in the future as these bugs will only get nastier.
> Thanks,
> Stefan
> --
> Mailing list: https://launchpad.net/~syncany-team
> Post to     : syncany-team@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~syncany-team
> More help   : https://help.launchpad.net/ListHelp