xrdp icon indicating copy to clipboard operation
xrdp copied to clipboard

Debian 11 xrdp[210471]: segfault at 18 ip 0000561ea1f58cd7 sp 00007eff4f7fdb50 error 4 in xrdp[561ea1f3e000+29000]

Open itxworks opened this issue 11 months ago • 15 comments

xrdp version

0.10.80 - with REMOTE_CLIENT_IP Patch

Detailed xrdp version, build options

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

  Configure options:
      --enable-fuse
      --enable-jpeg
      --enable-rfxcodec
      --enable-mp3lame
      --enable-vsock
      --libexecdir=/usr/libexec

  Compiled with OpenSSL 1.1.1w  11 Sep 2023

Operating system & version

Debian 11 Linux - 5.10.0-26-amd64 #1 SMP Debian 5.10.197-1 (2023-09-29) x86_64 GNU/Linux

Installation method

git clone & make install

Which backend do you use?

HP Thinclient (FreeRDP)

What desktop environment do you use?

Cinnamon

Environment xrdp running on

vmware esxi

What's your client?

FreeRDP

Area(s) with issue?

Crashes such as segfault

Steps to reproduce

/var/log/messages:49473:Mar  6 16:57:09 hqlxterm09 kernel: [36616.492330] xrdp[210471]: segfault at 18 ip 0000561ea1f58cd7 sp 00007eff4f7fdb50 error 4 in xrdp[561ea1f3e000+29000]
/var/log/kern.log:50008:Mar  6 16:57:09 hqlxterm09 kernel: [36616.492330] xrdp[210471]: segfault at 18 ip 0000561ea1f58cd7 sp 00007eff4f7fdb50 error 4 in xrdp[561ea1f3e000+29000]
/var/log/syslog:82248:Mar  6 16:57:09 hqlxterm09 kernel: [36616.492330] xrdp[210471]: segfault at 18 ip 0000561ea1f58cd7 sp 00007eff4f7fdb50 error 4 in xrdp[561ea1f3e000+29000]

✔️ Expected Behavior

No response

❌ Actual Behavior

xrdp service crashed

Anything else?

No response

itxworks avatar Mar 06 '24 16:03 itxworks

@itxworks - can you provide a bit more info:-

  1. The git commit you're building.
  2. xrdp.log leading up to the segfault.

There's not enough info here to identify the problem.

Thanks.

matt335672 avatar Mar 06 '24 16:03 matt335672

Sorry!!!

grep -nr segfault /var/log/*
/var/log/messages:49473:Mar  6 16:57:09 hqlxterm09 kernel: [36616.492330] xrdp[210471]: segfault at 18 ip 0000561ea1f58cd7 sp 00007eff4f7fdb50 error 4 in xrdp[561ea1f3e000+29000]
/var/log/kern.log:50008:Mar  6 16:57:09 hqlxterm09 kernel: [36616.492330] xrdp[210471]: segfault at 18 ip 0000561ea1f58cd7 sp 00007eff4f7fdb50 error 4 in xrdp[561ea1f3e000+29000]
/var/log/syslog:82248:Mar  6 16:57:09 hqlxterm09 kernel: [36616.492330] xrdp[210471]: segfault at 18 ip 0000561ea1f58cd7 sp 00007eff4f7fdb50 error 4 in xrdp[561ea1f3e000+29000]
[2024-03-06T16:51:23.870+0100] [INFO ] Socket 192: connection accepted from 192.168.104.192:56270
[2024-03-06T16:51:23.875+0100] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem
[2024-03-06T16:51:23.878+0100] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem
[2024-03-06T16:51:23.883+0100] [INFO ] Security protocol: configured [RDP], requested [SSL|HYBRID|RDP], selected [RDP]
[2024-03-06T16:51:23.899+0100] [ERROR] libxrdp_force_read: header read error
[2024-03-06T16:51:23.901+0100] [ERROR] Processing [ITU-T T.125] Connect-Initial failed
[2024-03-06T16:51:23.904+0100] [ERROR] [MCS Connection Sequence] receive connection request failed
[2024-03-06T16:51:23.907+0100] [ERROR] xrdp_sec_incoming: xrdp_mcs_incoming failed
[2024-03-06T16:51:23.910+0100] [ERROR] xrdp_rdp_incoming: xrdp_sec_incoming failed
[2024-03-06T16:51:23.913+0100] [ERROR] xrdp_process_main_loop: libxrdp_process_incoming failed
[2024-03-06T16:51:23.915+0100] [ERROR] xrdp_iso_send: trans_write_copy_s failed
[2024-03-06T16:51:23.918+0100] [ERROR] Sending [ITU T.125] DisconnectProviderUltimatum failed
[2024-03-06T16:57:07.435+0100] [WARN ] No information is available to determine login screen DPI
[2024-03-06T16:57:07.438+0100] [WARN ] No DPI value is available to find login font
[2024-03-06T16:57:07.440+0100] [WARN ] Using the default_dpi of 96
[2024-03-06T17:13:05.428+0100] [INFO ] starting xrdp with pid 249229`
git log -n1
commit b6d4e9df4feb5ec3312bb60d877f797f07677efd (HEAD -> devel, origin/devel, origin/HEAD)
Merge: 5ccabaf7 90e4aca2
Author: metalefty <[email protected]>
Date:   Sun Mar 3 09:36:43 2024 +0900

    Merge pull request #2969 from matt335672/increase_gfx_buffer

    Increase GFX output buffer size
git clone https://github.com/neutrinolabs/xrdp.git --recursive
git clone https://github.com/neutrinolabs/xorgxrdp.git --recursive

patch xrdp/sesman/sesexec/env.c < patches/env.patch
patch xrdp/sesman/sesexec/session.c < patches/clientip.patch

cd xrdp
sudo ./bootstrap
sudo ./configure --enable-fuse --enable-jpeg --enable-rfxcodec --enable-mp3lame --enable-vsock --libexecdir=/usr/libexec
sudo make

itxworks avatar Mar 06 '24 16:03 itxworks

Thanks @itxworks

Sadly, it still doesn't give me enough to reproduce this. The biggest problem is I have no idea what your client is doing.

Are you in a position to do the following?

  1. Build without the patches. If these turn out to be the problem we can look at them later.
  2. Build with --enable-devel-all. This results in a slower build with more logging. It's handy for builds still being developed (which this one is).

That should tell us more about what's going on in xrdp.log.

Come back to me with the result. If there's still a problem I can tell you how to get a debugger attached so we can see exactly where the SEGV is happening.

I've got a small comment on your (well documented) build procedure above. You shouldn't need sudo for the bootstrap, configure and make stages. These should normally be done as an unprivileged user. You will of course need sudo for make install. This won't be having any effect on the result here, but it's just a good habit to get into.

matt335672 avatar Mar 07 '24 09:03 matt335672

@itxworks - do you still need help with this?

matt335672 avatar Mar 22 '24 17:03 matt335672

I am on vacation till next week - can I give you an feedback thereafter.. thx

itxworks avatar Mar 22 '24 18:03 itxworks

Yup - no rush. Enjoy your vacation!

matt335672 avatar Mar 22 '24 18:03 matt335672

Hello,

there are not much for this issue - found only those entries:

grep -nr segfault  /var/log/*.log
/var/log/kern.log:8614:Mar 20 13:30:01 hqlxterm10 kernel: [1178984.221808] xrdp[1941552]: segfault at 18 ip 0000563a07d551b8 sp 00007f48c37fdb50 error 4 in xrdp[563a07d3a000+29000]
/var/log/kern.log:11273:Mar 21 16:01:41 hqlxterm10 kernel: [57678.778639] xrdp[127529]: segfault at 18 ip 000056310d37e1b8 sp 00007f71377fdb50 error 4 in xrdp[56310d363000+29000]
/var/log/kern.log:12626:Mar 21 21:45:01 hqlxterm10 kernel: [17610.727115] x-session-manag[12614]: segfault at 55e600000009 ip 00007faad61c94ec sp 00007ffdae067180 error 4 in libc-2.31.so[7faad6169000+159000]
/var/log/kern.log:14308:Mar 22 08:44:23 hqlxterm10 kernel: [31445.133727] xrdp[49915]: segfault at 18 ip 000055761ce251b8 sp 00007fc0b5ffab50 error 4 in xrdp[55761ce0a000+29000]
/var/log/kern.log:29841:Mar 26 21:45:04 hqlxterm10 kernel: [78286.351237] x-session-manag[85619]: segfault at 8 ip 000055b5e098be28 sp 00007ffc3624fdb0 error 4 in cinnamon-session[55b5e096e000+30000]
/var/log/kern.log:39651:Mar 28 08:04:22 hqlxterm10 kernel: [29042.197157] xrdp[42018]: segfault at 18 ip 000056467dce1cd7 sp 00007f369effcb50 error 4 in xrdp[56467dcc7000+29000]

It helps to cleanup the /tmp/.X11-unix/ before restarting after the seqfault to avoid session limits ... ?

itxworks avatar Mar 28 '24 07:03 itxworks

@itxworks - can you rebuild as I asked in this comment? We can't do much with a segfault line on its own and an unknown source set.

matt335672 avatar Mar 28 '24 12:03 matt335672

I can compile with debug but do need the patches to test it with heavy load ... because within staging the segfault does not appear ...

itxworks avatar Mar 28 '24 13:03 itxworks

Doesn't that suggest the problem is with the patches?

Do you have a sequence of operations which is guaranteed to cause the segfault? We can work with that.

matt335672 avatar Mar 28 '24 15:03 matt335672

Can you work with this - happens a couple minutes ago ???

/var/log/messages:28857:Mar 28 16:08:06 hqlxterm05 kernel: [58069.024646] xrdp[261114]: segfault at 18 ip 000055e4a56591b8 sp 00007f520effcb50 error 4 in xrdp[55e4a563e000+29000]

grep -B 10 -A 10 'Mar 28 16:08:06' /var/log/* 

/var/log/daemon.log-Mar 28 16:07:03 hqlxterm05 xrdp[156562]: [ERROR] libxrdp_force_read: header read error
/var/log/daemon.log-Mar 28 16:07:03 hqlxterm05 xrdp[156562]: [ERROR] Processing [ITU-T T.125] Connect-Initial failed
/var/log/daemon.log-Mar 28 16:07:03 hqlxterm05 xrdp[156562]: [ERROR] [MCS Connection Sequence] receive connection request failed
/var/log/daemon.log-Mar 28 16:07:03 hqlxterm05 xrdp[156562]: [ERROR] xrdp_sec_incoming: xrdp_mcs_incoming failed
/var/log/daemon.log-Mar 28 16:07:03 hqlxterm05 xrdp[156562]: [ERROR] xrdp_rdp_incoming: xrdp_sec_incoming failed
/var/log/daemon.log-Mar 28 16:07:03 hqlxterm05 xrdp[156562]: [ERROR] xrdp_process_main_loop: libxrdp_process_incoming failed
/var/log/daemon.log-Mar 28 16:07:03 hqlxterm05 xrdp[156562]: [ERROR] xrdp_iso_send: trans_write_copy_s failed
/var/log/daemon.log-Mar 28 16:07:03 hqlxterm05 xrdp[156562]: [ERROR] Sending [ITU T.125] DisconnectProviderUltimatum failed
/var/log/daemon.log-Mar 28 16:07:09 hqlxterm05 systemd[1]: Started Session 766 of user root.
/var/log/daemon.log-Mar 28 16:07:09 hqlxterm05 systemd[1]: session-766.scope: Succeeded.
/var/log/daemon.log:Mar 28 16:08:06 hqlxterm05 systemd[1]: Started Process Core Dump (PID 269893/UID 0).
/var/log/daemon.log-Mar 28 16:08:07 hqlxterm05 PackageKit: get-updates transaction /89227_ddadeabe from uid 6111 finished with success after 365ms
/var/log/daemon.log-Mar 28 16:08:08 hqlxterm05 systemd[1]: [email protected]: Succeeded.
/var/log/daemon.log-Mar 28 16:08:08 hqlxterm05 xrdp-sesman[264994]: rdpClientConRecv: g_sck_recv failed(returned 0)
/var/log/daemon.log-Mar 28 16:08:08 hqlxterm05 xrdp-sesman[257451]: rdpClientConRecv: g_sck_recv failed(returned 0)
/var/log/daemon.log-Mar 28 16:08:08 hqlxterm05 xrdp-sesman[257451]: rdpClientConRecvMsg: error
/var/log/daemon.log-Mar 28 16:08:08 hqlxterm05 xrdp-sesman[257451]: rdpClientConCheck: rdpClientConGotData failed
/var/log/daemon.log-Mar 28 16:08:08 hqlxterm05 systemd[1]: xrdp.service: Main process exited, code=killed, status=11/SEGV
/var/log/daemon.log-Mar 28 16:08:08 hqlxterm05 xrdp-sesexec[261116]: [ERROR] Error reading libipm transport
/var/log/daemon.log-Mar 28 16:08:08 hqlxterm05 xrdp[156562]: rfxcodec_encode_create: got
/var/log/daemon.log-Mar 28 16:08:08 hqlxterm05 systemd[1]: xrdp.service: Failed with result 'signal'.
--
/var/log/kern.log-Mar 28 16:05:35 hqlxterm05 kernel: [57918.552490] audit: type=1400 audit(1711638335.688:511): apparmor="ALLOWED" operation="exec" profile="libreoffice-soffice" name="/usr/bin/file" pid=269701 comm="soffice.bin" requested_mask="x" denied_mask="x" fsuid=7146 ouid=0 target="libreoffice-soffice//null-/usr/bin/file"
/var/log/kern.log-Mar 28 16:05:35 hqlxterm05 kernel: [57918.560004] audit: type=1400 audit(1711638335.696:512): apparmor="ALLOWED" operation="file_inherit" profile="libreoffice-soffice//null-/usr/bin/file" name="/dev/null" pid=269701 comm="file" requested_mask="wr" denied_mask="wr" fsuid=7146 ouid=0
/var/log/kern.log-Mar 28 16:05:35 hqlxterm05 kernel: [57918.560043] audit: type=1400 audit(1711638335.696:513): apparmor="ALLOWED" operation="file_mmap" profile="libreoffice-soffice//null-/usr/bin/file" name="/usr/bin/file" pid=269701 comm="file" requested_mask="r" denied_mask="r" fsuid=7146 ouid=0
/var/log/kern.log-Mar 28 16:05:35 hqlxterm05 kernel: [57918.560103] audit: type=1400 audit(1711638335.696:514): apparmor="ALLOWED" operation="file_mmap" profile="libreoffice-soffice//null-/usr/bin/file" name="/usr/lib/x86_64-linux-gnu/ld-2.31.so" pid=269701 comm="file" requested_mask="r" denied_mask="r" fsuid=7146 ouid=0
/var/log/kern.log-Mar 28 16:05:35 hqlxterm05 kernel: [57918.560775] audit: type=1400 audit(1711638335.696:515): apparmor="ALLOWED" operation="open" profile="libreoffice-soffice//null-/usr/bin/file" name="/etc/ld.so.cache" pid=269701 comm="file" requested_mask="r" denied_mask="r" fsuid=7146 ouid=0
/var/log/kern.log-Mar 28 16:05:35 hqlxterm05 kernel: [57918.560833] audit: type=1400 audit(1711638335.696:516): apparmor="ALLOWED" operation="open" profile="libreoffice-soffice//null-/usr/bin/file" name="/usr/lib/x86_64-linux-gnu/libmagic.so.1.0.0" pid=269701 comm="file" requested_mask="r" denied_mask="r" fsuid=7146 ouid=0
/var/log/kern.log-Mar 28 16:05:35 hqlxterm05 kernel: [57918.560886] audit: type=1400 audit(1711638335.696:517): apparmor="ALLOWED" operation="file_mmap" profile="libreoffice-soffice//null-/usr/bin/file" name="/usr/lib/x86_64-linux-gnu/libmagic.so.1.0.0" pid=269701 comm="file" requested_mask="rm" denied_mask="rm" fsuid=7146 ouid=0
/var/log/kern.log-Mar 28 16:05:35 hqlxterm05 kernel: [57918.560982] audit: type=1400 audit(1711638335.696:518): apparmor="ALLOWED" operation="open" profile="libreoffice-soffice//null-/usr/bin/file" name="/usr/lib/x86_64-linux-gnu/libc-2.31.so" pid=269701 comm="file" requested_mask="r" denied_mask="r" fsuid=7146 ouid=0
/var/log/kern.log-Mar 28 16:05:35 hqlxterm05 kernel: [57918.561023] audit: type=1400 audit(1711638335.696:519): apparmor="ALLOWED" operation="file_mmap" profile="libreoffice-soffice//null-/usr/bin/file" name="/usr/lib/x86_64-linux-gnu/libc-2.31.so" pid=269701 comm="file" requested_mask="rm" denied_mask="rm" fsuid=7146 ouid=0
/var/log/kern.log-Mar 28 16:05:35 hqlxterm05 kernel: [57918.561168] audit: type=1400 audit(1711638335.696:520): apparmor="ALLOWED" operation="open" profile="libreoffice-soffice//null-/usr/bin/file" name="/usr/lib/x86_64-linux-gnu/libbz2.so.1.0.4" pid=269701 comm="file" requested_mask="r" denied_mask="r" fsuid=7146 ouid=0
/var/log/kern.log:Mar 28 16:08:06 hqlxterm05 kernel: [58069.024639] show_signal_msg: 6 callbacks suppressed
/var/log/kern.log:Mar 28 16:08:06 hqlxterm05 kernel: [58069.024646] xrdp[261114]: segfault at 18 ip 000055e4a56591b8 sp 00007f520effcb50 error 4 in xrdp[55e4a563e000+29000]
/var/log/kern.log:Mar 28 16:08:06 hqlxterm05 kernel: [58069.024671] Code: 31 c9 be 8c 00 00 00 48 8b 85 e0 08 00 00 41 81 e0 ff 01 00 00 48 63 8d a8 04 00 00 48 63 95 a4 04 00 00 48 8b 40 60 48 89 c7 <ff> 50 18 45 85 e4 0f 85 a3 fd ff ff e9 8f f9 ff ff b8 08 00 00 00
--
/var/log/messages-Mar 28 16:05:35 hqlxterm05 kernel: [57918.552490] audit: type=1400 audit(1711638335.688:511): apparmor="ALLOWED" operation="exec" profile="libreoffice-soffice" name="/usr/bin/file" pid=269701 comm="soffice.bin" requested_mask="x" denied_mask="x" fsuid=7146 ouid=0 target="libreoffice-soffice//null-/usr/bin/file"
/var/log/messages-Mar 28 16:05:35 hqlxterm05 kernel: [57918.560004] audit: type=1400 audit(1711638335.696:512): apparmor="ALLOWED" operation="file_inherit" profile="libreoffice-soffice//null-/usr/bin/file" name="/dev/null" pid=269701 comm="file" requested_mask="wr" denied_mask="wr" fsuid=7146 ouid=0
/var/log/messages-Mar 28 16:05:35 hqlxterm05 kernel: [57918.560043] audit: type=1400 audit(1711638335.696:513): apparmor="ALLOWED" operation="file_mmap" profile="libreoffice-soffice//null-/usr/bin/file" name="/usr/bin/file" pid=269701 comm="file" requested_mask="r" denied_mask="r" fsuid=7146 ouid=0
/var/log/messages-Mar 28 16:05:35 hqlxterm05 kernel: [57918.560103] audit: type=1400 audit(1711638335.696:514): apparmor="ALLOWED" operation="file_mmap" profile="libreoffice-soffice//null-/usr/bin/file" name="/usr/lib/x86_64-linux-gnu/ld-2.31.so" pid=269701 comm="file" requested_mask="r" denied_mask="r" fsuid=7146 ouid=0
/var/log/messages-Mar 28 16:05:35 hqlxterm05 kernel: [57918.560775] audit: type=1400 audit(1711638335.696:515): apparmor="ALLOWED" operation="open" profile="libreoffice-soffice//null-/usr/bin/file" name="/etc/ld.so.cache" pid=269701 comm="file" requested_mask="r" denied_mask="r" fsuid=7146 ouid=0
/var/log/messages-Mar 28 16:05:35 hqlxterm05 kernel: [57918.560833] audit: type=1400 audit(1711638335.696:516): apparmor="ALLOWED" operation="open" profile="libreoffice-soffice//null-/usr/bin/file" name="/usr/lib/x86_64-linux-gnu/libmagic.so.1.0.0" pid=269701 comm="file" requested_mask="r" denied_mask="r" fsuid=7146 ouid=0
/var/log/messages-Mar 28 16:05:35 hqlxterm05 kernel: [57918.560886] audit: type=1400 audit(1711638335.696:517): apparmor="ALLOWED" operation="file_mmap" profile="libreoffice-soffice//null-/usr/bin/file" name="/usr/lib/x86_64-linux-gnu/libmagic.so.1.0.0" pid=269701 comm="file" requested_mask="rm" denied_mask="rm" fsuid=7146 ouid=0
/var/log/messages-Mar 28 16:05:35 hqlxterm05 kernel: [57918.560982] audit: type=1400 audit(1711638335.696:518): apparmor="ALLOWED" operation="open" profile="libreoffice-soffice//null-/usr/bin/file" name="/usr/lib/x86_64-linux-gnu/libc-2.31.so" pid=269701 comm="file" requested_mask="r" denied_mask="r" fsuid=7146 ouid=0
/var/log/messages-Mar 28 16:05:35 hqlxterm05 kernel: [57918.561023] audit: type=1400 audit(1711638335.696:519): apparmor="ALLOWED" operation="file_mmap" profile="libreoffice-soffice//null-/usr/bin/file" name="/usr/lib/x86_64-linux-gnu/libc-2.31.so" pid=269701 comm="file" requested_mask="rm" denied_mask="rm" fsuid=7146 ouid=0
/var/log/messages-Mar 28 16:05:35 hqlxterm05 kernel: [57918.561168] audit: type=1400 audit(1711638335.696:520): apparmor="ALLOWED" operation="open" profile="libreoffice-soffice//null-/usr/bin/file" name="/usr/lib/x86_64-linux-gnu/libbz2.so.1.0.4" pid=269701 comm="file" requested_mask="r" denied_mask="r" fsuid=7146 ouid=0
/var/log/messages:Mar 28 16:08:06 hqlxterm05 kernel: [58069.024639] show_signal_msg: 6 callbacks suppressed
/var/log/messages:Mar 28 16:08:06 hqlxterm05 kernel: [58069.024646] xrdp[261114]: segfault at 18 ip 000055e4a56591b8 sp 00007f520effcb50 error 4 in xrdp[55e4a563e000+29000]
/var/log/messages:Mar 28 16:08:06 hqlxterm05 kernel: [58069.024671] Code: 31 c9 be 8c 00 00 00 48 8b 85 e0 08 00 00 41 81 e0 ff 01 00 00 48 63 8d a8 04 00 00 48 63 95 a4 04 00 00 48 8b 40 60 48 89 c7 <ff> 50 18 45 85 e4 0f 85 a3 fd ff ff e9 8f f9 ff ff b8 08 00 00 00
/var/log/messages-Mar 28 16:08:11 hqlxterm05 accounts-daemon[1179]: Could not talk to message bus to find uid of sender :1.4303: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not get UID of name ':1.4303': no such name
/var/log/messages-Mar 28 16:08:11 hqlxterm05 accounts-daemon[1179]: Could not talk to message bus to find uid of sender :1.3822: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not get UID of name ':1.3822': no such name
/var/log/messages-Mar 28 16:08:11 hqlxterm05 accounts-daemon[1179]: Could not talk to message bus to find uid of sender :1.3485: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not get UID of name ':1.3485': no such name
/var/log/messages-Mar 28 16:08:11 hqlxterm05 accounts-daemon[1179]: Could not talk to message bus to find uid of sender :1.3127: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not get UID of name ':1.3127': no such name
--
/var/log/syslog-Mar 28 16:07:03 hqlxterm05 xrdp[156562]: [ERROR] libxrdp_force_read: header read error
/var/log/syslog-Mar 28 16:07:03 hqlxterm05 xrdp[156562]: [ERROR] Processing [ITU-T T.125] Connect-Initial failed
/var/log/syslog-Mar 28 16:07:03 hqlxterm05 xrdp[156562]: [ERROR] [MCS Connection Sequence] receive connection request failed
/var/log/syslog-Mar 28 16:07:03 hqlxterm05 xrdp[156562]: [ERROR] xrdp_sec_incoming: xrdp_mcs_incoming failed
/var/log/syslog-Mar 28 16:07:03 hqlxterm05 xrdp[156562]: [ERROR] xrdp_rdp_incoming: xrdp_sec_incoming failed
/var/log/syslog-Mar 28 16:07:03 hqlxterm05 xrdp[156562]: [ERROR] xrdp_process_main_loop: libxrdp_process_incoming failed
/var/log/syslog-Mar 28 16:07:03 hqlxterm05 xrdp[156562]: [ERROR] xrdp_iso_send: trans_write_copy_s failed
/var/log/syslog-Mar 28 16:07:03 hqlxterm05 xrdp[156562]: [ERROR] Sending [ITU T.125] DisconnectProviderUltimatum failed
/var/log/syslog-Mar 28 16:07:09 hqlxterm05 systemd[1]: Started Session 766 of user root.
/var/log/syslog-Mar 28 16:07:09 hqlxterm05 systemd[1]: session-766.scope: Succeeded.
/var/log/syslog:Mar 28 16:08:06 hqlxterm05 kernel: [58069.024639] show_signal_msg: 6 callbacks suppressed
/var/log/syslog:Mar 28 16:08:06 hqlxterm05 kernel: [58069.024646] xrdp[261114]: segfault at 18 ip 000055e4a56591b8 sp 00007f520effcb50 error 4 in xrdp[55e4a563e000+29000]
/var/log/syslog:Mar 28 16:08:06 hqlxterm05 kernel: [58069.024671] Code: 31 c9 be 8c 00 00 00 48 8b 85 e0 08 00 00 41 81 e0 ff 01 00 00 48 63 8d a8 04 00 00 48 63 95 a4 04 00 00 48 8b 40 60 48 89 c7 <ff> 50 18 45 85 e4 0f 85 a3 fd ff ff e9 8f f9 ff ff b8 08 00 00 00
/var/log/syslog:Mar 28 16:08:06 hqlxterm05 systemd[1]: Started Process Core Dump (PID 269893/UID 0).
/var/log/syslog-Mar 28 16:08:07 hqlxterm05 PackageKit: get-updates transaction /89227_ddadeabe from uid 6111 finished with success after 365ms
/var/log/syslog-Mar 28 16:08:08 hqlxterm05 systemd-coredump[269894]: Process 156562 (xrdp) of user 0 dumped core.#012#012Stack trace of thread 261114:#012#0  0x000055e4a56591b8 n/a (xrdp + 0x1f1b8)#012#1  0x00007f52497535ef xrdp_fastpath_process_input_event (libxrdp.so.0 + 0x135ef)#012#2  0x00007f52497462f1 libxrdp_process_data (libxrdp.so.0 + 0x62f1)#012#3  0x000055e4a5653adb n/a (xrdp + 0x19adb)#012#4  0x000055e4a5653baa n/a (xrdp + 0x19baa)#012#5  0x00007f524978eb7c trans_check_wait_objs (libcommon.so.0 + 0x13b7c)#012#6  0x000055e4a5653f78 n/a (xrdp + 0x19f78)#012#7  0x000055e4a5646c47 n/a (xrdp + 0xcc47)#012#8  0x00007f5249532ea7 start_thread (libpthread.so.0 + 0x7ea7)#012#9  0x00007f5249648a6f __clone (libc.so.6 + 0xfba6f)#012#012Stack trace of thread 169814:#012#0  0x00007f524963c9af __poll (libc.so.6 + 0xef9af)#012#1  0x00007f524978986d g_obj_wait (libcommon.so.0 + 0xe86d)#012#2  0x000055e4a5653ff6 n/a (xrdp + 0x19ff6)#012#3  0x000055e4a5646c47 n/a (xrdp + 0xcc47)#012#4  0x00007f5249532ea7 start_thread (libpthread.so.0 + 0x7ea7)#012#5  0x00007f5249648a6f __clone (libc.so.6 + 0xfba6f)#012#012Stack trace of thread 160185:#012#0  0x00007f524963c9af __poll (libc.so.6 + 0xef9af)#012#1  0x00007f524978986d g_obj_wait (libcommon.so.0 + 0xe86d)#012#2  0x000055e4a5653ff6 n/a (xrdp + 0x19ff6)#012#3  0x000055e4a5646c47 n/a (xrdp + 0xcc47)#012#4  0x00007f5249532ea7 start_thread (libpthread.so.0 + 0x7ea7)#012#5  0x00007f5249648a6f __clone (libc.so.6 + 0xfba6f)#012#012Stack trace of thread 157760:#012#0  0x00007f524963c9af __poll (libc.so.6 + 0xef9af)#012#1  0x00007f524978986d g_obj_wait (libcommon.so.0 + 0xe86d)#012#2  0x000055e4a5645513 n/a (xrdp + 0xb513)#012#3  0x000055e4a56455be n/a (xrdp + 0xb5be)#012#4  0x00007f5249532ea7 start_thread (libpthread.so.0 + 0x7ea7)#012#5  0x00007f5249648a6f __clone (libc.so.6 + 0xfba6f)#012#012Stack trace of thread 157759:#012#0  0x00007f524963c9af __poll (libc.so.6 + 0xef9af)#012#1  0x00007f524978986d g_obj_wait (libcommon.so.0 + 0xe86d)#012#2  0x000055e4a5653ff6 n/a (xrdp + 0x19ff6)#012#3  0x000055e4a5646c47 n/a (xrdp + 0xcc47)#012#4  0x00007f5249532ea7 start_thread (libpthread.so.0 + 0x7ea7)#012#5  0x00007f5249648a6f __clone (libc.so.6 + 0xfba6f)#012#012Stack trace of thread 169815:#012#0  0x00007f524963c9af __poll (libc.so.6 + 0xef9af)#012#1  0x00007f524978986d g_obj_wait (libcommon.so.0 + 0xe86d)#012#2  0x000055e4a5645513 n/a (xrdp + 0xb513)#012#3  0x000055e4a56455be n/a (xrdp + 0xb5be)#012#4  0x00007f5249532ea7 start_thread (libpthread.so.0 + 0x7ea7)#012#5  0x00007f5249648a6f __clone (libc.so.6 + 0xfba6f)#012#012Stack trace of thread 156562:#012#0  0x00007f524963c9af __poll (libc.so.6 + 0xef9af)#012#1  0x00007f524978986d g_obj_wait (libcommon.so.0 + 0xe86d)#012#2  0x000055e4a5647d8e n/a (xrdp + 0xdd8e)#012#3  0x000055e4a563f12a n/a (xrdp + 0x512a)#012#4  0x00007f5249570d0a __libc_start_main (libc.so.6 + 0x23d0a)#012#5  0x000055e4a563f8ea n/a (xrdp + 0x58ea)#012#012Stack trace of thread 223507:#012#0  0x00007f524963c9af __poll (libc.so.6 + 0xef9af)#012#1  0x00007f524978986d g_obj_wait (libcommon.so.0 + 0xe86d)#012#2  0x000055e4a5653ff6 n/a (xrdp + 0x19ff6)#012#3  0x000055e4a5646c47 n/a (xrdp + 0xcc47)#012#4  0x00007f5249532ea7 start_thread (libpthread.so.0 + 0x7ea7)#012#5  0x00007f5249648a6f __clone (libc.so.6 + 0xfba6f)#012#012Stack trace of thread 199848:#012#0  0x00007f524963c9af __poll (libc.so.6 + 0xef9af)#012#1  0x00007f524978986d g_obj_wait (libcommon.so.0 + 0xe86d)#012#2  0x000055e4a5645513 n/a (xrdp + 0xb513)#012#3  0x000055e4a56455be n/a (xrdp + 0xb5be)#012#4  0x00007f5249532ea7 start_thread (libpthread.so.0 + 0x7ea7)#012#5  0x00007f5249648a6f __clone (libc.so.6 + 0xfba6f)#012#012Stack trace of thread 180587:#012#0  0x00007f524963c9af __poll (libc.so.6 + 0xef9af)#012#1  0x00007f524978986d g_obj_wait (libcommon.so.0 + 0xe86d)#012#2  0x000055e4a5653ff6 n/a (xrdp + 0x19ff6)#012#3  0x000055e4a5646c47 n/a (xrdp + 0xcc47)#012#4  0x00007f5249532ea7 start_thread (libpthread.so.0 + 0x7ea7)#012#5  0x00007f5249648a6f __clone (libc.so.6 + 0xfba6f)#012#012Stack trace of thread 162968:#012#0  0x00007f524963c9af __poll (libc.so.6 + 0xef9af)#012#1  0x00007f524978986d g_obj_wait (libcommon.so.0 + 0xe86d)#012#2  0x000055e4a5645513 n/a (xrdp + 0xb513)#012#3  0x000055e4a56455be n/a (xrdp + 0xb5be)#012#4  0x00007f5249532ea7 start_thread (libpthread.so.0 + 0x7ea7)#012#5  0x00007f5249648a6f __clone (libc.so.6 + 0xfba6f)#012#012Stack trace of thread 252746:#012#0  0x00007f524963c9af __poll (libc.so.6 + 0xef9af)#012#1  0x00007f524978986d g_obj_wait (libcommon.so.0 + 0xe86d)#012#2  0x000055e4a5645513 n/a (xrdp + 0xb513)#012#3  0x000055e4a56455be n/a (xrdp + 0xb5be)#012#4  0x00007f5249532ea7 start_thread (libpthread.so.0 + 0x7ea7)#012#5  0x00007f5249648a6f __clone (libc.so.6 + 0xfba6f)#012#012Stack trace of thread 162967:#012#0  0x00007f524963c9af __poll (libc.so.6 + 0xef9af)#012#1  0x00007f524978986d g_obj_wait (libcommon.so.0 + 0xe86d)#012#2  0x000055e4a5653ff6 n/a (xrdp + 0x19ff6)#012#3  0x000055e4a5646c47 n/a (xrdp + 0xcc47)#012#4  0x00007f5249532ea7 start_thread (libpthread.so.0 + 0x7ea7)#012#5  0x00007f5249648a6f __clone (libc.so.6 + 0xfba6f)#012#012Stack trace of thread 173436:#012#0  0x00007f524963c9af __poll (libc.so.6 + 0xef9af)#012#1  0x00007f524978986d g_obj_wait (libcommon.so.0 + 0xe86d)#012#2  0x000055e4a5653ff6 n/a (xrdp + 0x19ff6)#012#3  0x000055e4a5646c47 n/a (xrdp + 0xcc47)#012#4  0x00007f5249532ea7 start_thread (libpthread.so.0 + 0x7ea7)#012#5  0x00007f5249648a6f __clone (libc.so.6 + 0xfba6f)#012#012Stack trace of thread 193560:#012#0  0x00007f524963c9af __poll (libc.so.6 + 0xef9af)#012#1  0x00007f524978986d g_obj_wait (libcommon.so.0 + 0xe86d)#012#2  0x000055e4a5653ff6 n/a (xrdp + 0x19ff6)#012#3  0x000055e4a5646c47 n/a (xrdp + 0xcc47)#012#4  0x00007f5249532ea7 start_thread (libpthread.so.0 + 0x7ea7)#012#5  0x00007f5249648a6f __clone (libc.so.6 + 0xfba6f)#012#012Stack trace of thread 257385:#012#0  0x00007f524963c9af __poll (libc.so.6 + 0xef9af)#012#1  0x00007f524978986d g_obj_wait (libcommon.so.0 + 0xe86d)#012#2  0x000055e4a5653ff6 n/a (xrdp + 0x19ff6)#012#3  0x000055e4a5646c47 n/a (xrdp + 0xcc47)#012#4  0x00007f5249532ea7 start_thread (libpthread.so.0 + 0x7ea7)#012#5  0x00007f5249648a6f __clone (libc.so.6 + 0xfba6f)#012#012Stack trace of thread 264929:#012#0  0x00007f524963c9af __poll (libc.so.6 + 0xef9af)#012#1  0x00007f524978986d g_obj_wait (libcommon.so.0 + 0xe86d)#012#2  0x000055e4a5653ff6 n/a (xrdp + 0x19ff6)#012#3  0x000055e4a5646c47 n/a (xrdp + 0xcc47)#012#4  0x00007f5249532ea7 start_thread (libpthread.so.0 + 0x7ea7)#012#5  0x00007f5249648a6f __clone (libc.so.6 + 0xfba6f)#012#012Stack trace of thread 173437:#012#0  0x00007f524963c9af __poll (libc.so.6 + 0xef9af)#012#1  0x00007f524978986d g_obj_wait (libcommon.so.0 + 0xe86d)#012#2  0x000055e4a5645513 n/a (xrdp + 0xb513)#012#3  0x000055e4a56455be n/a (xrdp + 0xb5be)#012#4  0x00007f5249532ea7 start_thread (libpthread.so.0 + 0x7ea7)#012#5  0x00007f5249648a6f __clone (libc.so.6 + 0xfba6f)#012#012Stack trace of thread 183756:#012#0  0x00007f524963c9af __poll (libc.so.6 + 0xef9af)#012#1  0x00007f524978986d g_obj_wait (libcommon.so.0 + 0xe86d)#012#2  0x000055e4a5653ff6 n/a (xrdp + 0x19ff6)#012#3  0x000055e4a5646c47 n/a (xrdp + 0xcc47)#012#4  0x00007f5249532ea7 start_thread (libpthread.so.0 + 0x7ea7)#012#5  0x00007f5249648a6f __clone (libc.so.6 + 0xfba6f)#012#012Stack trace of thread 261115:#012#0  0x00007f524963c9af __poll (libc.so.6 + 0xef9af)#012#1  0x00007f524978986d g_obj_wait (libcommon.so.0 + 0xe86d)#012#2  0x000055e4a5645513 n/a (xrdp + 0xb513)#012#3  0x000055e4a56455be n/a (xrdp + 0xb5be)#012#4  0x00007f5249532ea7 start_thread (libpthread.so.0 + 0x7ea7)#012#5  0x00007f5249648a6f __clone (libc.so.6 + 0xfba6f)#012#012Stack trace of thread 232583:#012#0  0x00007f524963c9af __poll (libc.so.6 + 0xef9af)#012#1  0x00007f524978986d g_obj_wait (libcommon.so.0 + 0xe86d)#012#2  0x000055e4a5645513 n/a (xrdp + 0xb513)#012#3  0x000055e4a56455be n/a (xrdp + 0xb5be)#012#4  0x00007f5249532ea7 start_thread (libpthread.so.0 + 0x7ea7)#012#5  0x00007f5249648a6f __clone (libc.so.6 + 0xfba6
/var/log/syslog-Mar 28 16:08:08 hqlxterm05 systemd[1]: [email protected]: Succeeded.
/var/log/syslog-Mar 28 16:08:08 hqlxterm05 xrdp-sesman[264994]: rdpClientConRecv: g_sck_recv failed(returned 0)
/var/log/syslog-Mar 28 16:08:08 hqlxterm05 xrdp-sesman[257451]: rdpClientConRecv: g_sck_recv failed(returned 0)
/var/log/syslog-Mar 28 16:08:08 hqlxterm05 xrdp-sesman[257451]: rdpClientConRecvMsg: error
/var/log/syslog-Mar 28 16:08:08 hqlxterm05 xrdp-sesman[257451]: rdpClientConCheck: rdpClientConGotData failed
/var/log/syslog-Mar 28 16:08:08 hqlxterm05 systemd[1]: xrdp.service: Main process exited, code=killed, status=11/SEGV
/var/log/syslog-Mar 28 16:08:08 hqlxterm05 xrdp-sesexec[261116]: [ERROR] Error reading libipm transport
/var/log/syslog-Mar 28 16:08:08 hqlxterm05 xrdp[156562]: rfxcodec_encode_create: got

itxworks avatar Mar 28 '24 16:03 itxworks

That's great.

However, as you've installed patches you're going to have to read the coredump yourself - I can't do that here.

  1. Install gdb
  2. Unzip your core file
  3. Run the command gdb /usr/local/sbin/xrdp <corefile>. If you've installed xrdp elsewhere, use that path instead.
  4. At the prompt, type where. You should get a stacktrace showing you exactly where the SEGV was taken.

I can't see anything extra useful in the log I'm afraid.

matt335672 avatar Mar 28 '24 17:03 matt335672

OK - Sorry!

Can you work with this?

Core was generated by `/usr/local/sbin/xrdp --nodaemon'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000055e4a56591b8 in ?? ()
[Current thread is 1 (Thread 0x7f520effd700 (LWP 261114))]
(gdb) where
#0  0x000055e4a56591b8 in ?? ()
#1  0x00007f52497535ef in xrdp_fastpath_process_input_event () from /usr/local/lib/xrdp/libxrdp.so.0
#2  0x00007f52497462f1 in libxrdp_process_data () from /usr/local/lib/xrdp/libxrdp.so.0
#3  0x000055e4a5653adb in ?? ()
#4  0x000055e4a5653baa in ?? ()
#5  0x00007f524978eb7c in trans_check_wait_objs () from /usr/local/lib/xrdp/libcommon.so.0
#6  0x000055e4a5653f78 in ?? ()
#7  0x000055e4a5646c47 in ?? ()
#8  0x00007f5249532ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
#9  0x00007f5249648a6f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

itxworks avatar Mar 28 '24 19:03 itxworks

Nearly!

You've got some methods visible in the stack trace, but not all. You're also missing source information.

Rebuild everything with --enable-devel-all - this enables a debug build. Then do a make and sudo make install as normal.

You can check the xrdp executable is built with debug data by using the file command:-

$ file /usr/local/sbin/xrdp
/usr/local/sbin/xrdp: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV),  . . . with debug_info, not stripped

The debug data lets you see exactly in the code where the signal was taken. On my devel system, if I run xrdp under the debugger and send it a SEGV I get something like the following:-

(gdb) where
#0  0x00007ffff7b18b97 in __GI___poll (fds=fds@entry=0x7fffffffd400, 
    nfds=nfds@entry=5, timeout=timeout@entry=-1)
    at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007ffff7fa850f in g_obj_wait (
    read_objs=read_objs@entry=0x7fffffffdc70, rcount=5, 
    write_objs=write_objs@entry=0x0, wcount=wcount@entry=0, 
    mstimeout=mstimeout@entry=-1) at os_calls.c:2025
#2  0x0000555555569f76 in xrdp_listen_main_loop (self=0x5555555c75a0)
    at xrdp_listen.c:932
#3  0x000055555555bdb7 in main (argc=2, argv=0x7fffffffe438) at xrdp.c:581

You can see there's a lot more information available, including source files and lines.

matt335672 avatar Mar 29 '24 10:03 matt335672