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: First seek the journal tail and then set filters
Date: Mon, 03 Aug 2026 11:05:41 GMT [thread overview]
Message-ID: <178575514175.1.8698267690937371980.rpms-abrt-a20ba81e1de9@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/abrt
Branch : update-2.17.9-f44
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.9-f44
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
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=178575514175.1.8698267690937371980.rpms-abrt-a20ba81e1de9@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