Bug 1861393

Summary: Screen Sharing is not retaining a password setting (8.1)
Product: Red Hat Enterprise Linux 8 Reporter: Martin Krajnak <mkrajnak>
Component: gnome-control-centerAssignee: Carlos Garnacho <cgarnach>
Status: CLOSED DUPLICATE QA Contact: Desktop QE <desktop-qa-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.1CC: cgarnach, jkoten, tpelka, vbenes
Target Milestone: rcKeywords: ZStream
Target Release: 8.1   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1869177 1869178 1869179 (view as bug list) Environment:
Last Closed: 2020-08-17 08:07:03 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:
Bug Depends On:    
Bug Blocks: 1869177, 1869178, 1869179    
Attachments:
Description Flags
full back trace none

Description Martin Krajnak 2020-07-28 13:53:02 UTC
Created attachment 1702666 [details]
full back trace

Description of problem:
http://faf.lab.eng.brq.redhat.com/faf/reports/14148/

Version-Release number of selected component (if applicable):
gnome-remote-desktop-0.1.6-5.el8.x86_64
libvncserver-0.9.11-9.el8_1.3.x86_64

How reproducible:
always

Steps to Reproduce:
1.Open Control-center, enable screen sharing, set password
2.Open Vinagre, connect to localhost:0
3.Type password

Actual results:
gnome-remote-desktop Segmentation Fault

Expected results:
no segmenetation fault

Additional info:
Thread 1 (Thread 0x7effee45a300 (LWP 27207)):
#0  0x00005612575efa73 in check_rfb_password (rfb_client=0x56125915e140, response_encrypted=0x7ffcd9bb51b0 "\250(\324\036\361\302\235\231\360\022\362E\255C\023\233\002", len=16) at ../src/grd-session-vnc.c:488
        session_vnc = 0x56125915d870
        context = <optimized out>
        settings = <optimized out>
        password = 0x0
        error = 0x0
        challenge_encrypted = "\002\000\000\000\000\000\000\000\063\260n\354\377~\000"
#1  0x00007effed4bb2bb in rfbAuthProcessClientMessage (cl=0x56125915e140) at auth.c:471
        n = <optimized out>
        response = "\250(\324\036\361\302\235\231\360\022\362E\255C\023\233"
        authResult = 32511
#2  0x00007effed4b63b5 in rfbProcessClientMessage (cl=cl@entry=0x56125915e140) at rfbserver.c:654
No locals.
#3  0x00007effed4bcee0 in rfbCheckFds (rfbScreen=rfbScreen@entry=0x56125915d110, usec=0) at sockets.c:464
        nfds = <optimized out>
        fds = {__fds_bits = {1024, 0 <repeats 15 times>}}
        tv = {tv_sec = 0, tv_usec = 0}
        addr = {sin_family = 63736, sin_port = 60675, sin_addr = {s_addr = 32511}, sin_zero = "\240\243\026Y\022V\000"}
        addrlen = 16
        buf = "\377\377\000\000\000"
        i = <optimized out>
        cl = 0x56125915e140
        result = <optimized out>
#4  0x00007effed4b37db in rfbProcessEvents (screen=0x56125915d110, usec=<optimized out>, usec@entry=0) at main.c:1109
        i = <optimized out>
        cl = <optimized out>
        clPrev = <optimized out>
        result = 0 '\000'
#5  0x00005612575efb4b in vnc_socket_grab_func (session_vnc=0x56125915d870, error=<optimized out>) at ../src/grd-session-vnc.c:598
No locals.
#6  0x00005612575efe14 in handle_socket_data (socket=<optimized out>, condition=G_IO_IN, user_data=<optimized out>) at ../src/grd-session-vnc.c:633
        grab_func = <optimized out>
        error = 0x0
        session_vnc = 0x56125915d870
        session = 0x56125915d870
        __func__ = "handle_socket_data"
#7  0x00007effedc19c1d in socket_source_dispatch (source=0x5612591295d0, callback=0x5612575efda0 <handle_socket_data>, user_data=0x56125915d870) at gsocket.c:3843
        func = 0x5612575efda0 <handle_socket_data>
        socket_source = 0x5612591295d0
        socket = 0x56125913a3d0
        timeout = -1
        events = 1
        ret = <optimized out>
#8  0x00007effedf8c67d in g_main_dispatch (context=0x5612591293b0) at gmain.c:3176
        dispatch = 0x7effedc19bb0 <socket_source_dispatch>
        prev_source = 0x0
        was_in_call = 0
        user_data = 0x56125915d870
        callback = 0x5612575efda0 <handle_socket_data>
        cb_funcs = 0x7effee256280 <g_source_callback_funcs>
        cb_data = 0x561259133580
        need_destroy = <optimized out>
        source = 0x5612591295d0
        current = 0x5612591324c0
        i = 0
        current = <optimized out>
        i = <optimized out>
        __func__ = "g_main_dispatch"
        source = <optimized out>
        _g_boolean_var_ = <optimized out>
        was_in_call = <optimized out>
        user_data = <optimized out>
        callback = <optimized out>
        cb_funcs = <optimized out>
        cb_data = <optimized out>
        need_destroy = <optimized out>
        dispatch = <optimized out>
        prev_source = <optimized out>
        _g_boolean_var_ = <optimized out>
#9  g_main_context_dispatch (context=context@entry=0x5612591293b0) at gmain.c:3829
No locals.
#10 0x00007effedf8ca48 in g_main_context_iterate (context=context@entry=0x5612591293b0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3902
        max_priority = 2147483647
        timeout = -1
        some_ready = 1
        nfds = <optimized out>
        allocated_nfds = 3
        fds = 0x5612591576c0
#11 0x00007effedf8cae0 in g_main_context_iteration (context=context@entry=0x5612591293b0, may_block=may_block@entry=1) at gmain.c:3963
        retval = <optimized out>
#12 0x00007effedc4002d in g_application_run (application=application@entry=0x5612591280d0, argc=<optimized out>, argv=0x7ffcd9bb5828) at gapplication.c:2470
        arguments = 0x561259101400
        status = 0
        context = 0x5612591293b0
        acquired_context = 1
        __func__ = "g_application_run"
#13 0x00005612575e5a39 in main (argc=<optimized out>, argv=<optimized out>) at ../src/grd-daemon.c:317
        print_version = 0
        entries = {{long_name = 0x5612575f948d "version", short_name = 0 '\000', flags = 0, arg = G_OPTION_ARG_NONE, arg_data = 0x7ffcd9bb56a4, description = 0x5612575f9487 "Print version", arg_description = 0x0}, {long_name = 0x0, short_name = 0 '\000', flags = 0, arg = G_OPTION_ARG_NONE, arg_data = 0x0, description = 0x0, arg_description = 0x0}}
        context = 0x56125911ffb0
        app = 0x5612591280d0
        error = 0x0
                                       


Full stack trace from all threads will be attached.

Comment 1 Martin Krajnak 2020-07-28 13:55:44 UTC
also adding message from journal:

 Jul 28 13:54:31 qe-dell-ovs5-vm-45.dqe.lab.eng.bos.redhat.com systemd-coredump[28068]: Process 27949 (gnome-remote-de) of user 1000 dumped core.
                                                                                       
                                                                                       Stack trace of thread 27949:
                                                                                       #0  0x000055b99347ca73 check_rfb_password (gnome-remote-desktop-daemon)
                                                                                       #1  0x00007f46c04ff2bb rfbAuthProcessClientMessage (libvncserver.so.0)
                                                                                       #2  0x00007f46c04fa3b5 rfbProcessClientMessage (libvncserver.so.0)
                                                                                       #3  0x00007f46c0500ee0 rfbCheckFds (libvncserver.so.0)
                                                                                       #4  0x00007f46c04f77db rfbProcessEvents (libvncserver.so.0)
                                                                                       #5  0x000055b99347cb4b vnc_socket_grab_func (gnome-remote-desktop-daemon)
                                                                                       #6  0x000055b99347ce14 handle_socket_data (gnome-remote-desktop-daemon)
                                                                                       #7  0x00007f46c0c5dc1d socket_source_dispatch (libgio-2.0.so.0)
                                                                                       #8  0x00007f46c0fd067d g_main_dispatch (libglib-2.0.so.0)
                                                                                       #9  0x00007f46c0fd0a48 g_main_context_iterate (libglib-2.0.so.0)
                                                                                       #10 0x00007f46c0fd0ae0 g_main_context_iteration (libglib-2.0.so.0)
                                                                                       #11 0x00007f46c0c8402d g_application_run (libgio-2.0.so.0)
                                                                                       #12 0x000055b993472a39 main (gnome-remote-desktop-daemon)
                                                                                       #13 0x00007f46bf717873 __libc_start_main (libc.so.6)
                                                                                       #14 0x000055b993472b3e _start (gnome-remote-desktop-daemon)
                                                                                       
                                                                                       Stack trace of thread 27950:
                                                                                       #0  0x00007f46bf7e5211 __GI___poll (libc.so.6)
                                                                                       #1  0x00007f46c0fd09b6 g_main_context_poll (libglib-2.0.so.0)
                                                                                       #2  0x00007f46c0fd0ae0 g_main_context_iteration (libglib-2.0.so.0)
                                                                                       #3  0x00007f46c0fd0b31 glib_worker_main (libglib-2.0.so.0)
                                                                                       #4  0x00007f46c0ff8d9a g_thread_proxy (libglib-2.0.so.0)
                                                                                       #5  0x00007f46bf26b2de start_thread (libpthread.so.0)
                                                                                       #6  0x00007f46bf7f0133 __clone (libc.so.6)
                                                                                       
                                                                                       Stack trace of thread 27952:
                                                                                       #0  0x00007f46bf7e5211 __GI___poll (libc.so.6)
                                                                                       #1  0x00007f46c0fd09b6 g_main_context_poll (libglib-2.0.so.0)
                                                                                       #2  0x00007f46c0fd0d72 g_main_loop_run (libglib-2.0.so.0)
                                                                                       #3  0x00007f46c0cb13ba gdbus_shared_thread_func (libgio-2.0.so.0)
                                                                                       #4  0x00007f46c0ff8d9a g_thread_proxy (libglib-2.0.so.0)
                                                                                       #5  0x00007f46bf26b2de start_thread (libpthread.so.0)
                                                                                       #6  0x00007f46bf7f0133 __clone (libc.so.6)
                                                                                       
                                                                                       Stack trace of thread 27953:
                                                                                       #0  0x00007f46bf7e5211 __GI___poll (libc.so.6)
                                                                                       #1  0x00007f46c0fd09b6 g_main_context_poll (libglib-2.0.so.0)
                                                                                       #2  0x00007f46c0fd0ae0 g_main_context_iteration (libglib-2.0.so.0)
                                                                                       #3  0x00007f46ba53fe0d dconf_gdbus_worker_thread (libdconfsettings.so)
                                                                                       #4  0x00007f46c0ff8d9a g_thread_proxy (libglib-2.0.so.0)
                                                                                       #5  0x00007f46bf26b2de start_thread (libpthread.so.0)
                                                                                       #6  0x00007f46bf7f0133 __clone (libc.so.6)
                                                                                       
                                                                                       Stack trace of thread 28066:
                                                                                       #0  0x00007f46bf7ea99d syscall (libc.so.6)
                                                                                       #1  0x00007f46c1017b2e g_cond_wait_until (libglib-2.0.so.0)
                                                                                       #2  0x00007f46c0fa3031 g_async_queue_pop_intern_unlocked (libglib-2.0.so.0)
                                                                                       #3  0x00007f46c0ff98e2 g_thread_pool_wait_for_new_task (libglib-2.0.so.0)
                                                                                       #4  0x00007f46c0ff8d9a g_thread_proxy (libglib-2.0.so.0)
                                                                                       #5  0x00007f46bf26b2de start_thread (libpthread.so.0)
                                                                                       #6  0x00007f46bf7f0133 __clone (libc.so.6)

