Bug 914958

Summary: Xvnc/KDM/XDMCP broken - X_ShmAttach BadAccess
Product: [Fedora] Fedora Reporter: Ian Pilcher <ipilcher>
Component: tigervncAssignee: Adam Tkac <atkac>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: atkac, bphinz, ovasik
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-23 18:08:45 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 Ian Pilcher 2013-02-23 17:34:55 UTC
Description of problem:
Not sure where the real problem is, so filing this against tigervnc for now.  Some recent update appears to have broken the combination of Xvnc and KDM (via XDMCP).

When I connect, the vncviewer window briefly appears showing the KDM background.  Then it closes and the client says "End of stream".

On the server, syslog contains:

  kdm: localhost:10[28945]: Abnormal termination of greeter for display localhost:10, code 1, signal 0

kdm.log contains:

  X Error of failed request:  BadAccess (attempt to access private resource denied)
    Major opcode of failed request:  130 (MIT-SHM)
    Minor opcode of failed request:  1 (X_ShmAttach)
    Serial number of failed request:  348
    Current serial number in output stream:  349

I am using a systemd socket to start Xvnc on demand.  xvnc.socket contains:

  [Unit]
  Description=Socket for Xvnc display :10

  [Socket]
  ListenStream=172.31.250.1:5910
  Accept=true
  MaxConnections=1
  KeepAlive=true
  FreeBind=true

  [Install]
  WantedBy=sockets.target

And xvnc@.service contains:

  [Unit]
  Description=VNC remote display :10

  [Service]
  Type=simple
  User=nobody
  ExecStart=-/usr/bin/Xvnc -SecurityTypes None -query 127.0.0.1 -inetd -once :10
  StandardInput=socket

Version-Release number of selected component (if applicable):
kdm-4.9.5-7.fc18.x86_64
tigervnc-server-minimal-1.2.80-0.8.20130124svn5036.fc18.x86_64


How reproducible:
100%

Steps to Reproduce:
1.  Configure KDM to accept XDMCP requests from localhost.
2.  Configure Xvnc as above.
3.  Connect.

Comment 1 Ian Pilcher 2013-02-23 18:08:45 UTC
Turns out it works if I run Xvnc as root (by removing the "User=nobody" line from xvnc@.service).  Disabling the MIT-SHM extension (by adding "-extension MIT-SHM" to the ExecStart line also works).

I'm going to close this, but it would be interesting to know if this is the expected behavior.  After all, it was working with configuration previously.