Bug 497388 - xvnc startup is racy
xvnc startup is racy
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Anaconda Maintenance Team
Fedora Extras Quality Assurance
:
Depends On:
Blocks: F11AnacondaBlocker
  Show dependency treegraph
 
Reported: 2009-04-23 12:53 EDT by Will Woods
Modified: 2009-04-28 18:25 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-04-28 18:25:52 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Will Woods 2009-04-23 12:53:33 EDT
I've encountered a couple of problems with vnc startup:

1) More common: when starting with 'vnc vncpassword=password', messages like these appear.

12:13:37 The VNC Server is now running.
vncconfig: unable to open display ":1"
vncconfig: unable to open display ":1"
vncconfig: unable to open display ":1"
vncconfig: unable to open display ":1"


2) Less common: While starting VNC from the text dialog (after X fails and falls back to text mode), I choose to use a password. I type the password quickly and hit OK, and anaconda exits abnormally with the following traceback:

11:24:31 The VNC Server is now running.
Traceback (most recent call last):
  File "/usr/bin/anaconda", line 870, in <module>
    runVNC()
  File "/usr/bin/anaconda", line 254, in runVNC
    vncS.startServer()

I suspect this code chunk from startServer(): 

        # Lets give the xvnc time to initialize
        time.sleep(1)

        # Make sure it hasn't blown up
        if xvncp.poll() != None:
            sys.exit(1)
        ..
        self.setVNCPassword()

In the common case, I'm not positive that time.sleep(1) is enough to ensure that xvnc is actually ready for vncconfig to connect to it.

As for the latter case, I don't know why xvncp.poll() would return non-None without there being any log messages etc. Maybe poll() isn't working as expected? It would be helpful if an error was raised or a message logged, rather then immediately exiting.
Comment 1 Will Woods 2009-04-27 15:07:13 EDT
These turn out to be two different problems. The second case was caused by a misbehaving handler for SIGCHLD which made anaconda exit when a subprocess (like vncpassword) finished. A patch has been submitted for review - so #2 should be fixed.

The first problem still needs investigation.
Comment 2 Will Woods 2009-04-28 18:25:52 EDT
Well, I can't reproduce the first problem anymore. I've asked a couple other people to try, and 'vncpassword=XXX' seems to work fine in anaconda-11.5.0.47 for everyone who's tried it.

Note You need to log in before you can comment on or make changes to this bug.