Bug 1408724 - Xvnc -inetd in wait mode loops when a client connect
Summary: Xvnc -inetd in wait mode loops when a client connect
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: tigervnc
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Grulich
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-26 18:00 UTC by Francis.Montagnac
Modified: 2017-01-12 05:24 UTC (History)
6 users (show)

Fixed In Version: tigervnc-1.7.0-6.fc25
Clone Of: 1293243
Environment:
Last Closed: 2017-01-12 05:24:36 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Francis.Montagnac 2016-12-26 18:00:44 UTC
+++ This bug was initially created as a clone of Bug #1293243 +++

Description of problem:

    Xvnc -inetd in wait mode loops when a client connect.

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

    tigervnc-server-minimal-1.7.0-5.fc25.x86_64

How reproducible: always

Steps to Reproduce:
    1. install the xinetd package
    2. install the attached vnc-test xinetd service in /etc/xinetd.d
    3. install the attached vnc-test-session in /tmp
       Note: the attachment is in the #1293243 bugzilla
    4. start xinetd
    5. executes: vncviewer localhost &
    6. you will see Xvnc loops

Actual results:

    The Xvnc loops.

Additional info:

This bug it not present in tigervnc-server-minimal-1.7.0-1.fc24.x86_64

Xvnc polls the file descriptor 2 that is opened to /dev/null

lsof -d 0-9 -a -p 12296
COMMAND   PID USER   FD   TYPE             DEVICE SIZE/OFF  NODE NAME
Xvnc    12296 root    0u  IPv6              87422      0t0   TCP localhost:rfb (LISTEN)
Xvnc    12296 root    1u  IPv6              87422      0t0   TCP localhost:rfb (LISTEN)
Xvnc    12296 root    2w   CHR                1,3      0t0  1028 /dev/null
Xvnc    12296 root    3u  IPv6              87422      0t0   TCP localhost:rfb (LISTEN)
Xvnc    12296 root    4u  unix 0xffff94d329f65c00      0t0 86489 @/tmp/.X11-unix/X2 type=STREAM
Xvnc    12296 root    5u  unix 0xffff94d329f67000      0t0 86490 /tmp/.X11-unix/X2 type=STREAM
Xvnc    12296 root    6u  unix 0xffff94d329f63000      0t0 86492 type=DGRAM

strace -s 100  -p 12296 |& head -10
strace: Process 12296 attached
epoll_wait(2, 0x7ffeeb9a6b20, 256, 542134) = -1 EINVAL (Invalid argument)
write(2, "WaitForSomething(): poll: Invalid argument\n", 43) = 43
epoll_wait(2, 0x7ffeeb9a6b20, 256, 542134) = -1 EINVAL (Invalid argument)
write(2, "WaitForSomething(): poll: Invalid argument\n", 43) = 43
epoll_wait(2, 0x7ffeeb9a6b20, 256, 542134) = -1 EINVAL (Invalid argument)
write(2, "WaitForSomething(): poll: Invalid argument\n", 43) = 43
epoll_wait(2, 0x7ffeeb9a6b20, 256, 542134) = -1 EINVAL (Invalid argument)
write(2, "WaitForSomething(): poll: Invalid argument\n", 43) = 43
epoll_wait(2, 0x7ffeeb9a6b20, 256, 542134) = -1 EINVAL (Invalid argument)

Comment 1 Francis.Montagnac 2016-12-27 18:41:55 UTC
This bug shows up also with tigervnc-server-minimal-1.7.0-3.fc25

Comment 2 Ian Pilcher 2017-01-05 03:36:13 UTC
I've managed to rebuild tigervnc-1.6.0-6.fc24.src.rpm for Fedora 25, and it appears to work.  In order to build from the older SRPM, I had to install xorg-x11-server-source-1.18.4-5.fc24.noarch (rather than the F25 package).

Comment 3 Ian Pilcher 2017-01-05 15:47:36 UTC
I just built 1.7.0 from git.  I followed the upstream directions and used xorg-x11-server-source-1.18.4-5.fc24.noarch.  Lo and behold, it works just fine.

So this appears to be related to the 1.19 compatibility patches (or to 1.19 itself).

Comment 4 Ian Pilcher 2017-01-05 16:01:02 UTC
In fact, simply installing xorg-x11-server-source-1.18.4-5.fc24.noarch on a Fedora 25 system and rebuilding tigervnc-1.7.0-5.fc25.src.rpm (with rpmbuild, not in mock) produces a working binary.

Comment 5 Jan Grulich 2017-01-06 06:16:18 UTC
Thanks for your investigation, to me it appears that this is broken either because of changes made to support XServer 1.19 or because of XServer 1.19 itself.

@Hans, any idea what could be the reason why this is broken with XServer 1.19?

Comment 6 Hans de Goede 2017-01-09 16:17:39 UTC
Hi,

(In reply to Jan Grulich from comment #5)
> Thanks for your investigation, to me it appears that this is broken either
> because of changes made to support XServer 1.19 or because of XServer 1.19
> itself.
> 
> @Hans, any idea what could be the reason why this is broken with XServer
> 1.19?

I had to debug things a bit, but I've found the culprit, this patch fixes this:

http://pkgs.fedoraproject.org/cgit/rpms/tigervnc.git/tree/0001-Fix-inetd-not-working-with-xserver-1.19.patch

I'm preparing an F25 update with the fix.

Regards,

Hans

Comment 7 Fedora Update System 2017-01-09 17:07:42 UTC
tigervnc-1.7.0-6.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-5758dfef76

Comment 8 Fedora Update System 2017-01-10 03:28:17 UTC
tigervnc-1.7.0-6.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-5758dfef76

Comment 9 Jan Grulich 2017-01-10 06:22:26 UTC
Thank you so much Hans for the fix.

Comment 10 Francis.Montagnac 2017-01-11 16:52:48 UTC
I confirm that it works also for me.

Thanks a lot.

Comment 11 Fedora Update System 2017-01-12 05:24:36 UTC
tigervnc-1.7.0-6.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.


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