Switch back to running dnf in a subprocess (#1614511)

This commit is contained in:
Adam Williamson 2018-08-10 10:43:35 -07:00
parent 1d80cfe722
commit 5873518367
2 changed files with 61 additions and 1 deletions

51
1571.patch Normal file
View File

@ -0,0 +1,51 @@
From dedeb70b021f1a02461167ce1d520dfb0df6d911 Mon Sep 17 00:00:00 2001
From: Martin Kolman <mkolman@redhat.com>
Date: Fri, 10 Aug 2018 15:05:47 +0200
Subject: [PATCH] Revert back to running DNF in a subprocess
When working on the modula installation support via the install_specs()
API we hit a weird issue with DNF crashing on a "foregin key error"
when accessing one of its sqlite databases.
When looking into it with the DNF developers we found out the issue
goes away when we just run the DNF transaction in a dummy process
instead of a real one. That seemed to work fine and there were no
apparent regressions at that time so we went with the workaround.
Looks like we might have been wrong - bug 1614511 strongly hints
on chroot being used by rpm od DNF during package installation trasaction
is causing GTK to crash by basically swapping the root filesystem under
it.
A similar issue back with yum was the main reason for isolating
the yum payload into a separate process. So switch back to the previous
behavior where the DNF trasaction runs in a separate sub-process to
shield the main Anaconda process from rpm/DNF chroot shenanigans.
Resolves: rhbz#1614511
Related: rhbz#1613296
---
pyanaconda/payload/dnfpayload.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/pyanaconda/payload/dnfpayload.py b/pyanaconda/payload/dnfpayload.py
index 3e166389b9..61ab753107 100644
--- a/pyanaconda/payload/dnfpayload.py
+++ b/pyanaconda/payload/dnfpayload.py
@@ -37,7 +37,6 @@
import collections
import itertools
import multiprocessing
-import multiprocessing.dummy
import operator
import hashlib
import shutil
@@ -1020,7 +1019,7 @@ def install(self):
progress_message(pre_msg)
queue_instance = multiprocessing.Queue()
- process = multiprocessing.dummy.Process(target=do_transaction,
+ process = multiprocessing.Process(target=do_transaction,
args=(self._base, queue_instance))
process.start()
(token, msg) = queue_instance.get()

View File

@ -7,7 +7,7 @@
Summary: Graphical system installer
Name: anaconda
Version: 29.23
Release: 2%{?dist}
Release: 3%{?dist}
License: GPLv2+ and MIT
Group: Applications/System
URL: http://fedoraproject.org/wiki/Anaconda
@ -18,6 +18,11 @@ URL: http://fedoraproject.org/wiki/Anaconda
# ./autogen.sh
# make dist
Source0: %{name}-%{version}.tar.bz2
# Reverts to running dnf in a subprocess (not a thread). Requires
# libdnf-0.17.0-2.fc29 or higher. Fixes
# https://bugzilla.redhat.com/show_bug.cgi?id=1614511
# https://github.com/rhinstaller/anaconda/pull/1571
Patch0: 1571.patch
# Versions of required components (done so we make sure the buildrequires
# match the requires versions of things).
@ -250,6 +255,7 @@ runtime on NFS/HTTP/FTP servers or local disks.
%prep
%setup -q
%patch0 -p1
%build
# use actual build-time release number, not tarball creation time release number
@ -347,6 +353,9 @@ update-desktop-database &> /dev/null || :
%{_prefix}/libexec/anaconda/dd_*
%changelog
* Fri Aug 10 2018 Adam Williamson <awilliam@redhat.com> - 29.23-3
- Switch back to running dnf in a subprocess (#1614511)
* Tue Aug 07 2018 Martin Kolman <mkolman@redhat.com> - 29.23-2
- Fix a typo