Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Session crashes when launching some apps but not others #2841

Closed
sjmgarnier opened this issue Oct 30, 2023 · 20 comments
Closed

Session crashes when launching some apps but not others #2841

sjmgarnier opened this issue Oct 30, 2023 · 20 comments
Labels

Comments

@sjmgarnier
Copy link

xrdp version

0.9.17

Detailed xrdp version, build options

xrdp 0.9.17
  A Remote Desktop Protocol Server.
  Copyright (C) 2004-2020 Jay Sorg, Neutrino Labs, and all contributors.
  See https://github.com/neutrinolabs/xrdp for more information.

  Configure options:
      --enable-ipv6
      --enable-jpeg
      --enable-fuse
      --enable-rfxcodec
      --enable-opus
      --enable-painter
      --enable-vsock
      --build=x86_64-linux-gnu
      --prefix=/usr
      --includedir=${prefix}/include
      --mandir=${prefix}/share/man
      --infodir=${prefix}/share/info
      --sysconfdir=/etc
      --localstatedir=/var
      --disable-silent-rules
      --libdir=${prefix}/lib/x86_64-linux-gnu
      --libexecdir=${prefix}/lib/x86_64-linux-gnu
      --disable-maintainer-mode
      --disable-dependency-tracking
      --with-socketdir=/run/xrdp/sockdir
      build_alias=x86_64-linux-gnu
      CFLAGS=-g -O2 -ffile-prefix-map=/build/xrdp-asBei3/xrdp-0.9.17=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security 
      LDFLAGS=-Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -Wl,-z,now -Wl,--as-needed
      CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2 -Wno-error=deprecated-declarations
      PKG_CONFIG_PATH=/build/xrdp-asBei3/xrdp-0.9.17/pkgconfig

  Compiled with OpenSSL 3.0.2 15 Mar 2022

Operating system & version

Ubuntu 22.04

Installation method

dnf / apt / zypper / pkg / etc

Which backend do you use?

xorgxrdp (I think) version 1:0.2.17-1build1

What desktop environment do you use?

GNOME

Environment xrdp running on

Physical machine with Intel Corporation HD Graphics 530 (rev 06)

What's your client?

Microsoft's official client from Mac app store

Area(s) with issue?

Crashes such as segfault

Steps to reproduce

After launching a session, the desktop shows up normally but attempts to launch certain apps (e.g., Videos) result in the session crashing and the client disconnecting.

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

Anything else?

xrdp-sesman.log
xrdp.log

@sjmgarnier sjmgarnier added the bug label Oct 30, 2023
@matt335672
Copy link
Member

The only significant thing in these logs is the session is getting a SIGTERM after 8 seconds..

Is there anything more useful in either ~simon/.xorgxrdp.10.log or from the system log (use this command):-

sudo journalctl -S '2023-10-30 08:37:21' -U '2023-10-30 08:37:30'

@sjmgarnier
Copy link
Author

I have attached them below. Several warnings and errors but I'm afraid I don't understand what they are about.

xorgxrdp.10.log
journalctl.txt

@matt335672
Copy link
Member

Looks like #1367

A couple of questions:

  1. Are you using multi-monitor?
  2. What do you get for dpkg -l \*xrdp\*
  3. What is you client colour depth set to?

@sjmgarnier
Copy link
Author

@matt335672 Thanks for the quick reply.

  1. Multi-monitor client-side; single or no monitor server-side
  2. dpkg -l \*xrdp\* returns:
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version          Architecture Description
+++-==============-================-============-===============================================
ii  xorgxrdp       1:0.2.17-1build1 amd64        Remote Desktop Protocol (RDP) modules for X.org
ii  xrdp           0.9.17-2ubuntu2  amd64        Remote Desktop Protocol (RDP) server
  1. 16 bit, but I tried with 32 bit as well and that didn't help.

@matt335672
Copy link
Member

Thanks.

The suggestion in #1367 is this is fixed in neutrinolabs/xorgxrdp#121 but that doesn't seem to be the case.

  • Are you running a multi-monitor session? If so, try without.
  • Are there particular applications causing this to happen?

@sjmgarnier
Copy link
Author

  • Are you running a multi-monitor session? If so, try without.

Do you mean on the client-side? At the moment, the server is monitor-less.

  • Are there particular applications causing this to happen?

The Gnome Videos app (aka Totem) triggers the crash consistently. Others (like RStudio) don't.

@matt335672
Copy link
Member

Yes, client-side. The server monitors are not visible to xrdp.

@sjmgarnier
Copy link
Author

@matt335672 I unplugged my external monitor and rebooted both the client and server just in case. Still no luck.

