Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] gnome-remote-desktop crash error 4 in libvncserver
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
soparla
n00b
n00b


Joined: 21 Aug 2018
Posts: 72
Location: Florida

PostPosted: Sun Dec 27, 2020 12:35 am    Post subject: [solved] gnome-remote-desktop crash error 4 in libvncserver Reply with quote

I finally got the gonome-remote-desktop working but when I try to connect from another Gnome machine on my LAN I get the following in my messages log:

Code:

Dec 26 19:23:28 macpro gnome-shell[2412]: g_udev_client_query_by_device_file: assertion 'device_file != NULL' failed
Dec 26 19:23:28 macpro kernel: gnome-remote-de[2923]: segfault at 0 ip 00007f9a59d5a417 sp 00007ffed9363c40 error 4 in libvncserver.so.0.9.13[7f9a59d43000+33000]
Dec 26 19:23:28 macpro kernel: Code: 00 00 00 89 cf 83 c2 01 40 d0 ef 83 e1 01 89 f9 bf 80 ff ff ff 0f 45 cf 48 01 f0 39 da 74 54 89 d7 c1 ff 03 44 01 c7 48 63 ff <41> 84 0c 3b 75 9b 83 fe 08 0f 83 aa 00 00 00 44 8b 54 24 0c 45 85
Dec 26 19:23:28 macpro systemd[1]: Created slice system-systemd\x2dcoredump.slice.
Dec 26 19:23:28 macpro systemd[1]: Started Process Core Dump (PID 6581/UID 0).
Dec 26 19:23:28 macpro systemd[2216]: gnome-remote-desktop.service: Main process exited, code=dumped, status=11/SEGV
Dec 26 19:23:28 macpro systemd[2216]: gnome-remote-desktop.service: Failed with result 'core-dump'.
Dec 26 19:23:28 macpro gnome-shell[2412]: D-Bus client with active sessions vanished
Dec 26 19:23:29 macpro systemd-coredump[6582]: Process 2923 (gnome-remote-de) of user 1000 dumped core.
Dec 26 19:23:29 macpro systemd[1]: systemd-coredump@0-6581-0.service: Succeeded.
Dec 26 19:23:29 macpro systemd[2216]: gnome-remote-desktop.service: Scheduled restart job, restart counter is at 1.
Dec 26 19:23:29 macpro systemd[2216]: Stopped GNOME Remote Desktop.
Dec 26 19:23:29 macpro systemd[2216]: Starting GNOME Remote Desktop...
Dec 26 19:23:29 macpro systemd[2216]: Started GNOME Remote Desktop.
Dec 26 19:23:29 macpro gnome-remote-de[6592]: Failed to initialize RDP server: Couldn't find the server certificate or private keyfile


Gnome's website is of little help on this topic:
https://help.gnome.org/users/vinagre/stable/connect.html.en

Can someone point me in the right direction on how to enable the trust between the server and client in Gnome for gnome-remote-desktop?


Last edited by soparla on Tue Jan 19, 2021 5:18 am; edited 3 times in total
Back to top
View user's profile Send private message
salahx
Guru
Guru


Joined: 12 Mar 2005
Posts: 530

PostPosted: Sun Dec 27, 2020 7:23 pm    Post subject: Reply with quote

I've been looking into it, but I can't get gnome-remote-desktop to start, it emits the following in the logs:
Code:

Failed to enable service gnome-remote-desktop: GDBus.Error:org.freedesktop.DBus.Error.InvalidArgs: Sharing cannot be enabled on this network, status is '0'


I presume you were able to get past that. It has something to do with NetworkManager (which I use) but so far no dice, even if i clear the config and use a basic configuration (Ethernet only). (My setup is kind of exotic, as I have an Ethernet bridge for a few virtual machines)
Back to top
View user's profile Send private message
salahx
Guru
Guru


Joined: 12 Mar 2005
Posts: 530

PostPosted: Sun Dec 27, 2020 8:03 pm    Post subject: Reply with quote

I'm still working on my problem, reading the source code but in the meantime, I think the "Failed to initialize RDP server: Couldn't find the server certificate or private keyfile" is a red herring.. RDP support was added recently, and there are 2 keys in the schema, /org/gnome/desktop/remote-desktop/rdp/tls-key and /org/gnome/desktop/remote-desktop/rdp/tls-cert, each of which contains the name of the file the appropriate object is located. But it shouldn't affect VNC

The real problem may be the assertion and crash above. In that case you'll want the core dump and do a backtrace on it.
Back to top
View user's profile Send private message
soparla
n00b
n00b


Joined: 21 Aug 2018
Posts: 72
Location: Florida

PostPosted: Sun Dec 27, 2020 11:05 pm    Post subject: Reply with quote

Would you mind pointing me to the source repo?
I'll try to get a dump to look over.

