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 868336 Details for
Bug 1047039
rsyslog consumes 100% CPU
[?]
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]
patch 2/2
0002-journal-forget-file-after-encountering-an-error.patch (text/plain), 2.42 KB, created by
Zbigniew Jędrzejewski-Szmek
on 2014-02-27 06:20:51 UTC
(
hide
)
Description:
patch 2/2
Filename:
MIME Type:
Creator:
Zbigniew Jędrzejewski-Szmek
Created:
2014-02-27 06:20:51 UTC
Size:
2.42 KB
patch
obsolete
>From 1eefd49a30ad08192a45852d1c3602ddbc21d4e8 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> >Date: Thu, 27 Feb 2014 00:11:54 -0500 >Subject: [PATCH 2/2] journal: forget file after encountering an error > >If we encounter an inconsistency in a file, let's just >ignore it. Otherwise, after previous patch, we would try, >and fail, to use this file in every invocation of sd_journal_next >or sd_journal_previous that happens afterwards. >--- > src/journal/sd-journal.c | 16 ++++++++++++---- > 1 file changed, 12 insertions(+), 4 deletions(-) > >diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c >index ef455e9..b54bc21 100644 >--- a/src/journal/sd-journal.c >+++ b/src/journal/sd-journal.c >@@ -51,6 +51,8 @@ > > #define DEFAULT_DATA_THRESHOLD (64*1024) > >+static void remove_file_real(sd_journal *j, JournalFile *f); >+ > static bool journal_pid_changed(sd_journal *j) { > assert(j); > >@@ -885,6 +887,7 @@ static int real_journal_next(sd_journal *j, direction_t direction) { > r = next_beyond_location(j, f, direction, &o, &p); > if (r < 0) { > log_debug("Can't iterate through %s, ignoring: %s", f->path, strerror(-r)); >+ remove_file_real(j, f); > continue; > } else if (r == 0) > continue; >@@ -1339,7 +1342,7 @@ static int add_file(sd_journal *j, const char *prefix, const char *filename) { > } > > static int remove_file(sd_journal *j, const char *prefix, const char *filename) { >- char *path; >+ _cleanup_free_ char *path; > JournalFile *f; > > assert(j); >@@ -1351,10 +1354,17 @@ static int remove_file(sd_journal *j, const char *prefix, const char *filename) > return -ENOMEM; > > f = hashmap_get(j->files, path); >- free(path); > if (!f) > return 0; > >+ remove_file_real(j, f); >+ return 0; >+} >+ >+static void remove_file_real(sd_journal *j, JournalFile *f) { >+ assert(j); >+ assert(f); >+ > hashmap_remove(j->files, f->path); > > log_debug("File %s removed.", f->path); >@@ -1372,8 +1382,6 @@ static int remove_file(sd_journal *j, const char *prefix, const char *filename) > journal_file_close(f); > > j->current_invalidate_counter ++; >- >- return 0; > } > > static int add_directory(sd_journal *j, const char *prefix, const char *dirname) { >-- >1.8.5.2 >
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 1047039
:
843494
|
844370
|
854746
|
868335
| 868336 |
893030