Created attachment 205250 [details] log of crashing Xorg Trying to use xrdp with the xorgxrdp driver, the X server segfaults on startup. uname -a: FreeBSD greg.home.palmen-it.de 12.0-RELEASE-p4 FreeBSD 12.0-RELEASE-p4 #1 r347608M: Wed May 15 11:23:38 CEST 2019 root@vmhost:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 xrdp: 0.9.10_2,1 xorgxrdp: 0.2.10 Xorg.log (excerpt): [3157239.885] rdpRRSetRdpOutputs: add output 0 left 0 top 0 width 1600 height 960 [3157239.885] rdpLoadLayout: keylayout 0x00000407 variant display 12 [3157239.916] rdpkeybChangeKeyboardControl: [3157239.916] rdpkeybChangeKeyboardControl: autoRepeat on [3157239.917] rdpkeybChangeKeyboardControl: [3157239.917] rdpkeybChangeKeyboardControl: autoRepeat on [3157239.921] (EE) [3157239.922] (EE) Backtrace: [3157239.926] (EE) 0: /usr/local/bin/Xorg (?+0x0) [0x40ebc0] [3157239.990] (EE) 1: /lib/libthr.so.3 (?+0x0) [0x8009fb3e0] [3157239.994] (EE) 2: /lib/libthr.so.3 (?+0x0) [0x8009fa8e0] [3157239.997] (EE) 3: ? (?+0x0) [0x7ffffffff193] [3157240.001] (EE) 4: /usr/local/lib/xorg/modules/libxorgxrdp.so (?+0x0) [0x8019d0450] [3157240.004] (EE) 5: /usr/local/lib/xorg/modules/libxorgxrdp.so (?+0x0) [0x8019ceb70] [3157240.008] (EE) 6: /usr/local/lib/xorg/modules/libxorgxrdp.so (?+0x0) [0x8019cd9f0] [3157240.011] (EE) 7: /usr/local/lib/xorg/modules/libxorgxrdp.so (?+0x0) [0x8019cccf0] [3157240.014] (EE) 8: /usr/local/bin/Xorg (?+0x0) [0x406070] [3157240.018] (EE) 9: /usr/local/bin/Xorg (?+0x0) [0x285e70] [3157240.021] (EE) 10: /usr/local/bin/Xorg (?+0x0) [0x290450] [3157240.025] (EE) 11: /usr/local/bin/Xorg (?+0x0) [0x279000] [3157240.028] (EE) 12: ? (?+0x0) [0x80044b000] [3157240.028] (EE) [3157240.028] (EE) Segmentation fault at address 0xffffffffffffffff I'm attaching the full log just in case.
Is it installed by pkg? built from ports?
It's built from ports using poudriere. No special options are set, but I have a global DEFAULT_VERSIONS+= ssl=libressl samba=4.8 php=7.2 pgsql=10 linux=c7
I now tried building with x11-drivers_xorgxrdp_SET+= DEBUG but the stacktrace gets worse: [3159592.537] (EE) Backtrace: [3159592.542] (EE) 0: ? (?+0xf4d090) [0x80135bc50] [3159592.546] (EE) 1: ? (?+0xf4d090) [0x1001948470] [3159592.550] (EE) 2: ? (?+0xf4d090) [0x1001947970] [3159592.554] (EE) 3: ? (?+0xf4d090) [0x800800f4c223] [3159592.558] (EE) 4: ? (?+0xf4d090) [0x100291f710] [3159592.561] (EE) 5: ? (?+0xf4d090) [0x100291dc60] [3159592.565] (EE) 6: ? (?+0xf4d090) [0x100291ca40] [3159592.569] (EE) 7: ? (?+0xf4d090) [0x100291bb20] [3159592.572] (EE) 8: ? (?+0xf4d090) [0x801353100] [3159592.576] (EE) 9: ? (?+0xf4d090) [0x8011d2f00] [3159592.580] (EE) 10: ? (?+0xf4d090) [0x8011dd4e0] [3159592.583] (EE) 11: ? (?+0xf4d090) [0x8011c6090] [3159592.587] (EE) 12: ? (?+0xf4d090) [0x1001398090] [3159592.587] (EE) [3159592.587] (EE) Segmentation fault at address 0xffffffffffffffff Do I need to build any other packages with debugging as well to get a meaningful stacktrace here?
(In reply to Felix Palmen from comment #3) Yes, the stacktrace is not helpful yet.
(In reply to Koichiro Iwao from comment #4) I see that of course ;) Any hint how I could get a useful one? Enabling DEBUG on xorgxrdp made it worse (not even showing filenames any more), and x11-servers/xorg-server doesn't have a DEBUG knob. Am I looking in the wrong place?
(In reply to Felix Palmen from comment #5) Can you confirm if your issue is identical to reported to upstream? https://github.com/neutrinolabs/xorgxrdp/issues/121
Let me know the issue still occurs with xorgxrdp 0.2.11 or later.
(In reply to Koichiro Iwao from comment #7) Unfortunately, yes, it's still crashing. [1293263.096] (II) Module XORGXRDP: vendor="X.Org Foundation" [1293263.097] compiled for 1.18.4, module version = 0.2.11 [1293263.097] ABI class: X.Org Video Driver, version 20.0 [...] [1293263.590] rdpDeferredUpdateCallback: dirty_extents 0 0 1600 960 [1293263.590] rdpDeferredUpdateCallback: band_index 0 band_count 1 [1293263.590] rdpCapRect: cap_rect x1 0 y1 0 x2 1600 y2 960 [1293263.590] rdpCapRect: capture_code 2 [1293263.590] rdpCapture: [1293263.590] rdpCapture2: [1293263.590] rdpCapture2: rcode 1 [1293263.590] rdpCapture2: rgnIN [1293263.590] (EE) [1293263.590] (EE) Backtrace: [1293263.596] (EE) 0: ? (?+0xf54090) [0x801362c50] [1293263.601] (EE) 1: ? (?+0xf54090) [0x1001956470] [1293263.606] (EE) 2: ? (?+0xf54090) [0x1001955970] [1293263.610] (EE) 3: ? (?+0xf54090) [0x800800f53093] [1293263.613] (EE) 4: ? (?+0xf54090) [0x10029357d0] [1293263.617] (EE) 5: ? (?+0xf54090) [0x1002933d20] [1293263.621] (EE) 6: ? (?+0xf54090) [0x1002932b00] [1293263.625] (EE) 7: ? (?+0xf54090) [0x1002931be0] [1293263.629] (EE) 8: ? (?+0xf54090) [0x80135a100] [1293263.633] (EE) 9: ? (?+0xf54090) [0x8011d9f00] [1293263.637] (EE) 10: ? (?+0xf54090) [0x8011e44e0] [1293263.640] (EE) 11: ? (?+0xf54090) [0x8011cd090] [1293263.644] (EE) 12: ? (?+0xf54090) [0x100139f090] [1293263.644] (EE) [1293263.644] (EE) Segmentation fault at address 0xffffffffffffffff [1293263.644] (EE) Fatal server error: [1293263.644] (EE) Caught signal 11 (Segmentation fault). Server aborting
Reopen.
Any idea how to move forward here? Should I better report it upstream? I still don't get a meaningful stacktrace though ...
(In reply to Felix Palmen from comment #10) I am one of upstream developer so there will be no luck ¯\_(ツ)_/¯ But for the record and to let other upstream developers know, can you raise a issue to upstream?
I guess the "events" here are new versions of Xorg and related packages? Unfortunately, it doesn't help here, the crash is still there, although the log looks slightly different: [749519.153] rdpDeferredUpdateCallback: [749519.153] rdpDeferredUpdateCallback: sending [749519.153] rdpDeferredUpdateCallback: rdp_width 1600 rdp_height 900 rdp_Bpp 4 screen width 1600 screen height 900 [749519.153] rdpDeferredUpdateCallback: dirty_extents 0 0 1600 900 [749519.153] rdpDeferredUpdateCallback: band_index 0 band_count 1 [749519.153] rdpCapRect: cap_rect x1 0 y1 0 x2 1600 y2 900 [749519.153] rdpCapRect: capture_code 2 [749519.153] rdpCapture: [749519.153] rdpCapture2: [749519.153] rdpCapture2: rcode 1 [749519.153] rdpCapture2: rgnIN [749519.153] (EE) [749519.153] (EE) Backtrace: [749519.162] (EE) 0: /usr/local/bin/Xorg (?+0x0) [0x41bb60] [749519.170] (EE) 1: /lib/libthr.so.3 (?+0x0) [0x800a1d2f0] [749519.179] (EE) 2: /lib/libthr.so.3 (?+0x0) [0x800a1c850] [749519.188] (EE) 3: ? (?+0x0) [0x7ffffffff193] [749519.196] (EE) 4: /usr/local/lib/xorg/modules/libxorgxrdp.so (?+0x0) [0x801ad6640] [749519.205] (EE) 5: /usr/local/lib/xorg/modules/libxorgxrdp.so (?+0x0) [0x801ad4d50] [749519.213] (EE) 6: /usr/local/lib/xorg/modules/libxorgxrdp.so (?+0x0) [0x801ad3b60] [749519.222] (EE) 7: /usr/local/lib/xorg/modules/libxorgxrdp.so (?+0x0) [0x801ad2c30] [749519.231] (EE) 8: /usr/local/bin/Xorg (?+0x0) [0x4147a0] [749519.239] (EE) 9: /usr/local/bin/Xorg (?+0x0) [0x4142a0] [749519.248] (EE) 10: /usr/local/bin/Xorg (?+0x0) [0x295fc0] [749519.256] (EE) 11: /usr/local/bin/Xorg (?+0x0) [0x2a04d0] [749519.265] (EE) 12: /usr/local/bin/Xorg (?+0x0) [0x289000] [749519.273] (EE) 13: ? (?+0x0) [0x800457000] [749519.273] (EE) [749519.274] (EE) Segmentation fault at address 0xffffffffffffffff [749519.274] (EE) Fatal server error: [749519.274] (EE) Caught signal 11 (Segmentation fault). Server aborting [749519.274] (EE) [749519.274] (EE) Please consult the The X.Org Foundation support at http://wiki.x.org for help. [749519.274] (EE) Please also check the log file at "/home/felix/.local/share/xorg/Xorg.25.log" for additional information.
Interesting, I cannot reproduce the newer segfault now.
I finally solved the mystery by tricking xrdp-sesman to use an X server I launched in lldb ... It seems some code using SYSV shared memory gets badly off track inside a jail that doesn't allow sysvshm. As a result, it tries to copy data to ((void *)-1), that's the cause for the segfault. Easily fixed by adding "sysvshm=new" to the jail config. It probably shouldn't crash in that way, but I didn't have the nerve to look for a fix giving some meaningful error instead of crashing :o