Related to the client machine, Gnome's RDP client does not support SSH tunneling auth past the simple user/password method. Limiting my use-case to LAN since interacrive 2FA can't be used. :(
Back to top
View user's profile Send private message
salahx
Guru
Guru


Joined: 12 Mar 2005
Posts: 530

PostPosted: Mon Dec 28, 2020 12:33 am    Post subject: Reply with quote

Sure gnome-remote-desktop git tree/
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21607

PostPosted: Mon Dec 28, 2020 12:33 am    Post subject: Reply with quote

Depending on how it invokes ssh, and how much effort you want to expend, you might be able to make it work with 2FA anyway. If you enable ssh connection multiplexing, manually connect a freestanding ssh process to the server, complete your 2FA challenge in that shell, and leave that shell sitting as the connection multiplex master, then subsequent ssh processes created by Gnome RDP could reuse that connection. Such processes would not need to complete any challenge (not 2FA, not public key, not password) because they would be pretrusted because of the multiplexed connection. Thus, Gnome RDP could pretend that there was no 2FA required on the connection. The server would be happy because it performed the regular 2FA check on the first channel in the connection.

If you want to pursue this, find out exactly how Gnome invokes the ssh client, and read man ssh_config for ControlMaster and ControlPath. If you want help implementing it, post back with what you have done and where you got stuck.
Back to top
View user's profile Send private message
soparla
n00b
n00b


Joined: 21 Aug 2018
Posts: 72
Location: Florida

PostPosted: Mon Dec 28, 2020 1:33 am    Post subject: Reply with quote

My client is an old MacBook Pro (late 2008) which Gentoo restored to life. I ordered new parts for it (SSD & more RAM). Will rebuild it and give it another go at it...
Back to top
View user's profile Send private message
soparla
n00b
n00b


Joined: 21 Aug 2018
Posts: 72
Location: Florida

PostPosted: Mon Dec 28, 2020 1:45 am    Post subject: Reply with quote

Meanwhile, on the server side I got rid of the segfailt once I re-emerged net-libs/libvncserver. I'm now down to the following:

Code:

Dec 27 20:40:36 macpro gnome-shell[2412]: g_udev_client_query_by_device_file: assertion 'device_file != NULL' failed
Dec 27 20:40:36 macpro gnome-remote-desktop-daemon[13622]: [W][000092324.601236][remote-node.c:650 client_node_port_use_buffers()] Failed to mlock memory 0x7fc38c55a080 16448: This is not a problem but for best performance, consider increasing RLIMIT_MEMLOCK
Dec 27 20:40:36 macpro gnome-remote-desktop-daemon[13622]: [W][000092324.601260][remote-node.c:650 client_node_port_use_buffers()] Failed to mlock memory 0x7fc38c5550c0 16448: This is not a problem but for best performance, consider increasing RLIMIT_MEMLOCK
Dec 27 20:40:36 macpro gnome-remote-desktop-daemon[13622]: [W][000092324.601271][remote-node.c:650 client_node_port_use_buffers()] Failed to mlock memory 0x7fc38c550100 16448: This is not a problem but for best performance, consider increasing RLIMIT_MEMLOCK
Dec 27 20:40:36 macpro gnome-remote-desktop-daemon[13622]: [W][000092324.601282][remote-node.c:650 client_node_port_use_buffers()] Failed to mlock memory 0x7fc38c54b140 16448: This is not a problem but for best performance, consider increasing RLIMIT_MEMLOCK
Dec 27 20:40:36 macpro gnome-remote-desktop-daemon[13622]: [W][000092324.601292][remote-node.c:650 client_node_port_use_buffers()] Failed to mlock memory 0x7fc38c546180 16448: This is not a problem but for best performance, consider increasing RLIMIT_MEMLOCK
Dec 27 20:40:36 macpro gnome-remote-desktop-daemon[13622]: [W][000092324.601302][remote-node.c:650 client_node_port_use_buffers()] Failed to mlock memory 0x7fc38c5411c0 16448: This is not a problem but for best performance, consider increasing RLIMIT_MEMLOCK
Dec 27 20:40:36 macpro gnome-remote-de[13622]: Failed to mmap DMA buffer: Function not implemented
Dec 27 20:40:36 macpro gnome-remote-desktop-daemon[13622]: **
Dec 27 20:40:36 macpro gnome-remote-desktop-daemon[13622]: ERROR:../gnome-remote-desktop-0.1.9/src/grd-vnc-pipewire-stream.c:426:on_stream_process: assertion failed: (frame)
Dec 27 20:40:36 macpro gnome-remote-desktop-daemon[13622]: Bail out! ERROR:../gnome-remote-desktop-0.1.9/src/grd-vnc-pipewire-stream.c:426:on_stream_process: assertion failed: (frame)
Dec 27 20:40:36 macpro systemd[1]: Started Process Core Dump (PID 13633/UID 0).
Dec 27 20:40:37 macpro systemd[2216]: gnome-remote-desktop.service: Main process exited, code=killed, status=6/ABRT
Dec 27 20:40:37 macpro systemd[2216]: gnome-remote-desktop.service: Failed with result 'signal'.
Dec 27 20:40:37 macpro gnome-shell[2412]: D-Bus client with active sessions vanished
Dec 27 20:40:37 macpro systemd-coredump[13634]: Process 13622 (gnome-remote-de) of user 1000 dumped core.
Dec 27 20:40:37 macpro systemd[1]: systemd-coredump@3-13633-0.service: Succeeded.
Dec 27 20:40:37 macpro systemd[2216]: gnome-remote-desktop.service: Scheduled restart job, restart counter is at 4.
Dec 27 20:40:37 macpro systemd[2216]: Stopped GNOME Remote Desktop.
Dec 27 20:40:37 macpro systemd[2216]: Starting GNOME Remote Desktop...
Dec 27 20:40:37 macpro systemd[2216]: Started GNOME Remote Desktop.
Dec 27 20:40:37 macpro gnome-remote-de[13643]: Failed to initialize RDP server: Couldn't find the server certificate or private keyfile


Seems like a failed nmap DMA buffer error with a missing function. Perhaps I have I missconfigured installation between dependencies since I tried few different versions of gnome-remote-desktop and unmasked one too many packages. Will try to clean-up and re-install from scratch gnome-remote-desktop and its dependencies on the server.

Code line:
https://gitlab.gnome.org/GNOME/gnome-remote-desktop/-/blob/0.1.9/src/grd-vnc-pipewire-stream.c#L295

The client is trying to connect and I get the old X mouse cursor right before the crash...
Back to top
View user's profile Send private message
salahx
Guru
Guru


Joined: 12 Mar 2005
Posts: 530

PostPosted: Mon Dec 28, 2020 2:02 am    Post subject: Reply with quote

gnome-remote-desktop mostly just presents the VNC/RDP interface and the server; The actual work is done by mutter via pipewire. Before you try doing VNC, you may want to test mutter/pipewire. You can do this with python script on thie Mutter/RemoteDesktop page.

You'll need at least the following to run the script, if you don't already have them

dev-media/pipewire[gstreamer]
sys-apps/xdg-desktop-portal[screencast]
sys-apps/xdg-desktop-portal-gtk (maybe)

Also mark sure you're using the latest pipewire - pipewire 0.3.17 crashed my desktop, 0.3.18 did not (but it didn't work either - python script gives green screen). I've given up trying to get it to work on my GNOME 3.36 system, maybe I'll try again with GNOME 3.38 when it goes stable.
Back to top
View user's profile Send private message
soparla
n00b
n00b


