Bug 492402
Summary: | nxserver doesn't detect stale X11 displays (port in use without lock file) | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Nils Philippsen <nphilipp> | ||||
Component: | freenx-server | Assignee: | Axel Thimm <axel.thimm> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | low | ||||||
Version: | 10 | CC: | gwync, helge.deller, linux | ||||
Target Milestone: | --- | Keywords: | Patch | ||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | 0.7.3-15.fc10 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2009-08-10 21:40:20 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Thanks for the patch! freenx-server-0.7.3-14.fc10 has been submitted as an update for Fedora 10. http://admin.fedoraproject.org/updates/freenx-server-0.7.3-14.fc10 freenx-server-0.7.3-14.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/freenx-server-0.7.3-14.fc11 freenx-server-0.7.3-14.fc10 has been pushed to the Fedora 10 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update freenx-server'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-8023 freenx-server-0.7.3-14.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update freenx-server'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-8022 freenx-server-0.7.3-15.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update freenx-server'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-8022 freenx-server-0.7.3-15.fc10 has been pushed to the Fedora 10 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update freenx-server'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-8023 freenx-server-0.7.3-15.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report. freenx-server-0.7.3-15.fc10 has been pushed to the Fedora 10 stable repository. If problems still persist, please make note of it in this bug report. |
Created attachment 336856 [details] freenx-0.7.3-stale-x11-display.patch Description of problem: If there are processes having X11 displays in use, the nxserver script seems to use broken arithmetic to determine the port number, e.g. instead of port 6010 for display :10 it checks port 8010 (which isn't in use). Later on, allocating the X11 display a second time won't work and logging in fails. Version-Release number of selected component (if applicable): freenx-server-0.7.3-11.fc10.i386 The problematic part is in the nxserver script, around line 1439: ... # Check if there is already an agent running on that display on that host let AGENT_DISPLAY=$SESS_DISPLAY+6000 if $COMMAND_NETCAT -z "$SERVER_HOST" $AGENT_DISPLAY 2>/dev/null then log 2 "Warning: Stray nxagent without .nX$SESS_DISPLAY-lock found on host:port $SERVER_HOST:$AGENT_DISPLAY." let SESS_DISPLAY=$SESS_DISPLAY+1 continue fi ... As $SESS_DISPLAY is $DISPLAY_BASE plus the offset (e.g. 10 for display :10), it needs to be substracted again to calculate the X11 display TCP port ($AGENT_DISPLAY). It could be that I interpret these lines wrongly (i.e. they aren't about the X11 display TCP port), then a check for that port would need to be added to the script. The following patch assumes that I'm right of course ;-).