Bug 497388 - xvnc startup is racy
Summary: xvnc startup is racy
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Anaconda Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F11AnacondaBlocker
TreeView+ depends on / blocked
 
Reported: 2009-04-23 16:53 UTC by Will Woods
Modified: 2009-04-28 22:25 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-04-28 22:25:52 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Will Woods 2009-04-23 16:53:33 UTC
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 19:07:13 UTC
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 22:25:52 UTC
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.