From 518bfe6a7303a35ef7c2c04b50d8147ac6d14136 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Fri, 30 Apr 2021 22:37:59 +0100 Subject: [PATCH 1/5] Obsoletes abrt-plugin-sosreport, to fix upgrade path --- abrt.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/abrt.spec b/abrt.spec index 42dc290..73cd3ad 100644 --- a/abrt.spec +++ b/abrt.spec @@ -49,7 +49,7 @@ Summary: Automatic bug detection and reporting tool Name: abrt Version: 2.14.5 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: https://abrt.readthedocs.org/ Source: https://github.com/abrt/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz @@ -107,6 +107,8 @@ Requires: libreport-plugin-ureport %if 0%{?fedora} Requires: libreport-plugin-systemd-journal %endif +# to fix upgrade path abrt-plugin-sosreport was removed in 2.14.5 version. +Obsoletes: abrt-plugin-sosreport < 2.14.5 #gui BuildRequires: libreport-gtk-devel >= %{libreport_ver} @@ -998,6 +1000,9 @@ killall abrt-dbus >/dev/null 2>&1 || : %config(noreplace) %{_sysconfdir}/profile.d/abrt-console-notification.sh %changelog +* Fri Apr 30 2021 Sérgio Basto - 2.14.5-3 +- Obsoletes abrt-plugin-sosreport, to fix upgrade path + * Mon Jan 25 2021 Fedora Release Engineering - 2.14.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From fbe1bd1ca048e31f44bcc4c7e1cf7692df8e7fbc Mon Sep 17 00:00:00 2001 From: Michal Fabik Date: Tue, 25 May 2021 13:49:17 +0200 Subject: [PATCH 2/5] New upstream release 2.14.6 Signed-off-by: Michal Fabik --- .gitignore | 1 + abrt.spec | 19 +++++++++++++++---- sources | 2 +- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 122dd2f..75abc74 100644 --- a/.gitignore +++ b/.gitignore @@ -74,3 +74,4 @@ abrt-1.1.13.tar.gz /abrt-2.14.3.tar.gz /abrt-2.14.4.tar.gz /abrt-2.14.5.tar.gz +/abrt-2.14.6.tar.gz diff --git a/abrt.spec b/abrt.spec index 73cd3ad..f2d3fe1 100644 --- a/abrt.spec +++ b/abrt.spec @@ -48,11 +48,11 @@ Summary: Automatic bug detection and reporting tool Name: abrt -Version: 2.14.5 -Release: 3%{?dist} +Version: 2.14.6 +Release: 1%{?dist} License: GPLv2+ URL: https://abrt.readthedocs.org/ -Source: https://github.com/abrt/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz +Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: git-core BuildRequires: %{dbus_devel} @@ -259,6 +259,7 @@ Requires: kexec-tools %if %{with python3} Requires: python3-abrt Requires: python3-augeas +Requires: python3-systemd %endif Requires: util-linux @@ -472,7 +473,7 @@ to the shell %build -autoreconf +./autogen.sh %define default_dump_dir %{_localstatedir}/spool/abrt @@ -1000,6 +1001,16 @@ killall abrt-dbus >/dev/null 2>&1 || : %config(noreplace) %{_sysconfdir}/profile.d/abrt-console-notification.sh %changelog +* Tue May 25 2021 Michal Fabik - 2.14.6-1 +- Add support of master + subkeys gpg. +- hooks: Remove stale workaround for a fixed bug +- cli: Gracefully handle disappearance of problem directory +- libs: Add version info script +- retrace-client: Output task ID to console in batch mode +- retrace-client: Separate commands by commas +- Doc: Improve man page for abrt-action-analyze-vulnerability +- Various memory management and other fixes + * Fri Apr 30 2021 Sérgio Basto - 2.14.5-3 - Obsoletes abrt-plugin-sosreport, to fix upgrade path diff --git a/sources b/sources index cf3278c..601ce96 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (abrt-2.14.5.tar.gz) = ceb55d1e31966fe795bea19f96b1f0af2d4e97c3a7da29858f222a6a9442ebe00e589001b2e4cafd2e5b3a2d6db362b895bd6df63365cabe82fc0111428b05b6 +SHA512 (abrt-2.14.6.tar.gz) = eb1ba2f624d51eeccd203bb23060493347f5a9142fad7d0570d46134071d870a9c66b4fbfb8210e7d6f87c0c039f31eb486d18a36b10fba318e2180aa09df9fe From 4428e79a4dbfac72dc83538a274a183cc4db1f06 Mon Sep 17 00:00:00 2001 From: Michal Fabik Date: Wed, 2 Jun 2021 15:52:41 +0200 Subject: [PATCH 3/5] Rebuild against libreport-2.15.2 Signed-off-by: Michal Fabik --- abrt.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/abrt.spec b/abrt.spec index f2d3fe1..9add0f9 100644 --- a/abrt.spec +++ b/abrt.spec @@ -49,7 +49,7 @@ Summary: Automatic bug detection and reporting tool Name: abrt Version: 2.14.6 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: https://abrt.readthedocs.org/ Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz From daaec7215b5573b900363119b99d7abe88694aa3 Mon Sep 17 00:00:00 2001 From: Michal Fabik Date: Fri, 4 Jun 2021 15:04:11 +0200 Subject: [PATCH 4/5] Bump release to rebuild in new side tag Signed-off-by: Michal Fabik --- abrt.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/abrt.spec b/abrt.spec index 9add0f9..5591b28 100644 --- a/abrt.spec +++ b/abrt.spec @@ -49,7 +49,7 @@ Summary: Automatic bug detection and reporting tool Name: abrt Version: 2.14.6 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: https://abrt.readthedocs.org/ Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz From bb524cb69813f3608b4db0da1088f94ffe78adf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Grabovsk=C3=BD?= Date: Mon, 27 Sep 2021 12:34:36 +0200 Subject: [PATCH 5/5] Backport Python lazy loading patch (rhbz#2007664) --- ...y-imports-in-abrt_exception_handler3.patch | 57 +++++++++++++++++++ 0001-hooklib-Don-t-g_autofree-backtrace.patch | 40 ------------- ...-hooklib-Proper-freeing-of-backtrace.patch | 40 ------------- abrt.spec | 8 ++- 4 files changed, 64 insertions(+), 81 deletions(-) create mode 100644 0001-Use-lazy-imports-in-abrt_exception_handler3.patch delete mode 100644 0001-hooklib-Don-t-g_autofree-backtrace.patch delete mode 100644 0002-hooklib-Proper-freeing-of-backtrace.patch diff --git a/0001-Use-lazy-imports-in-abrt_exception_handler3.patch b/0001-Use-lazy-imports-in-abrt_exception_handler3.patch new file mode 100644 index 0000000..5c892a8 --- /dev/null +++ b/0001-Use-lazy-imports-in-abrt_exception_handler3.patch @@ -0,0 +1,57 @@ +From 4755f2171aa50a72d8ec03260c8cbc602263a6c0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Fri, 24 Sep 2021 17:48:07 +0200 +Subject: [PATCH] Use lazy imports in abrt_exception_handler3 + +The abrt_exception_handler3 module is always imported when Python starts, +but all the modules imported from it (except sys) are only used during crashes. + +Especially the systemd.journal import is really expensive. + +Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2007664 +--- + src/hooks/abrt_exception_handler3.py.in | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/src/hooks/abrt_exception_handler3.py.in b/src/hooks/abrt_exception_handler3.py.in +index 89e2474b..0bc548e0 100644 +--- a/src/hooks/abrt_exception_handler3.py.in ++++ b/src/hooks/abrt_exception_handler3.py.in +@@ -20,13 +20,15 @@ + Module for the ABRT exception handling hook + """ + ++# Avoid importing anything but sys here, use lazy imports. ++# This file is imported on every Python startup, ++# all unused imports only increase the startup time and memory usage. + import sys +-import os + +-from systemd import journal + + def syslog(msg): + """Log message to system logger (journal)""" ++ from systemd import journal + + journal.send(msg) + +@@ -68,6 +70,8 @@ def send(data): + + + def write_dump(tb_text, tb): ++ import os ++ + if sys.argv[0][0] == "/": + executable = os.path.abspath(sys.argv[0]) + else: +@@ -118,6 +122,7 @@ def handle_exception(etype, value, tb): + sys.excepthook = sys.__excepthook__ # pylint: disable-msg=E1101 + + import errno ++ import os + + # Ignore Ctrl-C + # SystemExit rhbz#636913 -> this exception is not an error +-- +2.31.1 + diff --git a/0001-hooklib-Don-t-g_autofree-backtrace.patch b/0001-hooklib-Don-t-g_autofree-backtrace.patch deleted file mode 100644 index 1225177..0000000 --- a/0001-hooklib-Don-t-g_autofree-backtrace.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 1f2963b0611d4023957abe3c7391eab86256ba82 Mon Sep 17 00:00:00 2001 -From: Michal Fabik -Date: Wed, 23 Sep 2020 16:55:25 +0200 -Subject: [PATCH] hooklib: Don't g_autofree backtrace - -The result of abrt_get_backtrace was being freed every time, even when -no error occured. - -Resolves: -https://github.com/abrt/abrt/issues/1528 -https://bugzilla.redhat.com/show_bug.cgi?id=1881745 -Signed-off-by: Michal Fabik ---- - src/lib/hooklib.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/lib/hooklib.c b/src/lib/hooklib.c -index dceaeb16..56b77bc3 100644 ---- a/src/lib/hooklib.c -+++ b/src/lib/hooklib.c -@@ -348,7 +348,7 @@ char *abrt_get_backtrace(struct dump_dir *dd, unsigned timeout_sec, const char * - unsigned bt_depth = 1024; - const char *thread_apply_all = "thread apply all -ascending"; - const char *full = "full "; -- g_autofree char *bt = NULL; -+ char *bt = NULL; - while (1) - { - args[bt_cmd_index] = g_strdup_printf("%s backtrace %s%u", thread_apply_all, full, bt_depth); -@@ -367,6 +367,7 @@ char *abrt_get_backtrace(struct dump_dir *dd, unsigned timeout_sec, const char * - /* (NB: in fact, current impl. of exec_vp() never returns NULL) */ - log_warning("Failed to generate backtrace, reducing depth to %u", - bt_depth); -+ free(bt); - - /* Replace -ex disassemble (which disasms entire function $pc points to) - * to a version which analyzes limited, small patch of code around $pc. --- -2.26.2 - diff --git a/0002-hooklib-Proper-freeing-of-backtrace.patch b/0002-hooklib-Proper-freeing-of-backtrace.patch deleted file mode 100644 index a9ded17..0000000 --- a/0002-hooklib-Proper-freeing-of-backtrace.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 5fa7b1f84fb02ca5dcf50d27f4bc14563c1918f6 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Mat=C4=9Bj=20Grabovsk=C3=BD?= -Date: Mon, 12 Oct 2020 19:14:03 +0200 -Subject: [PATCH] hooklib: Proper freeing of backtrace - -Improper bracing caused the bt variable to be freed every time in every -iteration no matter what. This would then lead to an invalid (freed) -pointer being returned by the function. - -The mistake was made in 1f2963b0 and reported by Jeff Law. ---- - src/lib/hooklib.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/src/lib/hooklib.c b/src/lib/hooklib.c -index 56b77bc3..fc2a6a00 100644 ---- a/src/lib/hooklib.c -+++ b/src/lib/hooklib.c -@@ -361,13 +361,17 @@ char *abrt_get_backtrace(struct dump_dir *dd, unsigned timeout_sec, const char * - - bt_depth /= 2; - if (bt) -+ { - log_warning("Backtrace is too big (%u bytes), reducing depth to %u", - (unsigned)strlen(bt), bt_depth); -+ } - else -+ { - /* (NB: in fact, current impl. of exec_vp() never returns NULL) */ - log_warning("Failed to generate backtrace, reducing depth to %u", - bt_depth); -- free(bt); -+ g_clear_pointer(&bt, free); -+ } - - /* Replace -ex disassemble (which disasms entire function $pc points to) - * to a version which analyzes limited, small patch of code around $pc. --- -2.26.2 - diff --git a/abrt.spec b/abrt.spec index 5591b28..86ed3be 100644 --- a/abrt.spec +++ b/abrt.spec @@ -49,7 +49,7 @@ Summary: Automatic bug detection and reporting tool Name: abrt Version: 2.14.6 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ URL: https://abrt.readthedocs.org/ Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz @@ -136,6 +136,8 @@ BuildRequires: python3-libreport BuildRequires: python3-devel %endif +Patch0: 0001-Use-lazy-imports-in-abrt_exception_handler3.patch + %description %{name} is a tool to help users to detect defects in applications and to create a bug report with all information needed by maintainer to fix it. @@ -1001,6 +1003,10 @@ killall abrt-dbus >/dev/null 2>&1 || : %config(noreplace) %{_sysconfdir}/profile.d/abrt-console-notification.sh %changelog +* Mon Sep 27 2021 Matěj Grabovský - 2.14.6-4 +- Use lazy import in the Python exception handler to avoid slowdown in Python + startup (rhbz#2007664) + * Tue May 25 2021 Michal Fabik - 2.14.6-1 - Add support of master + subkeys gpg. - hooks: Remove stale workaround for a fixed bug