public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Michal Srb <michal@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/abrt] update-2.17.9-f44: abrt-journal: call sd_journal_get_fd() right after sd_journal_open()
Date: Mon, 03 Aug 2026 11:05:40 GMT [thread overview]
Message-ID: <178575514033.1.11474268340900145298.rpms-abrt-534292e248ea@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/abrt
Branch : update-2.17.9-f44
Commit : 534292e248ea6cfd1b3ce048b867ff3dedca9a61
Author : Michal Srb <michal@redhat.com>
Date : 2022-10-12T09:43:01+02:00
Stats : +71/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/abrt/c/534292e248ea6cfd1b3ce048b867ff3dedca9a61?branch=update-2.17.9-f44
Log:
abrt-journal: call sd_journal_get_fd() right after sd_journal_open()
Resolves: rhbz#2128662
Signed-off-by: Michal Srb <michal@redhat.com>
---
diff --git a/0002-abrt-journal-call-sd_journal_get_fd-right-after-sd_j.patch b/0002-abrt-journal-call-sd_journal_get_fd-right-after-sd_j.patch
new file mode 100644
index 0000000..9c42e6e
--- /dev/null
+++ b/0002-abrt-journal-call-sd_journal_get_fd-right-after-sd_j.patch
@@ -0,0 +1,65 @@
+From 4ebe2699287844d2766f87062c48d8953b292bfe Mon Sep 17 00:00:00 2001
+From: Michal Srb <michal@redhat.com>
+Date: Tue, 11 Oct 2022 22:41:33 +0200
+Subject: [PATCH] abrt-journal: call sd_journal_get_fd() right after
+ sd_journal_open()
+
+See: rhbz#2128662
+
+Under certain circumstances, abrt-dump-journal can be running,
+but not receiving any event notifications from journal.
+
+The culprit of the issue seems to be the delayed call
+to sd_journal_get_fd(), as discussed in various
+issues and pull-requests in other projects.
+See for example [1], [2], or [3].
+
+[1]: https://github.com/systemd/systemd/issues/7998
+[2]: https://github.com/ledbettj/systemd-journal/pull/78
+[3]: https://github.com/rsyslog/rsyslog/issues/2436
+
+Signed-off-by: Michal Srb <michal@redhat.com>
+---
+ src/plugins/abrt-journal.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/plugins/abrt-journal.c b/src/plugins/abrt-journal.c
+index adc9440e..48ae8c99 100644
+--- a/src/plugins/abrt-journal.c
++++ b/src/plugins/abrt-journal.c
+@@ -35,12 +35,15 @@
+ struct abrt_journal
+ {
+ sd_journal *j;
++ int fd;
+ };
+
+ static int abrt_journal_new_flags(abrt_journal_t **journal, int flags)
+ {
+ sd_journal *j;
+ const int r = sd_journal_open(&j, flags);
++ const int fd = sd_journal_get_fd(j);
++
+ if (r < 0)
+ {
+ log_notice("Failed to open journal: %s", strerror(-r));
+@@ -49,6 +52,7 @@ static int abrt_journal_new_flags(abrt_journal_t **journal, int flags)
+
+ *journal = g_malloc0(sizeof(**journal));
+ (*journal)->j = j;
++ (*journal)->fd = fd;
+
+ return 0;
+ }
+@@ -452,7 +456,7 @@ int abrt_journal_watch_run_sync(abrt_journal_watch_t *watch)
+ sigdelset(&mask, SIGKILL);
+
+ struct pollfd pollfd;
+- pollfd.fd = sd_journal_get_fd(watch->j->j);
++ pollfd.fd = watch->j->fd;
+ pollfd.events = sd_journal_get_events(watch->j->j);
+
+ int r = 0;
+--
+2.37.3
+
diff --git a/abrt.spec b/abrt.spec
index b5632b6..201f845 100644
--- a/abrt.spec
+++ b/abrt.spec
@@ -49,11 +49,12 @@
Summary: Automatic bug detection and reporting tool
Name: abrt
Version: 2.15.1
-Release: 4%{?dist}
+Release: 5%{?dist}
License: GPLv2+
URL: https://abrt.readthedocs.org/
Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
Patch0: 0001-Fix-for-rpm-4.18.patch
+Patch1: 0002-abrt-journal-call-sd_journal_get_fd-right-after-sd_j.patch
BuildRequires: git-core
BuildRequires: %{dbus_devel}
@@ -1008,6 +1009,10 @@ killall abrt-dbus >/dev/null 2>&1 || :
%config(noreplace) %{_sysconfdir}/profile.d/abrt-console-notification.sh
%changelog
+* Wed Oct 12 2022 Michal Srb <michal@redhat.com> - 2.15.1-5
+- abrt-journal: call sd_journal_get_fd() right after sd_journal_open()
+- Resolves: rhbz#2128662
+
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.15.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
reply other threads:[~2026-08-03 11:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178575514033.1.11474268340900145298.rpms-abrt-534292e248ea@fedoraproject.org \
--to=michal@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox