1

I'm using CentOS 7 and x11vnc version 0.9.13 (release 11.el7) for arch x86_64.

I create Xvfb with two screens (:10.0 and :10.1) like this:

sudo Xvfb :10 -screen 0 1366x768x24+32 -screen 1 1066x768x24+32 -br +bs -ac &

I launch one x11vnc for the first screen:

sudo x11vnc -display :10.0 -ncache 0 -rfbport 9999 -shared -forever -debug_ncache &

I can use a VNC server to use that screen: it works: I open a Firefox on it, for instance.

I kill that x11vnc and start another one, but for the second screen:

sudo x11vnc -display :10.1 -ncache 0 -rfbport 10000 -shared -forever -debug_ncache &

I can use a VNC server to use that screen: it works: I open a Chrome on it, for instance.

Now, I kill x11vnc again, and then I start both servers, starting by the first screen and then the second:

sudo x11vnc -display :10.0 -ncache 0 -rfbport 9999 -shared -forever -debug_ncache &
sudo x11vnc -display :10.1 -ncache 0 -rfbport 10000 -shared -forever -debug_ncache &

I can use a VNC server to use the first screen: it works and I see the Firefox window.
BUT, trying to connect to the second VNC, brings a crash with the following trace:

*** buffer overflow detected ***: x11vnc terminated
======= Backtrace: =========
/lib64/libc.so.6(__fortify_fail+0x37)[0x7fd434365597]
/lib64/libc.so.6(+0x10c750)[0x7fd434363750]
/lib64/libc.so.6(+0x10e507)[0x7fd434365507]
/lib64/libvncserver.so.0(rfbProcessNewConnection+0x114)[0x7fd436d01764]
/lib64/libvncserver.so.0(rfbCheckFds+0x3f8)[0x7fd436d01c98]
/lib64/libvncserver.so.0(rfbProcessEvents+0x1d)[0x7fd436cf8c3d]
x11vnc[0x4a0951]
x11vnc[0x463d8a]
x11vnc[0x410c0a]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7fd434278b15]
x11vnc[0x41b201]
======= Memory map: ========
00400000-00542000 r-xp 00000000 fd:00 14735                              /usr/bin/x11vnc
00741000-00742000 r--p 00141000 fd:00 14735                              /usr/bin/x11vnc
00742000-00788000 rw-p 00142000 fd:00 14735                              /usr/bin/x11vnc
00788000-00ad0000 rw-p 00000000 00:00 0                                  [heap]
7fd42f627000-7fd42f63c000 r-xp 00000000 fd:00 38                         /usr/lib64/libgcc_s-4.8.5-20150702.so.1
7fd42f63c000-7fd42f83b000 ---p 00015000 fd:00 38                         /usr/lib64/libgcc_s-4.8.5-20150702.so.1
7fd42f83b000-7fd42f83c000 r--p 00014000 fd:00 38                         /usr/lib64/libgcc_s-4.8.5-20150702.so.1
7fd42f83c000-7fd42f83d000 rw-p 00015000 fd:00 38                         /usr/lib64/libgcc_s-4.8.5-20150702.so.1
7fd42f83d000-7fd42f868000 rw-s 00000000 00:04 913866832                  /SYSV00000000 (deleted)
7fd42f868000-7fd42f892000 rw-s 00000000 00:04 913834063                  /SYSV00000000 (deleted)
7fd42f892000-7fd42f8bb000 rw-s 00000000 00:04 913801294                  /SYSV00000000 (deleted)
7fd42f8bb000-7fd42f8e3000 rw-s 00000000 00:04 913768525                  /SYSV00000000 (deleted)
7fd42f8e3000-7fd42f90a000 rw-s 00000000 00:04 913735756                  /SYSV00000000 (deleted)
7fd42f90a000-7fd42f930000 rw-s 00000000 00:04 913702987                  /SYSV00000000 (deleted)
7fd42f930000-7fd42f955000 rw-s 00000000 00:04 913670218                  /SYSV00000000 (deleted)
7fd42f955000-7fd42f979000 rw-s 00000000 00:04 913637449                  /SYSV00000000 (deleted)
7fd42f979000-7fd42f99c000 rw-s 00000000 00:04 913604680                  /SYSV00000000 (deleted)
7fd42f99c000-7fd42f9be000 rw-s 00000000 00:04 913571911                  /SYSV00000000 (deleted)
7fd42f9be000-7fd42f9df000 rw-s 00000000 00:04 913539142                  /SYSV00000000 (deleted)
7fd42f9df000-7fd42f9ff000 rw-s 00000000 00:04 913506373                  /SYSV00000000 (deleted)
7fd42f9ff000-7fd42fa1e000 rw-s 00000000 00:04 913473604                  /SYSV00000000 (deleted)
7fd42fa1e000-7fd42fe1f000 rw-p 00000000 00:00 0
7fd42fe1f000-7fd430220000 rw-s 00000000 00:04 912457765                  /SYSV00000000 (deleted)
7fd430220000-7fd430244000 r-xp 00000000 fd:00 4260                       /usr/lib64/liblzma.so.5.0.99
7fd430244000-7fd430443000 ---p 00024000 fd:00 4260                       /usr/lib64/liblzma.so.5.0.99
7fd430443000-7fd430444000 r--p 00023000 fd:00 4260                       /usr/lib64/liblzma.so.5.0.99
7fd430444000-7fd430445000 rw-p 00024000 fd:00 4260                       /usr/lib64/liblzma.so.5.0.99
7fd430445000-7fd4304a5000 r-xp 00000000 fd:00 4288                       /usr/lib64/libpcre.so.1.2.0
7fd4304a5000-7fd4306a4000 ---p 00060000 fd:00 4288                       /usr/lib64/libpcre.so.1.2.0
7fd4306a4000-7fd4306a5000 r--p 0005f000 fd:00 4288                       /usr/lib64/libpcre.so.1.2.0
7fd4306a5000-7fd4306a6000 rw-p 00060000 fd:00 4288                       /usr/lib64/libpcre.so.1.2.0
7fd4306a6000-7fd4306c7000 r-xp 00000000 fd:00 4383                       /usr/lib64/libselinux.so.1
7fd4306c7000-7fd4308c7000 ---p 00021000 fd:00 4383                       /usr/lib64/libselinux.so.1
7fd4308c7000-7fd4308c8000 r--p 00021000 fd:00 4383                       /usr/lib64/libselinux.so.1
7fd4308c8000-7fd4308c9000 rw-p 00022000 fd:00 4383                       /usr/lib64/libselinux.so.1
7fd4308c9000-7fd4308cb000 rw-p 00000000 00:00 0
7fd4308cb000-7fd4308d2000 r-xp 00000000 fd:00 4597                       /usr/lib64/libffi.so.6.0.1
7fd4308d2000-7fd430ad1000 ---p 00007000 fd:00 4597                       /usr/lib64/libffi.so.6.0.1
7fd430ad1000-7fd430ad2000 r--p 00006000 fd:00 4597                       /usr/lib64/libffi.so.6.0.1
7fd430ad2000-7fd430ad3000 rw-p 00007000 fd:00 4597                       /usr/lib64/libffi.so.6.0.1
7fd430ad3000-7fd430ada000 r-xp 00000000 fd:00 11023                      /usr/lib64/librt-2.17.so
7fd430ada000-7fd430cd9000 ---p 00007000 fd:00 11023                      /usr/lib64/librt-2.17.so
7fd430cd9000-7fd430cda000 r--p 00006000 fd:00 11023                      /usr/lib64/librt-2.17.so
7fd430cda000-7fd430cdb000 rw-p 00007000 fd:00 11023                      /usr/lib64/librt-2.17.so
7fd430cdb000-7fd430cdd000 r-xp 00000000 fd:00 13338                      /usr/lib64/libXau.so.6.0.0
7fd430cdd000-7fd430edd000 ---p 00002000 fd:00 13338                      /usr/lib64/libXau.so.6.0.0
7fd430edd000-7fd430ede000 r--p 00002000 fd:00 13338                      /usr/lib64/libXau.so.6.0.0
7fd430ede000-7fd430edf000 rw-p 00003000 fd:00 13338                      /usr/lib64/libXau.so.6.0.0
7fd430edf000-7fd430ee2000 r-xp 00000000 fd:00 4978                       /usr/lib64/libkeyutils.so.1.5
7fd430ee2000-7fd4310e1000 ---p 00003000 fd:00 4978                       /usr/lib64/libkeyutils.so.1.5
7fd4310e1000-7fd4310e2000 r--p 00002000 fd:00 4978                       /usr/lib64/libkeyutils.so.1.5
7fd4310e2000-7fd4310e3000 rw-p 00003000 fd:00 4978                       /usr/lib64/libkeyutils.so.1.5
7fd4310e3000-7fd4310f0000 r-xp 00000000 fd:00 5356                       /usr/lib64/libkrb5support.so.0.1
7fd4310f0000-7fd4312f0000 ---p 0000d000 fd:00 5356                       /usr/lib64/libkrb5support.so.0.1
7fd4312f0000-7fd4312f1000 r--p 0000d000 fd:00 5356                       /usr/lib64/libkrb5support.so.0.1
7fd4312f1000-7fd4312f2000 rw-p 0000e000 fd:00 5356                       /usr/lib64/libkrb5support.so.0.1
7fd4312f2000-7fd431368000 r-xp 00000000 fd:00 4770                       /usr/lib64/libgmp.so.10.2.0
7fd431368000-7fd431567000 ---p 00076000 fd:00 4770                       /usr/lib64/libgmp.so.10.2.0caught signal: 6
11/10/2016 17:24:00 deleted 43 tile_row polling images.

