public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/abrt] update-2.17.8: abrt-journal: call sd_journal_get_fd() right after sd_journal_open()
@ 2026-08-03 10:24 Michal Srb
0 siblings, 0 replies; only message in thread
From: Michal Srb @ 2026-08-03 10:24 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/abrt
Branch : update-2.17.8
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.8
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-03 10:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-03 10:24 [rpms/abrt] update-2.17.8: abrt-journal: call sd_journal_get_fd() right after sd_journal_open() Michal Srb
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox