Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 154785 - gamin isn't thread-safe
Summary: gamin isn't thread-safe
Alias: None
Product: Fedora
Classification: Fedora
Component: gamin
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Daniel Veillard
QA Contact:
Depends On:
Blocks: FC4Target
TreeView+ depends on / blocked
Reported: 2005-04-14 04:51 UTC by Nicholas Miell
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version: 0.0.25
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-08-20 07:53:29 UTC

Attachments (Terms of Use)
Add some basic locking to libgamin (deleted)
2005-04-14 04:51 UTC, Nicholas Miell
no flags Details | Diff

Description Nicholas Miell 2005-04-14 04:51:59 UTC
AFAICT, multithreaded clients of libgamin (such as nautilus/gnome-vfs) will
cause libgamin to corrupt the connection's GAMData::req_tab.

The end result in the nautilus/gnome-vfs case is that the wrong userdata pointer
is returned by FAMNextEvent and nautilus will fail to update it's views.

See for a discussion.

Attached is a half-assed patch which does some basic locking.

Without it, nautilus will stop updating my desktop within about an hour (at
maximum) from my login (less if I fiddle with it). With it, I don't seem to be
able to reproduce  the problem.

Note that this patch may not be suitable for use in gamin; I didn't really
bother to understand libgamin internals, so it probably isn't release-worthy.
However, it does appear to fix my problem, and in the two days that I've been
using it (not stressing it, just using it) nothing bad has happened that I've

Comment 1 Nicholas Miell 2005-04-14 04:51:59 UTC
Created attachment 113140 [details]
Add some basic locking to libgamin

Comment 2 Daniel Veillard 2005-04-14 16:45:02 UTC
thanks, I knew it was a potential problem but never checked deeply.
I'm on vacations right now, I will look at the patch and the problem
when I get back. Thanks a lot, if you don't get a answer soon doesn't
mean your patch or the problem is dropped !


Comment 3 Daniel Veillard 2005-05-02 14:33:10 UTC
Okay, I have applied the patch, but changed integration for autoconf and 
using gcc tricks to not force the pthread library on applications which are
not multithreaded. It's integrated in CVS at this point but may need a bit more
testing though.

  thanks a lot,


Comment 4 Marius Andreiana 2005-08-20 07:37:45 UTC
Reporter, would you please test with current devel?

Comment 5 Daniel Veillard 2005-08-20 07:53:29 UTC
The thread-safety is fixed since 0.0.25 IIRC,


Note You need to log in before you can comment on or make changes to this bug.