Now, let's start x11vnc servers in reverse order: the second screen first and then the first screen:

sudo x11vnc -display :10.1 -ncache 0 -rfbport 10000 -shared -forever -debug_ncache &
sudo x11vnc -display :10.0 -ncache 0 -rfbport 9999 -shared -forever -debug_ncache &

When I try to use VNC to reach the screen :10.1 (the second screen, but the first x11vnc launched), it works: I see the Chrome window.
BUT, trying to connect to the screen :10.0 (last x11vnc launched), x11vnc crashes with the same trace as above (the first x11vnc server is still intact, running well).

Note: I used RealVNC and TightVNC on Windows as clients.
They both crash the second server.

Note 2: running two separate Xvfb on displays :10 and :11 with only one screen (0) each, and pointing the two x11vnc servers to :10 and :11 leads to the same crash.

Note 3: I ran both Xvfb and x11vnc as root. Running them as regular users also leads to the same crash.

What did I wrong?
Is there a way to start only one x11vnc server with two ports for both X11 screens?
Is it a bug from x11vnc?

migrated from serverfault.com Oct 15 '16 at 1:40

This question came from our site for system and network administrators.

1

It seems the the libvncserver version installed on my system is buggy.
But it is the very latest version.

x11vnc can be compiled to use its own libvncserver.
I read the sources of the libvncserver from x11vnc: they do not contain the method that causes the crash.
So I think if I installed gcc, all -devel libraries, recompile x11vnc, install it, etc. it would work.
Probably.

Instead, I used another solution:
Xvnc can do both an in-memory X-server and a VNC-server at the same time.
And it does not crash.
So I'm using this configuration now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.