Bug 1918702

Summary: There's a logic bug here In function startX at pyanaconda/core/util.py
Product: Red Hat Enterprise Linux 8 Reporter: liuxin <bit_coffee>
Component: anacondaAssignee: Vladimír Slávik <vslavik>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.3CC: jstodola, rvykydal, sbarcomb, sbueno, vslavik, zveleba
Target Milestone: rcKeywords: Triaged
Target Release: 8.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: anaconda-33.16.5.1-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1955306 (view as bug list) Environment:
Last Closed: 2021-11-09 18:42:11 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:
Attachments:
Description Flags
Logs from 33.16.5.2-1.el8 none

Description liuxin 2021-01-21 12:20:41 UTC
Description of problem:
There's a logic bug here In function startX at pyanaconda/core/util.py
    the program triggers a timeout and executes sigalrm_handler When the Xorg service starts too slowly and exceeds the timeout time, which executes the raise exiterror causing the finally block to be executed.
    The finally block will cancel processing of the SIGUSER1 signal, which will cause the signuser1 sent to Anaconda after the Xorg service is started to fail to process and the program will die


Version-Release number of selected component (if applicable):
anaconda 33.17

How reproducible:
In the function startX add code `time.sleep(0.5)` after the code `signal.alarm(timeout)` and add boot options: inst.xtimeout=1

Steps to Reproduce:
1. add code `time.sleep(0.5)` after the code `signal.alarm(timeout)` in function startX
2.make a new setup iso
3.add boot options: inst.xtimeout=1

Actual results:
X startup failed, falling back to text mode
Pane is dead(signal 10, date)

Expected results:
X startup failed, falling back to text mode
no other failed and i can setup os through text mode

Additional info:
NA

Comment 1 Vladimír Slávik 2021-01-21 15:06:18 UTC
PR submitted by author to fix the issue - thank you! https://github.com/rhinstaller/anaconda/pull/3107

Comment 2 Jan Stodola 2021-03-17 14:54:46 UTC
New PR URL: https://github.com/rhinstaller/anaconda/pull/3141

Comment 3 Vladimír Slávik 2021-04-16 13:51:57 UTC
See https://github.com/rhinstaller/anaconda/pull/3295 which links most of the related developments since last time posted here.

Comment 6 Vladimír Slávik 2021-05-06 18:11:59 UTC
Last developments in https://github.com/rhinstaller/anaconda/pull/3304

Comment 7 Vladimír Slávik 2021-05-07 12:43:57 UTC
PR merged.

Comment 8 Vladimír Slávik 2021-05-12 13:35:14 UTC
Looks like this bug was from the beginning for RHEL 8, although I treated it as for Rawhide. Sorry. That means all links above are upstream only. But from now on, let's keep it for RHEL 8.

Comment 9 Vladimír Slávik 2021-05-12 14:28:59 UTC
https://github.com/rhinstaller/anaconda/pull/3365

Comment 10 Vladimír Slávik 2021-05-13 16:04:44 UTC
PR merged.

Comment 11 Zdenek Veleba 2021-06-03 15:41:27 UTC
Tested with anaconda 33.16.5.2-1.el8

If network is enabled, ip=dhcp on kernel cmdline, it works as expected.
Anaconda informs that X did not start and offers to continue installation via VNC or text mode.

If network is not enabled, anaconda throws exception and user cannot continue with the installation.
See attached logs.

Comment 12 Zdenek Veleba 2021-06-03 15:42:31 UTC
Created attachment 1788865 [details]
Logs from 33.16.5.2-1.el8

Comment 15 Zdenek Veleba 2021-06-08 11:54:39 UTC
After discussion and more testing we found that the reproduction steps were causing unrelated issue.

Pre-verified - anaconda 33.16.5.2-1.el8 in RHEL-8.5.0-20210524.t.19

Comment 19 Jan Stodola 2021-06-23 17:22:16 UTC
anaconda-33.16.5.1-1.el8 is present in compose RHEL-8.5.0-20210622.n.0, moving to VERIFIED.

Comment 21 errata-xmlrpc 2021-11-09 18:42:11 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 (anaconda 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-2021:4254