This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 233316 - SIGABRT when inotify backend fails to start up
SIGABRT when inotify backend fails to start up
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gamin (Show other bugs)
6
All Linux
medium Severity medium
: ---
: ---
Assigned To: Alexander Larsson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-03-21 11:48 EDT by Robert Clark
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-04-11 10:40:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Robert Clark 2007-03-21 11:48:59 EDT
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 11:48:59 EDT
Created attachment 150598 [details]
SIGABRT backtrace
Comment 2 Robert Clark 2007-03-21 11:57:50 EDT
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 12:04:05 EDT
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 10:40:22 EDT
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.