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 http://bugzilla.gnome.org/show_bug.cgi?id=172750 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 noticed.
Created attachment 113140 [details] Add some basic locking to libgamin
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 ! Daniel
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, Daniel
Reporter, would you please test with current devel?
The thread-safety is fixed since 0.0.25 IIRC, Daniel