[Nautilus-list] race condition in nautilus-monitor



Hi,

to debug the following "warning" i was seeing in nautilus HEAD

nautilus (pid:17886): ** CRITICAL **: file nautilus-monitor.c: line 115 (get_event_uri): 
assertion `base_path != NULL' failed
aborting...

I added a few g_print's in nautilus monitor :
 - every time we ask fam to monitor something
 - every time we stop monitoring something

The output is following. I trigger the problem by clicking rapidly on reload.

adding (0x9,/home/gnome2) to monitored uris hash
looking for (0x9) in monitored uris hash
looking for (0x9) in monitored uris hash
looking for (0x9) in monitored uris hash

==> we remove the request from the hashtable here
removing (0x9,/home/gnome2) from monitored uris hash
freeing path
==> we call FAMCancelMonitoring here
cancelling monitoring
monitoring dir /home/gnome2
==> the view has reloading, so we monitor the new path
adding (0xa,/home/gnome2) to monitored uris hash

looking for (0x9) in monitored uris hash <========== Problem here !!!

nautilus (pid:17886): ** CRITICAL **: file nautilus-monitor.c: line 115 (get_event_uri): 
assertion `base_path != NULL' failed
aborting...

We canceled monitoring on this fam request, but we are still 
getting notifications. So the lookup in the hashtable fails.

My guess is that FAMCancelMonitoring is async, 
and returns before really removing the 'monitor'.

I'd like to fix this thing, but I'm not sure if I should at the fam source,
or add some locks in nautilus-monitor.

Any idea someone ?







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]