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 233316 - SIGABRT when inotify backend fails to start up
Summary: SIGABRT when inotify backend fails to start up
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gamin
Version: 6
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Alexander Larsson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-03-21 15:48 UTC by Robert Clark
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-04-11 14:40:22 UTC


Attachments (Terms of Use)
SIGABRT backtrace (deleted)
2007-03-21 15:48 UTC, Robert Clark
no flags Details
Patch to move initialized=TRUE (deleted)
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
SIGABRT.

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:

100 #ifdef ENABLE_INOTIFY
101     if (gam_inotify_is_running() && (!gam_exclude_check(path))) {
102         gam_fs_mon_type type;
103 
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;
91 
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
ik_startup.

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.