@matt335672
Copy link
Member

That's not quite what I meant.

In the mstsc.exe settings dialogue what options to you have set here:-

image

Also, if you're using a .ini file to start the session can you post it after removing any passwords? They're encrypted anyway and specific to your machine, but it's not a good idea to make them public.

@sjmgarnier
Copy link
Author

sjmgarnier commented Nov 1, 2023

@matt335672 The client is a Mac computer using Microsoft's official client from the Mac app store (the server is on an Ubuntu 22.04 machine). The display settings of the client are in the image below.

Screenshot 2023-11-01 at 6 54 32 AM

@matt335672
Copy link
Member

Sorry - you already said that.

That's another similarity with #1367.

Can you untick the 'Fit session to window' box? I'm not hopeful, but there are definitely problems in this area.

@sjmgarnier
Copy link
Author

@matt335672 No luck here either. I went ahead and tried a combination of ticking and unticking all three top boxes and that didn't seem to help either.

@matt335672
Copy link
Member

I'm unable to reproduce this on 0.9.17 with a Windows 10 client.

I've installed totem, and I can play this rather dull video fine:-

/usr/share/texlive/texmf-dist/tex/latex/mwe/example-movie.mp4

Can you provide a link to a problematic video for me?

@matt335672
Copy link
Member

Looking a bit more closely, it appears you may be hitting this Xorg bug:-

https://gitlab.freedesktop.org/xorg/xserver/-/issues/1053

There's no mention of xorgxrdp in the stack trace in the Xorg log. Also, you're loading the glamor module, which my testbed isn't.

Can you have a look at neutrinolabs/xorgxrdp#241, and the changes to /etc/X11/xrdp/xorg.conf? Those changes won't be on your system, but it's worth trying them out.

@sjmgarnier
Copy link
Author

When I make these changes (all or in combination), all I get is a black screen. Also, to answer your previous question about Totem, it crashes the connection even when I call it directly from the app launcher.

In any case, I will attempt a full reinstall of this machine tomorrow (there is nothing critical on it yet), and I'll see if something radical like that resolves the issue.

@sjmgarnier
Copy link
Author

@matt335672 So, I did a fresh install of the server and tested along the way as I was adding to/configuring the system. It looks like the problem is somehow linked to adding my user to the "video" group. If my user is part of this group, then trying to launch related apps (e.g., Cheese) causes the session to just terminate. If I remove my user from the group "video", then all is good again but then I can't use apps requiring the user to be part of the "video" group.

@matt335672
Copy link
Member

That's a good bit of detective work.

  1. How does the application fail exactly?
  2. What do you get for sudo find /etc -group video -ls?

Also, I'm surprised that the X server is unable to open dev/dri/renderD128. I know your CPU is old, but mine is even older and it's got that What do you get for these commands:-

lsmod | grep i915
ls -l /dev/dri

@sjmgarnier
Copy link
Author

  1. How does the application fail exactly?

Hard to tell. As soon as I select the app in the app launcher, the remote session quits. If I try to reconnect, sometimes it opens up a fresh session like nothing had happened, sometimes it's just a black screen.

  1. What do you get for sudo find /etc -group video -ls?

Nothing.

Also, I'm surprised that the X server is unable to open dev/dri/renderD128. I know your CPU is old, but mine is even older and it's got that What do you get for these commands:-

lsmod | grep i915
ls -l /dev/dri
❯ lsmod | grep i915
i915                 3899392  11
drm_buddy              20480  1 i915
ttm                   110592  1 i915
drm_display_helper    212992  1 i915
cec                    94208  2 drm_display_helper,i915
drm_kms_helper        249856  2 drm_display_helper,i915
i2c_algo_bit           16384  1 i915
drm                   700416  9 drm_kms_helper,drm_display_helper,drm_buddy,i915,ttm
video                  73728  1 i915
❯ ls -l /dev/dri
total 0
drwxr-xr-x  2 root root         80 Nov  2 20:48 by-path
crw-rw----+ 1 root video  226,   0 Nov  2 20:48 card0
crw-rw----+ 1 root render 226, 128 Nov  2 20:48 renderD128

@matt335672
Copy link
Member

Sorry - I meant "how does the application fail when your user isn't in the video group?"

Try adding your user to the render group. That might help.

@sjmgarnier
Copy link
Author

@matt335672 Adding the user to the render group did help! Everything seems to be working now. I'll keep monitoring the situation but I think that we can close this issue now. Thanks for your help!

To answer your question (not sure it matters now), when the user is not in the video group, Totem returns a message saying it is unable to read the video and Cheese returns a message saying that it cannot find the webcam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants