Bug 2000998

Summary: Anaconda crashing while fetching profiles.
Product: Red Hat Enterprise Linux 8 Reporter: Achilleas Yfantis <ayfantis>
Component: oscap-anaconda-addonAssignee: Matěj Týč <matyc>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: low Docs Contact:
Priority: unspecified    
Version: 8.5CC: jcerny, jkonecny, jonespl42, jstodola, matyc, mhaicman, vslavik, wsato
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: oscap-anaconda-addon-1.2.1-9.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 2127502 (view as bug list) Environment:
Last Closed: 2023-05-16 08:36:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Achilleas Yfantis 2021-09-03 13:59:35 UTC
Description of problem:
Installation crashes when trying to fetch security policy from a server, while the server address is wrong or if it takes too long to fetch and you press the fetch button too many times, it can be achieved by either clicking too fast or by keeping the enter button pressed.
The url has to be valid, meaning http://xxx.xxx.xxx.xxx/<whatever_imaginery_file>
otherwise it will be rejected as invalid and nothing will happen, we need to enforce it to start looking for the url.

Version-Release number of selected component (if applicable):
It's applicable to every version that uses anaconda and can fetch policies from web server.

How reproducible:
Every time.

Steps to Reproduce:
1. Start installing the VM.
2. Try to fetch profile from remote server.
3. Press fetch fast enough 2-3 times or keep the enter pressed.

Actual results:
It looks likes it's trying to start multiple threads and since they all have the same name anaconda crashes.

Comment 1 Matěj Týč 2021-09-03 14:21:46 UTC
This is interesting, as in https://github.com/OpenSCAP/oscap-anaconda-addon/blob/rhel8-branch/org_fedora_oscap/gui/spokes/oscap.py#L370 the _fetch_flag_lock and _fetching property indicate that this shouldn't happen. However, it apparently can happens.
As it is not easy to reproduce the issue, it's probably some nasty corner case.

Comment 3 Matěj Týč 2022-01-21 13:12:05 UTC
Moving the BZ to Anaconda, as it looks like that the issue is caused by the thread manager.

The manager doesn't remove the thread explicitly when called with wait(), and it takes time for the thread to remove itself from the manager.

Comment 7 Jan Stodola 2022-09-16 15:18:20 UTC
The same problem exists on RHEL-9 as well, reported as bug 2127502.

Comment 10 Jan Černý 2022-10-17 11:52:54 UTC
A fix has been merged into upstream in https://github.com/OpenSCAP/oscap-anaconda-addon/pull/221

Comment 13 Jan Stodola 2022-11-25 17:17:09 UTC
Verified with oscap-anaconda-addon-1.2.1-9.el8, the problem is no longer reproducible.

Marking as Verified:Tested.

Comment 16 Jan Stodola 2022-12-05 12:10:46 UTC
Checked that oscap-anaconda-addon-1.2.1-10.el8 is in nightly compose RHEL-8.8.0-20221204.2

Moving to VERIFIED

Comment 19 errata-xmlrpc 2023-05-16 08:36:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (oscap-anaconda-addon bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:2828