public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/abrt] update-2.17.8: abrt-journal: First seek the journal tail and then set filters
@ 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 : a20ba81e1de969ff5310297d05ac94a95a09e71d
Author : Michal Srb <michal@redhat.com>
Date : 2022-10-19T15:41:54+02:00
Stats : +67/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/abrt/c/a20ba81e1de969ff5310297d05ac94a95a09e71d?branch=update-2.17.8
Log:
abrt-journal: First seek the journal tail and then set filters
Resolves: rhbz#2128662
Signed-off-by: Michal Srb <michal@redhat.com>
---
diff --git a/0004-a-dump-journal-core-First-seek-the-journal-tail-and-.patch b/0004-a-dump-journal-core-First-seek-the-journal-tail-and-.patch
new file mode 100644
index 0000000..8d130b8
--- /dev/null
+++ b/0004-a-dump-journal-core-First-seek-the-journal-tail-and-.patch
@@ -0,0 +1,61 @@
+From 428bdf417b33d65fa5fbdcd292f12eef704bae95 Mon Sep 17 00:00:00 2001
+From: Michal Srb <michal@redhat.com>
+Date: Wed, 19 Oct 2022 06:43:38 +0200
+Subject: [PATCH] a-dump-journal-core: First seek the journal tail and then set
+ filters
+
+See: rhbz#2128662
+
+a-dump-journal-core uses filters to jump between
+systemd-coredump entries in journal.
+
+However, we should first jump to the starting position
+(journal tail) and only then set filters.
+I suspect that setting the filters early, before we are
+at the starting position, can lead to the strange
+behavior that we are seeing in Fedora.
+
+This patch makes the problem go away on my freshly-installed
+Fedora 37 VM.
+
+Signed-off-by: Michal Srb <michal@redhat.com>
+---
+ src/plugins/abrt-dump-journal-core.c | 17 +++++++++++------
+ 1 file changed, 11 insertions(+), 6 deletions(-)
+
+diff --git a/src/plugins/abrt-dump-journal-core.c b/src/plugins/abrt-dump-journal-core.c
+index 68d5b320..1bb793a2 100644
+--- a/src/plugins/abrt-dump-journal-core.c
++++ b/src/plugins/abrt-dump-journal-core.c
+@@ -628,17 +628,22 @@ main(int argc, char *argv[])
+ error_msg_and_die(_("Cannot open systemd-journal"));
+ }
+
+- if (abrt_journal_set_journal_filter(journal, coredump_journal_filter) < 0)
+- error_msg_and_die(_("Cannot filter systemd-journal to systemd-coredump data only"));
++ if (opts & OPT_e) {
++ if (abrt_journal_seek_tail(journal) < 0)
++ error_msg_and_die(_("Cannot seek to the end of journal"));
+
+- g_list_free(coredump_journal_filter);
+-
+- if ((opts & OPT_e) && abrt_journal_seek_tail(journal) < 0)
+- error_msg_and_die(_("Cannot seek to the end of journal"));
++ if (abrt_journal_save_current_position(journal, ABRT_JOURNAL_WATCH_STATE_FILE) < 0)
++ log_warning("Failed to save the starting cursor position");
++ }
+
+ if (cursor && abrt_journal_set_cursor(journal, cursor))
+ error_msg_and_die(_("Failed to set systemd-journal cursor '%s'"), cursor);
+
++ if (abrt_journal_set_journal_filter(journal, coredump_journal_filter) < 0)
++ error_msg_and_die(_("Cannot filter systemd-journal to systemd-coredump data only"));
++
++ g_list_free(coredump_journal_filter);
++
+ if ((opts & OPT_f))
+ {
+ if (!cursor && !(opts & OPT_e))
+--
+2.37.3
+
diff --git a/abrt.spec b/abrt.spec
index e6c1ad1..15ae1a0 100644
--- a/abrt.spec
+++ b/abrt.spec
@@ -49,13 +49,14 @@
Summary: Automatic bug detection and reporting tool
Name: abrt
Version: 2.15.1
-Release: 5%{?dist}
+Release: 6%{?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
Patch2: 0003-applet-Update-GLib-constant-name.patch
+Patch3: 0004-a-dump-journal-core-First-seek-the-journal-tail-and-.patch
BuildRequires: git-core
BuildRequires: %{dbus_devel}
@@ -1010,6 +1011,10 @@ killall abrt-dbus >/dev/null 2>&1 || :
%config(noreplace) %{_sysconfdir}/profile.d/abrt-console-notification.sh
%changelog
+* Wed Oct 19 2022 Michal Srb <michal@redhat.com> - 2.15.1-6
+- abrt-journal: First seek the journal tail and then set filters
+- Resolves: rhbz#2128662
+
* 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
^ 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: First seek the journal tail and then set filters Michal Srb
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox