Bug 233316

Summary: SIGABRT when inotify backend fails to start up
Product: [Fedora] Fedora Reporter: Robert Clark <robert3>
Component: gaminAssignee: Alexander Larsson <alexl>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-04-11 14:40:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Description Flags
SIGABRT backtrace
Patch to move initialized=TRUE none

Description Robert Clark 2007-03-21 15:48:59 UTC
If the inotify backend fails to start up (for example on a kernel without
inotify support), gamin falls back to one of its other backends, but dies with a

Backtrace attached.

Comment 1 Robert Clark 2007-03-21 15:48:59 UTC
Created attachment 150598 [details]
SIGABRT backtrace

Comment 2 Robert Clark 2007-03-21 15:57:50 UTC
I think the important part of the stack trace is in gam_listener.c:106:

101     if (gam_inotify_is_running() && (!gam_exclude_check(path))) {
102         gam_fs_mon_type type;
104         type = gam_fs_get_mon_type (path);
105         if (type != GFS_MT_POLL)
106             gam_subscription_free(sub);
107     }
108 #endif

This shouldn't be reached unless the inotify backend has started successfully.

Looking at inotify-helper.c:90:

90         initialized = TRUE;
92         result = ip_startup (ih_event_callback);
93         if (!result) {
94                 g_warning( "Could not initialize inotify\n");
95                 G_UNLOCK(inotify_lock);
96                 return FALSE;
97         }

it seems that initialized is set TRUE even if the start up fails.

I've tested a patch which changes this and it works for me. I'll attach it.

Comment 3 Robert Clark 2007-03-21 16:04:05 UTC
Created attachment 150600 [details]
Patch to move initialized=TRUE

This patch moves initialized=TRUE to after the test of the return value from
ip_startup. It also makes similar changes with calls to inotify_init and

Comment 4 Alexander Larsson 2007-04-11 14:40:22 UTC
Fixed in gamin-0.1.8-5.fc7 and upstream.