Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 661386 Details for
Bug 873815
abrtd and inotify interaction can deadlock abrtd daemon
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Proposed fix
1.patch (text/plain), 1.73 KB, created by
Denys Vlasenko
on 2012-12-11 12:18:19 UTC
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Denys Vlasenko
Created:
2012-12-11 12:18:19 UTC
Size:
1.73 KB
patch
obsolete
>diff -x '*.po' -d -urpN abrt.0/src/daemon/abrtd.c abrt.1/src/daemon/abrtd.c >--- abrt.0/src/daemon/abrtd.c 2012-11-26 10:10:07.000000000 +0100 >+++ abrt.1/src/daemon/abrtd.c 2012-12-11 13:15:36.114734860 +0100 >@@ -498,13 +498,18 @@ static gboolean handle_inotify_cb(GIOCha > /* NB: this variable _must_ be int-sized, ioctl expects that! */ > int inotify_bytes = INOTIFY_BUF_SIZE; > if (ioctl(g_io_channel_unix_get_fd(gio), FIONREAD, &inotify_bytes) != 0 >- || inotify_bytes < sizeof(struct inotify_event) >+ /*|| inotify_bytes < sizeof(struct inotify_event) >+ ^^^^^^^^^^^^^^^^^^^ - WRONG: legitimate 0 was seen when flooded with inotify events >+ */ > || inotify_bytes > INOTIFY_BUF_SIZE > ) { > inotify_bytes = INOTIFY_BUF_SIZE; > } > VERB3 log("FIONREAD:%d", inotify_bytes); > >+ if (inotify_bytes == 0) >+ return TRUE; /* "please don't remove this event" */ >+ > char *buf = (char*)xmalloc(inotify_bytes); > errno = 0; > gsize len; >@@ -514,6 +519,8 @@ static gboolean handle_inotify_cb(GIOCha > { > perror_msg("Error reading inotify fd: %s", gerror ? gerror->message : "unknown"); > free(buf); >+ if (gerror) >+ g_error_free(gerror); > return FALSE; /* "remove this event" (huh??) */ > } > >@@ -953,6 +960,10 @@ int main(int argc, char** argv) > } > } > VERB1 log("Adding inotify watch to glib main loop"); >+ /* Without nonblocking mode, users observed abrtd blocking >+ * on inotify read forever. Must set fd to non-blocking: >+ */ >+ ndelay_on(inotify_fd); > channel_inotify = my_io_channel_unix_new(inotify_fd); > channel_id_inotify_event = add_watch_or_die(channel_inotify, > G_IO_IN | G_IO_PRI | G_IO_HUP,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 873815
:
639505
| 661386