Bug 233316 - SIGABRT when inotify backend fails to start up
Summary: SIGABRT when inotify backend fails to start up
Alias: None
Product: Fedora
Classification: Fedora
Component: gamin
Version: 6
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Alexander Larsson
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2007-03-21 15:48 UTC by Robert Clark
Modified: 2007-11-30 22:11 UTC (History)
0 users

Clone Of:
Last Closed: 2007-04-11 14:40:22 UTC

Attachments (Terms of Use)
SIGABRT backtrace (1.32 KB, text/plain)
2007-03-21 15:48 UTC, Robert Clark
no flags Details
Patch to move initialized=TRUE (1.63 KB, patch)
2007-03-21 16:04 UTC, Robert Clark
no flags Details | Diff

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.

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