#1014873 tigervnc-scraping-server: X0tigervnc server died with signal 6! / Assertion `!xcb_xlib_threads_sequence_lost' failed.

Package:
libx11-6
Source:
libx11-6
Description:
X11 client-side library
Submitter:
Bernhard Übelacker
Date:
2024-11-01 14:33:01 UTC
Severity:
normal
#1014873#5
Date:
2022-07-13 15:08:43 UTC
From:
To:

Dear Maintainer,
I observe following aborts [1] of a X0tigervnc attaching to a running
X-server showing a KDE/Plasma session at a Bookworm/testing system.
To this VNC server I connect with xtigervncviewer from Bullseye/stable.
In the logfile appears the assertion [2], at the backtrace [3].

Previous visits in this function normally have
variable req containing a proper pointer, but at the failing
visit it contains NULL.

There exists a tigervnc upstream bug [4], where it is believed
this might be an issue in libx11-6 or libxcb1.

It somehow might be related to a libx11-6 upstream merge request [5],
which did fix a similar "xcb_xlib_threads_sequence_lost" issue for
the remote-viewer application.

Unfortunately I miss the knowledge how this parts should operate.
I can reproduce it quite reliable, also while recording with rr-debugger.

Any hints how to debug this further, where it starts to go wrong?

Kind regards,
Bernhard









[1]
     $ DISPLAY=:0 x0tigervncserver -rfbport 5910 -fg -verbose
     Starting /usr/bin/X0tigervnc -localhost=1 -desktop rechner:0 (bernhard) -rfbport 5910 -PasswordFile /home/bernhard/.vnc/passwd -SecurityTypes VncAuth

     New X0tigervnc server 'rechner:0 (bernhard)' on port 5910 for display :0.
     Use xtigervncviewer -SecurityTypes VncAuth -passwd /home/bernhard/.vnc/passwd :10 to connect to the VNC server.

     The X0tigervnc server died with signal 6!
     $



[2]
     $ cat .vnc/rechner\:5910.log
     ...
     [xcb] Unknown sequence number while processing queue
     [xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
     [xcb] Aborting, sorry about that.
     X0tigervnc: ../../src/xcb_io.c:278: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.
     $



[3]
     (rr) reverse-finish
     Run back to call of #0  0x00007f8a5365821d in __GI___assert_fail (assertion=assertion@entry=0x7f8a53ce1aa0 "!xcb_xlib_threads_sequence_lost", file=file@entry=0x7f8a53ce18d3 "../../src/xcb_io.c", line=line@entry=278, function=function@entry=0x7f8a53ce1d68 <__PRETTY_FUNCTION__.7> "poll_for_event") at assert.c:101
     0x00007f8a53c6ca2f in poll_for_event (dpy=dpy@entry=0x555d222ac400, queued_only=0) at ../../src/xcb_io.c:278
     278                                     throw_thread_fail_assert("Unknown sequence "
     1: /x event_sequence = 0xfff6
     2: /x request = 0x557a
     3: req = (PendingRequest *) 0x0
     (rr) bt
     #0  0x00007f8a53c6ca2f in poll_for_event (dpy=dpy@entry=0x555d222ac400, queued_only=0) at ../../src/xcb_io.c:278
     #1  0x00007f8a53c6cae8 in poll_for_response (dpy=dpy@entry=0x555d222ac400) at ../../src/xcb_io.c:310
     #2  0x00007f8a53c6ceb2 in _XEventsQueued (mode=2, dpy=0x555d222ac400) at ../../src/xcb_io.c:441
     #3  _XEventsQueued (dpy=dpy@entry=0x555d222ac400, mode=mode@entry=2) at ../../src/xcb_io.c:423
     #4  0x00007f8a53c5e641 in XPending (dpy=0x555d222ac400) at ../../src/Pending.c:55
     #5  0x0000555d21b515a8 in TXWindow::handleXEvents (dpy=dpy@entry=0x555d222ac400) at ./unix/tx/TXWindow.cxx:104
     #6  0x0000555d21b44e48 in main (argc=<optimized out>, argv=<optimized out>) at ./unix/x0vncserver/x0vncserver.cxx:337
     (rr) list 272,282
     272                     if(!req || XLIB_SEQUENCE_COMPARE(event_sequence, <, req->sequence)
     273                             || (event->response_type != X_Error && event_sequence == req->sequence))
     274                     {
     275                             uint64_t request = X_DPY_GET_REQUEST(dpy);
     276                             if (XLIB_SEQUENCE_COMPARE(event_sequence, >, request))
     277                             {
     278                                     throw_thread_fail_assert("Unknown sequence "
     279                                                              "number while "
     280                                                              "processing queue",
     281                                                     xcb_xlib_threads_sequence_lost);
     282                             }
     (rr) info thread
     Id   Target Id                         Frame
     * 1    Thread 275172.275172 (X0tigervnc) 0x00007f8a53c6ca2f in poll_for_event (dpy=dpy@entry=0x555d222ac400, queued_only=0) at ../../src/xcb_io.c:278


[4]
https://github.com/TigerVNC/tigervnc/issues/869



[5]
https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/53
https://bugzilla.redhat.com/show_bug.cgi?id=1758384

#1014873#10
Date:
2022-07-31 16:12:07 UTC
From:
To:
Dear Maintainer,
I brought this issue up into the libx11 upstream bug tracker:
https://gitlab.freedesktop.org/xorg/lib/libx11/-/issues/161

Kind regards,
Bernhard