Comment 2 Martin Krajnak 2020-07-28 14:07:20 UTC
*** Bug 1763592 has been marked as a duplicate of this bug. ***

Comment 3 Martin Krajnak 2020-07-29 12:43:12 UTC
Also, this can be reproduced only on wayland, no problem with the x session. 
It also affects previous version of the package (libvncserver-0.9.11-9.el8_1.2.x86_64).

Comment 4 Jonas Ådahl 2020-08-03 12:36:39 UTC
This seems to be due to no password being available in the secret service. The fix I have won't make gnome-remote-desktop work, it'll just avoid crashing but still fail albeit more gracefully.

Comment 5 Jonas Ådahl 2020-08-03 12:38:20 UTC
rhel 8.0.0, 8.1.0 and 8.2.0 are effected by this, but 8.3.0 already contains the patch.

Comment 6 Martin Krajnak 2020-08-03 13:23:58 UTC
(In reply to Jonas Ådahl from comment #5)
> rhel 8.0.0, 8.1.0 and 8.2.0 are effected by this, but 8.3.0 already contains
> the patch.

Hi Jonas, I cannot reproduce the issue on 8.2, tested with:

libvncserver-0.9.11-15.el8_2.x86_64
pipewire-0.2.7-1.el8.x86_64
gnome-remote-desktop-0.1.6-8.el8.x86_64

Comment 7 Jonas Ådahl 2020-08-03 17:15:48 UTC
Maybe it's avoided by having the fix for https://bugzilla.redhat.com/show_bug.cgi?id=1684729 applied.

Comment 8 Tomas Pelka 2020-08-04 20:12:13 UTC
Hopefully this one could be closed as clone of https://bugzilla.redhat.com/show_bug.cgi?id=1866016

Comment 9 Martin Krajnak 2020-08-06 14:26:27 UTC
We did some digging with Jonas today and it is indeed an issue caused by an unset password, it was fixed in 8.2 in control-center -> https://bugzilla.redhat.com/show_bug.cgi?id=1763207

Comment 10 Martin Krajnak 2020-08-07 10:33:37 UTC
Hi Carlos, I would like to ask if it would be possible to backport fix that we landed in 8.2 (https://bugzilla.redhat.com/show_bug.cgi?id=1763207) to 8.1 as well.

Comment 11 Martin Krajnak 2020-08-10 14:43:43 UTC
The issue also affects 8.0, gnome-control-center-3.28.2-4.el8.x86_64

Comment 12 Carlos Garnacho 2020-08-13 17:25:42 UTC
I have the patch lined up, but seems I can't push yet, I guess I need zstream+?

Comment 15 Jiri Koten 2020-08-17 08:07:03 UTC

*** This bug has been marked as a duplicate of bug 1763207 ***