Joined: 21 Aug 2018
Posts: 72
Location: Florida

PostPosted: Mon Dec 28, 2020 2:44 am    Post subject: Reply with quote

That makes a lot more sense to me now. Was missing sys-apps/xdg-desktop-portal. Except I run into a missing interface as reported by:

Code:

$ ./xdp-remote-desktop.py
./xdp-remote-desktop.py:13: PyGIDeprecationWarning: Since version 3.11, calling threads_init is no longer needed. See: https://wiki.gnome.org/PyGObject/Threading
  GObject.threads_init()
Traceback (most recent call last):
  File "./xdp-remote-desktop.py", line 150, in <module>
    remote_desktop_call(portal.CreateSession, on_create_session_response,
  File "./xdp-remote-desktop.py", line 57, in remote_desktop_call
    method(*(args + (options, )),
  File "/usr/lib/python3.8/site-packages/dbus/proxies.py", line 72, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python3.8/site-packages/dbus/proxies.py", line 141, in __call__
    return self._connection.call_blocking(self._named_service,
  File "/usr/lib/python3.8/site-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.RemoteDesktop” on object at path /org/freedesktop/portal/desktop


It seems to me that “org.freedesktop.portal.RemoteDesktop” is implmented by xdg-desktop-portal/. I'm running latest v1.8.0:
https://github.com/flatpak/xdg-desktop-portal/blob/master/data/org.freedesktop.portal.RemoteDesktop.xml

Not sure why it can't be found. Must I start it as a service? Restart dbus? Restart the system?
Back to top
View user's profile Send private message
salahx
Guru
Guru


Joined: 12 Mar 2005
Posts: 530

PostPosted: Mon Dec 28, 2020 3:32 am    Post subject: Reply with quote

Ran into the same problem myself. You have to log out and back in (maybe reboot though probably not).
Back to top
View user's profile Send private message
soparla
n00b
n00b


Joined: 21 Aug 2018
Posts: 72
Location: Florida

PostPosted: Mon Dec 28, 2020 4:40 am    Post subject: Reply with quote

Will do right after (I know is not needed, but I'm hopping it eleminates any other possible hickup):
Code:
# emerge -ave gnome-remote-desktop

Half way throug reinstalling 684 packages...

I think I'll restart, for some reason after I restarted D-Bus via systemctl I started getting this in my messages:
Code:
Dec 27 23:39:50 macpro systemd-resolved[1759]: Failed to emit notification about changed property DNS: Transport endpoint is not connected
Back to top
View user's profile Send private message
soparla
n00b
n00b


Joined: 21 Aug 2018
Posts: 72
Location: Florida

PostPosted: Mon Dec 28, 2020 5:17 am    Post subject: Reply with quote

Restarted server, still no luck:
Code:

Dec 28 00:16:29 macpro gnome-remote-de[2736]: Failed to mmap DMA buffer: Function not implemented
Dec 28 00:16:29 macpro gnome-remote-desktop-daemon[2736]: **
Dec 28 00:16:29 macpro gnome-remote-desktop-daemon[2736]: ERROR:../gnome-remote-desktop-0.1.9/src/grd-vnc-pipewire-stream.c:426:on_stream_process: assertion failed: (frame)
Dec 28 00:16:29 macpro gnome-remote-desktop-daemon[2736]: Bail out! ERROR:../gnome-remote-desktop-0.1.9/src/grd-vnc-pipewire-stream.c:426:on_stream_process: assertion failed: (frame)


Python test script for xdp-remote-desktop reports same error too:
Code:

dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.RemoteDesktop” on object at path /org/freedesktop/portal/desktop
Back to top
View user's profile Send private message
soparla
n00b
n00b


Joined: 21 Aug 2018
Posts: 72
Location: Florida

PostPosted: Mon Dec 28, 2020 5:53 am    Post subject: Reply with quote

I tried to upgrade mutter to v3.28.2 which broke my Gnome desktop all togheter.

Even so, @preserved-rebuild has gnome-shell in it which wants to downgrade me back to stable version:
Code:

# emerge -av @preserved-rebuild

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     UD ] x11-wm/mutter-3.36.7-r1:0/6::gentoo [3.38.2:0/7::gentoo] USE="introspection screencast sysprof systemd udev wayland (-elogind) -test" INPUT_DEVICES="-wacom" 0 KiB
[ebuild   R    ] gnome-base/gnome-shell-3.36.7::gentoo  USE="bluetooth browser-extension ibus networkmanager systemd (-elogind) -gtk-doc -telepathy -test" PYTHON_SINGLE_TARGET="python3_8 -python3_6 -python3_7" 0 KiB

Total: 2 packages (1 downgrade, 1 reinstall), Size of downloads: 0 KiB


I'm not winning here at all. Might need to work around it by switching to a difference VNC server...
Back to top
View user's profile Send private message
salahx
Guru
Guru


Joined: 12 Mar 2005
Posts: 530

PostPosted: Mon Dec 28, 2020 6:29 am    Post subject: Reply with quote

Don;'t try to upgrade mutter (I already tried :) ) without upgrading the rest of GNOME (which is virtually impossible) ll the GNOME component inter-depend on one another, and other things too, which is why it probably takes so long to stabilize GNOME. Basically, the underlying issue is traditional screen sharing does not work under Wayland due to way its designed. If you're willing to fall back to x11, you can use Vino, which is the old screen sharing application for GNOME.

Here's how I have my files setup:

/etc/portage/profile/package.use.stable.mask/gnome-remote-desktop
Code:
x11-wm/mutter -screencast

/etc/portage/package.accept_keywords/gnome-remote-desktop
Code:
net-misc/gnome-remote-desktop
media-video/pipewire
sys-apps/xdg-desktop-portal-gtk

/etc/portage/package.use/gnome-remote-desktop
Code:
11-wm/mutter screencast
media-video/pipewire gstreamer
sys-apps/xdg-desktop-portal screencast


And the following packages installed in addition to the ones in GNOME:
Code:
media-video/pipewire
sys-apps/xdg-desktop-portal
sys-apps/xdg-desktop-portal-gtk
net-misc/gnome-remote-desktop
net-misc/freerdp # FIXME: should be a dependency of  net-misc/gnome-remote-desktop but its not (support was just added recently).


I'm not sure if sys-apps/sys-apps/xdg-desktop-portal-gtk is required or not, so you may be able to leave th reset of it out. It "worked" for me after a logout/login (I didn't get the error when I ran the script, but I didn't get my desktop either!)
Back to top
View user's profile Send private message
soparla
n00b
n00b


Joined: 21 Aug 2018
Posts: 72
Location: Florida

PostPosted: Mon Dec 28, 2020 8:19 am    Post subject: Reply with quote

Hmmm... you are right. The only thing I was missing was sys-apps/xdg-desktop-portal-gtk which I figured I won't need since I am not using GTK.

Once installed the python test script looks okay:
Code:

$ ./xdp-remote-desktop.py
./xdp-remote-desktop.py:13: PyGIDeprecationWarning: Since version 3.11, calling threads_init is no longer needed. See: https://wiki.gnome.org/PyGObject/Threading
  GObject.threads_init()
session /org/freedesktop/portal/desktop/session/1_89/u1 created
devices selected
sources selected


But just as you mentioned, trying to connect via Gnome's Remote Desktop Viewer I still get the same error:
Code:

Dec 28 03:12:57 macpro gnome-remote-desktop-daemon[785452]: [W][000006447.806043][remote-node.c:650 client_node_port_use_buffers()] Failed to mlock memory 0x7f9932f571c0 16448: This is not a problem but for best performance, consider increasing RLIMIT_MEMLOCK
Dec 28 03:12:57 macpro gnome-remote-de[785452]: Failed to mmap DMA buffer: Function not implemented
Dec 28 03:12:57 macpro gnome-remote-desktop-daemon[785452]: **
Dec 28 03:12:57 macpro gnome-remote-desktop-daemon[785452]: ERROR:../gnome-remote-desktop-0.1.9/src/grd-vnc-pipewire-stream.c:426:on_stream_process: assertion failed: (frame)
Dec 28 03:12:57 macpro gnome-remote-desktop-daemon[785452]: Bail out! ERROR:../gnome-remote-desktop-0.1.9/src/grd-vnc-pipewire-stream.c:426:on_stream_process: assertion failed: (frame)


Granted I haven't restarted my Gnome v3.36.8 session nor restarted the server system yet. I also tryied it via X11 with gnome-remote-desktop but no luck. Did not try vino since is deprecated.

Now I see why you started to look over the code...

IMHO the missing impl of an interface to me singnals wrong API version or something is not getting registered.
ie: Either the stable versoin of mutter is not implementing it, or something else is overlooked.

Also it just occured to me, before the error I get the warning about mmap and having to increase the mem size wich seems to be set to 64. Is it possible that's the root-cause of this error?
Looking over the code, the mmap might not be created because of that warning and then the error throw is miseleading:
Code:

      ...
      map = mmap (NULL, size, PROT_READ, MAP_PRIVATE, fd, 0);
      if (map == MAP_FAILED)
        {
          g_warning ("Failed to mmap DMA buffer: %s", g_strerror (errno));
          return NULL;
        }
      ...

https://gitlab.gnome.org/GNOME/gnome-remote-desktop/-/blob/0.1.9/src/grd-vnc-pipewire-stream.c#L292

But to test my theory I need to know how to increase said RLIMIT_MEMLOCK at least for processes running under my username. Tried it via the PAM config file with little luck. So how do I change the value of RLIMIT_MEMLOCK just to put my theory to a test?
Back to top
View user's profile Send private message
salahx
Guru
Guru


Joined: 12 Mar 2005
Posts: 530

PostPosted: Mon Dec 28, 2020 6:47 pm    Post subject: Reply with quote

You can adjust limits by editing /etc/security/limits.conf OR by adding a file to /etc/security/limits.d (see /etc/security/limits.conf for the format). But i believe that's just an optimization, and shouldn't be the cause of the error.
Back to top
View user's profile Send private message
salahx
Guru
Guru


Joined: 12 Mar 2005
Posts: 530

PostPosted: Sun Jan 03, 2021 12:30 am    Post subject: Reply with quote

I don't know if you ever got it to work, but I did: basically. there 3 issues:

One, gnome-base/gnome-settings-daemon needed the "networkmanager" flag set. Once I rebuilt that package with that flag and restarted GNOME, I finally was able to choose by adapter from the Screen Sharing applet

Second, gnome-base/mutter-3.36 does not work (even after unmasking the flag. I guess that's why it package.use/stable/mask'd ) Once I upgraded mutter (and a few other packages, thankfully not many) to 3.38, the python test script worked successfully.

Third, I had a VM listening on tcp/5900 for SPICE so it was interfering with gnome-remote-desktop to bind to the port. I shut down the VM as changed it to require a password (because the VNC client I was using does not support passwordless VNC).

After that, it connect, the logs look at lot like yours, except mine works:

Code:

an 02 18:09:16 ardvarc systemd[1268]: Starting GNOME Remote Desktop...
Jan 02 18:09:16 ardvarc systemd[1268]: Started GNOME Remote Desktop.
Jan 02 18:09:16 ardvarc gnome-remote-de[116261]: Failed to initialize RDP server: Couldn't find the server certificate or private keyfile
Jan 02 18:09:41 ardvarc gnome-shell[114613]: g_udev_client_query_by_device_file: assertion 'device_file != NULL' failed
Jan 02 18:09:41 ardvarc gnome-remote-desktop-daemon[116261]: Failed to mlock memory 0x7f8d7c3e1000 589888: This is not a problem but for best performance, co
nsider increasing RLIMIT_MEMLOCK
Jan 02 18:09:49 ardvarc kernel: gnome-remote-de[116261]: segfault at 50 ip 000055c97ee01d6d sp 00007ffff9356640 error 4 in gnome-remote-desktop-daemon[55c97e
dee000+1b000]
Jan 02 18:09:49 ardvarc kernel: Code: c6 01 74 59 48 8b 7a 28 48 89 d3 e8 ed ca fe ff 84 c0 74 1c 48 8b 7b 28 31 f6 e8 0e cc fe ff 8b 43 38 85 c0 74 0a 48 8b
 43 30 <83> 78 50 ff 75 0d b8 ff ff ff ff 5b c3 66 0f 1f 44 00 00 8b 53 40
Jan 02 18:09:49 ardvarc systemd[1]: Started Process Core Dump (PID 116275/UID 0).
Jan 02 18:09:49 ardvarc systemd[1268]: gnome-remote-desktop.service: Main process exited, code=dumped, status=11/SEGV
Jan 02 18:09:49 ardvarc systemd[1268]: gnome-remote-desktop.service: Failed with result 'core-dump'.
Jan 02 18:09:49 ardvarc gnome-shell[114613]: D-Bus client with active sessions vanished
Jan 02 18:09:49 ardvarc systemd-coredump[116276]: Process 116261 (gnome-remote-de) of user 1000 dumped core.
Jan 02 18:09:49 ardvarc systemd[1]: systemd-coredump@2-116275-0.service: Succeeded.
Jan 02 18:09:49 ardvarc systemd[1268]: gnome-remote-desktop.service: Scheduled restart job, restart counter is at 1.
...
Jan 02 18:10:49 ardvarc kernel: gnome-remote-de[116284]: segfault at 0 ip 00007f9fdfccc7c7 sp 00007ffdb2382d00 error 4 in libvncserver.so.0.9.13[7f9fdfcb5000+34000]
Jan 02 18:10:49 ardvarc kernel: Code: 01 00 00 89 cf 83 c2 01 40 d0 ef 83 e1 01 89 f9 bf 80 ff ff ff 0f 45 cf 48 01 f0 39 da 74 54 89 d7 c1 ff 03 44 01 d7 48 63 ff <41> 84 0c 3b 75 a3 83 fe 08 0f 83 aa 00 00 00 44 8b 44 24 14 45 85
Jan 02 18:10:49 ardvarc systemd[1]: Started Process Core Dump (PID 116311/UID 0).
Jan 02 18:10:50 ardvarc systemd[1268]: gnome-remote-desktop.service: Main process exited, code=dumped, status=11/SEGV
Jan 02 18:10:50 ardvarc systemd[1268]: gnome-remote-desktop.service: Failed with result 'core-dump'.
Jan 02 18:10:50 ardvarc gnome-shell[114613]: D-Bus client with active sessions vanished
Jan 02 18:10:50 ardvarc systemd-coredump[116312]: Process 116284 (gnome-remote-de) of user 1000 dumped core.
Jan 02 18:10:50 ardvarc systemd[1]: systemd-coredump@3-116311-0.service: Succeeded.
Jan 02 18:10:50 ardvarc systemd[1268]: gnome-remote-desktop.service: Scheduled restart job, restart counter is at 2.
...
Jan 02 18:10:50 ardvarc gnome-remote-de[116319]: Failed to initialize RDP server: Couldn't find the server certificate or private keyfile
Jan 02 18:10:52 ardvarc gnome-shell[114613]: g_udev_client_query_by_device_file: assertion 'device_file != NULL' failed
Jan 02 18:10:52 ardvarc gnome-remote-desktop-daemon[116319]: Failed to mlock memory 0x7ff27911f000 589888: This is not a problem but for best performance, consider increasing RLIMIT_MEMLOCK
Jan 02 18:15:23 ardvarc gnome-remote-desktop-daemon[116319]: loop 0x560795ec0028: queue full 0
[lots of the preceding]


Interestingly enough, it makes my mouse cursor fora few minutes after the remote computer tried to connect, as well.
Back to top
View user's profile Send private message
salahx
Guru
Guru


Joined: 12 Mar 2005
Posts: 530

PostPosted: Sun Jan 03, 2021 3:35 am    Post subject: Reply with quote

There's apparently 2 different crashes. Both occur in the same file src/grd-session-vnc.c and the same function, handle_socket_data. Both are because of a NULL pointer derefernce. In the first case, session_vnc->frb_client is NULL,

One is easy to fix (i'm not sure if its the RIGHT fix, since I'm not sure it if its legal for session_vnc->frb_client to be NULL)
Code:

index ba3e5ce..b825240 100644
--- a/src/grd-session-vnc.c
+++ b/src/grd-session-vnc.c
@@ -579,6 +579,7 @@ handle_socket_data (GSocket *socket,
           rfbProcessEvents (session_vnc->rfb_screen, 0);
 
           if (session_vnc->pending_framebuffer_resize &&
+              session_vnc->rfb_client &&
               session_vnc->rfb_client->preferredEncoding != -1)
             {
               resize_vnc_framebuffer (session_vnc,


The other I'm not so sure of, it occurs further down in libvnc:
Code:

495      for(j=0;j<cursor->height;j++)
496        for(i=0,bit=0x80;i<cursor->width;i++,bit=(bit&1)?0x80:bit>>1,cp+=bpp)
497          if(cursor->source[j*w+i/8]&bit) memcpy(cp,fore,bpp);
498          else memcpy(cp,back,bpp);

In line 497, cursor->source is NULL and it crashes.This function is eventually reached by handle_socket_data when it calls rfbProcessEvents (session_vnc->rfb_screen, 0); Not so sure on this is has something to do with gnome-remote-dekstop or pipewire and/or mutter is feeding it bad data. The cursor logic in in src/grd-vnc-pipewire-stream.c. It uses some pipewire metadata, and sure enough, pw-mon spits out this little bit:
Code:

changed:
   id: 49
   permissions: rwxm
   type: PipeWire:Interface:Port (version 3)
   direction: "output"
*   params:
      id:3 (Spa:Enum:ParamId:EnumFormat)
           video/raw
                     format : (Id) BGRx
                       size : (Rectangle) 1920x1080
                  framerate : (Fraction) 0/1
               maxFramerate : (Fraction) [ 1/1, 7864385/131072 ]
      id:7 (Spa:Enum:ParamId:IO)
          Object: size 56, type Spa:Pod:Object:Param:IO (262150), id Spa:Enum:ParamId:IO (7)
            Prop: key Spa:Pod:Object:Param:IO:id (1), flags 00000000
              Id 1        (Spa:Enum:IO:Buffers)
            Prop: key Spa:Pod:Object:Param:IO:size (2), flags 00000000
              Int 8
*     id:6 (Spa:Enum:ParamId:Meta)
          Object: size 56, type Spa:Pod:Object:Param:Meta (262149), id Spa:Enum:ParamId:Meta (6)
            Prop: key Spa:Pod:Object:Param:Meta:type (1), flags 00000000
              Id 2        (Spa:Pointer:Meta:Region:VideoCrop)
            Prop: key Spa:Pod:Object:Param:Meta:size (2), flags 00000000
              Int 16
*     id:6 (Spa:Enum:ParamId:Meta)
          Object: size 56, type Spa:Pod:Object:Param:Meta (262149), id Spa:Enum:ParamId:Meta (6)
            Prop: key Spa:Pod:Object:Param:Meta:type (1), flags 00000000
              Id 5        (Spa:Pointer:Meta:Cursor)
            Prop: key Spa:Pod:Object:Param:Meta:size (2), flags 00000000
              Int 589872
*     id:4 (Spa:Enum:ParamId:Format)
           video/raw
                     format : (Id) BGRx
                       size : (Rectangle) 1920x1080
                  framerate : (Fraction) 0/1
               maxFramerate : (Fraction) 30/1
*     id:5 (Spa:Enum:ParamId:Buffers)
          Object: size 152, type Spa:Pod:Object:Param:Buffers (262148), id Spa:Enum:ParamId:Buffers (5)
            Prop: key Spa:Pod:Object:Param:Buffers:buffers (1), flags 00000000
              Choice: type Spa:Enum:Choice:Range, flags 00000000 28 4
                Int 16
                Int 2
                Int 16
            Prop: key Spa:Pod:Object:Param:Buffers:blocks (2), flags 00000000
              Int 1
            Prop: key Spa:Pod:Object:Param:Buffers:BlockInfo:size (3), flags 00000000
              Int 8294400
            Prop: key Spa:Pod:Object:Param:Buffers:BlockInfo:stride (4), flags 00000000
              Int 7680
            Prop: key Spa:Pod:Object:Param:Buffers:BlockInfo:align (5), flags 00000000
              Int 16
    properties:
       port.direction = "out"
       port.name = "out_0"
       node.id = "48"
       object.id = "4


But I'm not familiar enough with Pipewire to debug this, but hopefully someone else reading this might be :)
Back to top
View user's profile Send private message
salahx
Guru
Guru


Joined: 12 Mar 2005
Posts: 530

PostPosted: Sun Jan 03, 2021 11:46 pm    Post subject: Reply with quote

Turns out of the other crash is a bug in libvncserver: https://github.com/LibVNC/libvncserver/commit/d138cf90130b0e8d5062f136ecdbcaa85e734d5d

This patch should fix the crash:
Code:

From d138cf90130b0e8d5062f136ecdbcaa85e734d5d Mon Sep 17 00:00:00 2001
From: Christian Beier <info@christianbeier.net>
Date: Mon, 20 Jul 2020 22:33:29 +0200
Subject: [PATCH] libvncserver: don't NULL out internal of the default cursor

...otherwise an rfbScreen created after rfbScreenCleanup() was called
gets assigned an invalid cursor struct.
---
 libvncserver/main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libvncserver/main.c b/libvncserver/main.c
index 9149fda3..a3a711e3 100644
--- a/libvncserver/main.c
+++ b/libvncserver/main.c
@@ -1110,7 +1110,8 @@ void rfbScreenCleanup(rfbScreenInfoPtr screen)
   FREE_IF(underCursorBuffer);
   TINI_MUTEX(screen->cursorMutex);
 
-  rfbFreeCursor(screen->cursor);
+  if(screen->cursor != &myCursor)
+      rfbFreeCursor(screen->cursor);
 
 #ifdef LIBVNCSERVER_HAVE_LIBZ
   rfbZlibCleanup(screen);


Now I see no crashes at all (cursor on main computer still disappears for a while on my machine, though)
Back to top
View user's profile Send private message
soparla
n00b
n00b


Joined: 21 Aug 2018
Posts: 72
Location: Florida

PostPosted: Mon Jan 18, 2021 6:04 am    Post subject: Reply with quote

Okay, I had to rebuild this client laptop since I upgraded to a SSD drive and doubled its RAM.

Now that I came back to it, I noticed I had "-screenshare" in my USE flags that I removed and reinstalled mutter and etc.

Am getting similar like you on server side:
Code:

Jan 18 00:57:19 macpro gnome-shell[2430]: g_udev_client_query_by_device_file: assertion 'device_file != NULL' failed
Jan 18 00:57:19 macpro gnome-remote-desktop-daemon[2980]: [W][000001238.039038][remote-node.c:650 client_node_port_use_buffers()] Failed to mlock memory 0x7f22a43c5080 16448: This is not a problem but for best performance, consider increasing RLIMIT_MEMLOCK
Jan 18 00:57:19 macpro gnome-remote-desktop-daemon[2980]: [W][000001238.039065][remote-node.c:650 client_node_port_use_buffers()] Failed to mlock memory 0x7f22a43c00c0 16448: This is not a problem but for best performance, consider increasing RLIMIT_MEMLOCK
Jan 18 00:57:19 macpro gnome-remote-desktop-daemon[2980]: [W][000001238.039076][remote-node.c:650 client_node_port_use_buffers()] Failed to mlock memory 0x7f22a43bb100 16448: This is not a problem but for best performance, consider increasing RLIMIT_MEMLOCK
Jan 18 00:57:19 macpro gnome-remote-desktop-daemon[2980]: [W][000001238.039085][remote-node.c:650 client_node_port_use_buffers()] Failed to mlock memory 0x7f22a43b6140 16448: This is not a problem but for best performance, consider increasing RLIMIT_MEMLOCK
Jan 18 00:57:19 macpro gnome-remote-desktop-daemon[2980]: [W][000001238.039094][remote-node.c:650 client_node_port_use_buffers()] Failed to mlock memory 0x7f22a43b1180 16448: This is not a problem but for best performance, consider increasing RLIMIT_MEMLOCK
Jan 18 00:57:19 macpro gnome-remote-desktop-daemon[2980]: [W][000001238.039103][remote-node.c:650 client_node_port_use_buffers()] Failed to mlock memory 0x7f22a43ac1c0 16448: This is not a problem but for best performance, consider increasing RLIMIT_MEMLOCK
Jan 18 00:57:19 macpro gnome-remote-de[2980]: Failed to mmap DMA buffer: Function not implemented
Jan 18 00:57:19 macpro gnome-remote-desktop-daemon[2980]: **
Jan 18 00:57:19 macpro gnome-remote-desktop-daemon[2980]: ERROR:../gnome-remote-desktop-0.1.9/src/grd-vnc-pipewire-stream.c:426:on_stream_process: assertion failed: (frame)
Jan 18 00:57:19 macpro gnome-remote-desktop-daemon[2980]: Bail out! ERROR:../gnome-remote-desktop-0.1.9/src/grd-vnc-pipewire-stream.c:426:on_stream_process: assertion failed: (frame)
Jan 18 00:57:19 macpro systemd[1]: Started Process Core Dump (PID 3881/UID 0).
Jan 18 00:57:20 macpro pipewire[2365]: [W][000001238.127832][impl-node.c:1448 node_ready()] (gnome-shell-42) graph not finished: state:0x7f6dd3e75008 quantum:1024 pending 1/3
Jan 18 00:57:20 macpro pipewire[2365]: [W][000001238.127883][impl-node.c:878 dump_states()] (gnome-shell-42) state:0x7f6dd3e75008 pending:1/3 s:1238798786704 a:0 f:1238730916439 waiting:18446742834910764912 process:1238730916439 status:triggered sync:0
Jan 18 00:57:20 macpro pipewire[2365]: [W][000001238.127891][impl-node.c:878 dump_states()] (gnome-shell-42) state:0x7f6dd3e75008 pending:1/3 s:1238798786704 a:0 f:1238730916439 waiting:18446742834910764912 process:1238730916439 status:triggered sync:0
Jan 18 00:57:20 macpro pipewire[2365]: [W][000001238.127896][impl-node.c:878 dump_states()] (gnome-remote-de-45) state:0x7f6dd2940008 pending:0/2 s:1238730917046 a:1238730936097 f:0 waiting:19051 process:18446742834978615519 status:awake sync:0
Jan 18 00:57:20 macpro systemd[2357]: gnome-remote-desktop.service: Main process exited, code=killed, status=6/ABRT
Jan 18 00:57:20 macpro systemd[2357]: gnome-remote-desktop.service: Failed with result 'signal'.
Jan 18 00:57:20 macpro gnome-shell[2430]: D-Bus client with active sessions vanished
Jan 18 00:57:20 macpro systemd-coredump[3882]: Process 2980 (gnome-remote-de) of user 1000 dumped core.
Jan 18 00:57:20 macpro systemd[1]: systemd-coredump@2-3881-0.service: Succeeded.
Jan 18 00:57:20 macpro systemd[2357]: gnome-remote-desktop.service: Scheduled restart job, restart counter is at 3.
Jan 18 00:57:20 macpro systemd[2357]: Stopped GNOME Remote Desktop.
Jan 18 00:57:20 macpro systemd[2357]: Starting GNOME Remote Desktop...
Jan 18 00:57:20 macpro systemd[2357]: Started GNOME Remote Desktop.
Jan 18 00:57:20 macpro gnome-remote-de[3895]: Failed to initialize RDP server: Couldn't find the server certificate or private keyfile


Next, I'll try to apply that libvncserver bug fix see if it works for me.
Back to top
View user's profile Send private message
salahx
Guru
Guru


Joined: 12 Mar 2005
Posts: 530

PostPosted: Mon Jan 18, 2021 4:08 pm    Post subject: Reply with quote

On mutter 3.36 I do see that. On mutter 3.38 it works.
Back to top
View user's profile Send private message
soparla
n00b
n00b


Joined: 21 Aug 2018
Posts: 72
Location: Florida

PostPosted: Tue Jan 19, 2021 4:59 am    Post subject: Reply with quote

I guess to upgrade mutter I would have to upgrade Gnome Shell as well, just tried to mask the old version and installed the new one and broke Gnome's deps and no desktop now:

Code:

!!! existing preserved libs:
>>> package: x11-wm/mutter-3.36.7-r1
 *  - /usr/lib64/mutter-6/libmutter-cogl-pango-6.so.0
 *  - /usr/lib64/mutter-6/libmutter-cogl-pango-6.so.0.0.0
 *      used by /usr/bin/gnome-shell (gnome-base/gnome-shell-3.36.7)
 *  - /usr/lib64/libmutter-6.so.0
 *  - /usr/lib64/libmutter-6.so.0.0.0
 *      used by /usr/bin/gnome-shell (gnome-base/gnome-shell-3.36.7)
 *      used by /usr/lib64/gnome-shell/libgnome-shell.so (gnome-base/gnome-shell-3.36.7)
 *      used by /usr/lib64/gnome-shell/libst-1.0.so (gnome-base/gnome-shell-3.36.7)
 *  - /usr/lib64/mutter-6/libmutter-clutter-6.so.0
 *  - /usr/lib64/mutter-6/libmutter-clutter-6.so.0.0.0
 *      used by /usr/bin/gnome-shell (gnome-base/gnome-shell-3.36.7)
 *      used by /usr/lib64/gnome-shell/libgnome-shell-menu.so (gnome-base/gnome-shell-3.36.7)
 *      used by /usr/lib64/gnome-shell/libgnome-shell.so (gnome-base/gnome-shell-3.36.7)
 *      used by /usr/lib64/gnome-shell/libst-1.0.so (gnome-base/gnome-shell-3.36.7)
 *  - /usr/lib64/mutter-6/libmutter-cogl-6.so.0
 *  - /usr/lib64/mutter-6/libmutter-cogl-6.so.0.0.0
 *      used by /usr/lib64/gnome-shell/libgnome-shell.so (gnome-base/gnome-shell-3.36.7)
 *      used by /usr/lib64/gnome-shell/libst-1.0.so (gnome-base/gnome-shell-3.36.7)
 *  - /usr/lib64/mutter-6/libmutter-cogl-path-6.so.0
 *  - /usr/lib64/mutter-6/libmutter-cogl-path-6.so.0.0.0


Last edited by soparla on Tue Jan 19, 2021 5:18 am; edited 1 time in total
Back to top
View user's profile Send private message
soparla
n00b
n00b


Joined: 21 Aug 2018
Posts: 72
Location: Florida

PostPosted: Tue Jan 19, 2021 5:17 am    Post subject: Reply with quote

SOLUTION: Upgrade gnome-base/gnome-shell to 3.38.2 and with it you'll get the latest version of Mutter which comes with all the bug fixes.

Upgrading just the Gnome Shell seems to work with the rest of the 3.36.7 stack, although I only had it running for few minutes and I would post back here if something else crashes.

Keep an eye out for stable v3.38.2 releases of:
https://packages.gentoo.org/packages/gnome-base/gnome
https://packages.gentoo.org/packages/gnome-base/gnome-shell
Back to top
View user's profile Send private message
soparla
n00b
n00b


Joined: 21 Aug 2018
Posts: 72
Location: Florida

PostPosted: Tue Jan 19, 2021 5:23 am    Post subject: Reply with quote

Btw, I've noticed that I must be logged in to the server desktop. If it times out and I get locked out, I get disconnected and I need to log back in.
Is there a way to "wake it up" and allow me to remote login to it?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum