Git Product home page Git Product logo

Comments (29)

PKizzle avatar PKizzle commented on May 26, 2024

I forgot to include the xrdp version. Currently I am using version 0.9.5

from xorgxrdp.

metalefty avatar metalefty commented on May 26, 2024

It seems you have 3 monitors. Can you confirm if it crashes with fewer monitors?
I suspect it might be a bug when you have more than 2 monitors.

[1631654.230]   client monitor data, monitorCount=3

from xorgxrdp.

PKizzle avatar PKizzle commented on May 26, 2024

Now I am trying to use only 2 monitors.
Could you find any hint in the log files what exactly causes the problem?
Sadly xorg-xrdp sessions crash regularly when trying to reconnect (every second day). If necessary I can provide more log files of the crashes.

from xorgxrdp.

PKizzle avatar PKizzle commented on May 26, 2024

Ok I asked someone who is using only 2 monitors for some time now, but his sessions also crash. His log files are identical to mine. No differences.

from xorgxrdp.

PKizzle avatar PKizzle commented on May 26, 2024

Inside .xsession-errors I get the following additional information:

openConnection: connect: No such file or directory
cannot connect to brltty at :0

from xorgxrdp.

matt335672 avatar matt335672 commented on May 26, 2024

@PKizzle - could I just ask where the xorgxrdp package you've used with Ubuntu 16.04 has come from? There doesn't appear to be an official package for xorgxrdp for Xenial.

Also, is your X server from xserver-xorg-core_1.18.4-0ubuntu0.7_amd64.deb?

Reading up the stacktrace, it looks OK until frame 3:. RRCrtcNotify+0x74 does not correspond to a function return address for this version of Xorg. So something odd seems to have happened while execution is within the libxorgxrdp.so module.

from xorgxrdp.

PKizzle avatar PKizzle commented on May 26, 2024

I compiled xorgxrdp for Ubuntu 16.04 amd64 myself without any noticeable error messages and packaged it to be installed on other Ubuntu servers.

xorgxrdp was installed via apt from the hermlnx PPA, previously I was using x11rdp which was built via the X11RDP-o-Matic build script.

And this is the output of the installed xserver-xorg packages on the system.

XSERVER
ii  x11-xserver-utils                          7.7+7                                        amd64        X server utilities
ii  xserver-common                             2:1.18.4-0ubuntu0.7                          all          common files used by various X servers
ii  xserver-xorg                               1:7.7+13ubuntu3                              amd64        X.Org X server
ii  xserver-xorg-core                          2:1.18.4-0ubuntu0.7                          amd64        Xorg X server - core server
rc  xserver-xorg-core-hwe-16.04                2:1.19.5-0ubuntu2~16.04.1                    amd64        Xorg X server - core server
ii  xserver-xorg-dev                           2:1.18.4-0ubuntu0.7                          amd64        Xorg X server - development files
rc  xserver-xorg-hwe-16.04                     1:7.7+16ubuntu3~16.04.1                      amd64        X.Org X server
ii  xserver-xorg-input-all                     1:7.7+13ubuntu3                              amd64        X.Org X server -- input driver metapackage
ii  xserver-xorg-input-evdev                   1:2.10.1-1ubuntu2                            amd64        X.Org X server -- evdev input driver
ii  xserver-xorg-input-synaptics               1.8.2-1ubuntu3                               amd64        Synaptics TouchPad driver for X.Org server
ii  xserver-xorg-input-vmmouse                 1:13.1.0-1ubuntu2                            amd64        X.Org X server -- VMMouse input driver to use with VMWare
ii  xserver-xorg-input-wacom                   1:0.32.0-0ubuntu3                            amd64        X.Org X server -- Wacom input driver
ii  xserver-xorg-legacy-hwe-16.04              2:1.19.5-0ubuntu2~16.04.1                    amd64        setuid root Xorg server wrapper
rc  xserver-xorg-video-intel-hwe-16.04         2:2.99.917+git20170309-0ubuntu1~16.04.1      amd64        X.Org X server -- Intel i8xx, i9xx display driver
 
XORG
ii  xorg                                       1:7.7+13ubuntu3                              amd64        X.Org X Window System
ii  xorg-docs-core                             1:1.7.1-1ubuntu1                             all          Core documentation for the X.org X Window System
ii  xorg-sgml-doctools                         1:1.11-1                                     all          Common tools for building X.Org SGML documentation
ii  xorgxrdp                                   0.9.4-1ppa1                                  amd64        Remote Desktop Protocol (RDP) modules for X.org®

from xorgxrdp.

PKizzle avatar PKizzle commented on May 26, 2024

Looking around whether other users were experiencing the same issue, I found the following issue on the xrdp page: neutrinolabs/xrdp#1164
But since there is no log file attached I'm not sure whether xorgxrdp or x11rdp was used.

from xorgxrdp.

matt335672 avatar matt335672 commented on May 26, 2024

That's useful - thanks. I know now I've got the right Xorg binary.

I may be able to make sense of the rest of the crashdump if I can find debug information for the xorgxrdp module.

According to your version list you're running xorgxrdp from a PPA. Do you have the information in that PPA to hand?

from xorgxrdp.

PKizzle avatar PKizzle commented on May 26, 2024

Oh I found the PPA it's this one: https://launchpad.net/~hermlnx/+archive/ubuntu/xrdp

from xorgxrdp.

matt335672 avatar matt335672 commented on May 26, 2024

I've had a look in the PPA.
Both the backport and the debian bionic package wrap a version of xrdp and xorgxrdp together, which makes it a bit awkward to determine the version of xorgxrdp in use. However, it seems the backport uses xorgxrdp 0.2.4.

The PPA doesn't contain any debug info. This can be recreated, but it's a fiddle.

After re-reading your report, I'm now a bit confused. As well as the PPA being installed you mention you've rebuilt and packaged xorgxrdp yourself. So there's potentially two modules on the system.

A few more questions:-

  • Are you running the one you've packaged, or the PPA one?
  • Did you use a .deb for the packaging or use some other method?
  • Do you have debug info available?

Apologies for missing the rebuild bit before.

from xorgxrdp.

PKizzle avatar PKizzle commented on May 26, 2024

I added hermlnx-ubuntu-xrdp-xenial.list to /etc/apt/sources.list.d did an apt update and then installed the package via aptitude. The self built package was x11rdp using the X11RDP-o-Matic build script, so not xorgxrdp. (I will edit my wrong comment on that above). Since I am only using the back port version from hermlnx apart from the provided log files, I do not have any other debug information.

from xorgxrdp.

matt335672 avatar matt335672 commented on May 26, 2024

That's a good description - thanks. I'm pretty clear on where we are now.

When I get a chance I'll build a Xenial VM and attempt to reconstruct the debug info. In the meantime, I suggest you have a look at what it would take to back-port and rebuild the combined xrdp/xorgxrdp package yourself. The reason I say this is that one of these two scenarios is quite likely I think:-

  • Despite the debug info I still can't work out what's happened
  • If I do work out what's happened, you might need to try a patch anyway.

You'll also remove a dependency on a PPA which may no longer be maintained.

It should be pretty straightforward to build the packages. Essentially you just download the sources from https://packages.ubuntu.com/bionic/xrdp, and follow the instructions at https://www.debian.org/doc/manuals/maint-guide/build.en.html for building a package.

Hope that makes sense.

from xorgxrdp.

matt335672 avatar matt335672 commented on May 26, 2024

I've managed to create a debug package with a Xenial VM.

Sadly, I'm still unable to tell what might be causing this.

The stack frames of interest in the trace (in reverse order) are:-

6: /usr/lib/xorg/modules/libxorgxrdp.so (rdpClientConCheck+0xc6b) [0x7fe4384750db]
5: /usr/lib/xorg/modules/libxorgxrdp.so (rdpRRSetRdpOutputs+0xe3) [0x7fe438470f73]
4: /usr/lib/xorg/modules/libxorgxrdp.so (0x7fe438468000+0x851e) [0x7fe43847051e]
3: /usr/lib/xorg/Xorg (RRCrtcNotify+0x74) [0x55a7640b1934]

The address in stack frame 6 refers to the call to rdpRRSetRdpOutputs in source line rdpClientCon.c:912. The address is stack frame 5 refers to the call to rdpRRUpdateOutput in source line
rdpRandR.c:515.
After that it gets a bit strange. The address in stack frame 4 looks like it corresponds to the call to RRCrtcNotify at source line rdpRandR.c:422, but strangely its value is one larger than it should be. Then the address in stack frame 3 makes no sense at all - it doesn't seem to correspond to a call instruction.

The logging is also consistent with rdpRRUpdateOutput being called for the second monitor (i.e. output 1) but never returning from this for the call to output 2.

I'm at a loss to know what to suggest at this point. A later version of xorgxrdp might be worth trying, but I can't see that any significant changes to this area have happened since 0.2.4. I don't know enough about X server internals to take this any further without more information.

Could this maybe be application or desktop related? Does the problem occur if you log in, disconnect immediately and then reconnect?

from xorgxrdp.

PKizzle avatar PKizzle commented on May 26, 2024

This problem does not occur on every re-login. Crashes occur when the session is alive for a long time without being used (over night). If the session is left open for too long the connection is automatically closed (is this a bug or a feature?), but that has no influence whether the session can be reused or not. It does not seem to be application related, since everyone connecting to this machine using RDP has these problems and uses different applications. The only applications running for each session are mate, VirtualGL, Xorg and xrdp.

from xorgxrdp.

matt335672 avatar matt335672 commented on May 26, 2024

My current thinking is that something is causing a problem with the X server which is manifesting itself in this reconnection segfault. The problem may well lie elsewhere in xorgxrdp, but investigating the coredump has not been useful in terms of finding an original cause.

A couple of questions for you:-

  • Have you got any graphically intensive screensavers configured (e.g. xscreensaver). These will be stressing the X server in ways that a plain desktop probably won't.
  • How about virtualGL? Is is supporting a particular application?

from xorgxrdp.

PKizzle avatar PKizzle commented on May 26, 2024

After some testing, I think I am quite sure the screensaver was the issue. Deactivating it allowed my colleagues to reenter their sessions without any crash since. I still have no idea why the screensaver crashes the session and why there is no trace of the problem in the log files, but it seems to be solved for now.

PS: VirtualGL is used for hardware accelerated apps like rviz (ROS development). It causes some performance problems, but nothing that should lead to a session crash.

from xorgxrdp.

matt335672 avatar matt335672 commented on May 26, 2024

That's good news, in a way. It provides at least a workaround for anyone experiencing the issue.

Which screensaver did you have configured to work with GNOME? It might help to reproduce the issue.

from xorgxrdp.

derekschrock avatar derekschrock commented on May 26, 2024

I'm wondering if there was a resolution to this issue? We see it on xrdp 0.9.9, xorgxrdp 0.2.9, xorg 1.19.3. Maybe when reconnecting full screen with multiple monitors. Main difference is that we're running fvwm so there isn't any type of fullscreen lock screen like GNOME's clock lock screen from #121 (comment)

from xorgxrdp.

jsorg71 avatar jsorg71 commented on May 26, 2024

The dump from the crash above is for a non remotefx connection.
Does the reconnect fail with remotefx too? eg. select 32 bpp color and LAN.

from xorgxrdp.

PKizzle avatar PKizzle commented on May 26, 2024

Which desktop environment are you using?

from xorgxrdp.

derekschrock avatar derekschrock commented on May 26, 2024

Which desktop environment are you using?

fvwm.

Something I've noticed from today's tests (connect, disconnect, reconnect, ...) is:

  • Not a GNOME thing
  • Not a screensaver thing
  • not GPU/CPU intensive tasks. I was able to get the crash just having xterm open.
  • It seems to maybe be related to resizing or bpp change reconnects
  • Maybe related to having applications offscreen during a resize (ex: going from 3840 x 1080 to 1920 x 1080) or on the non-main display during a reconnect.

I might have more information next week if the debug packages or abrtd can provide any extra insight.

from xorgxrdp.

derekschrock avatar derekschrock commented on May 26, 2024

You can see the backtrace snippets from a user's and my test system:
https://gist.github.com/derekschrock/100056537ae62de3fb680fa54059fd2b

Full logs are also available if needed.

from xorgxrdp.

derekschrock avatar derekschrock commented on May 26, 2024

I've been able to reproduce this on a FreeBSD host running xrdp with Windows 10 Pro VM with multiple virtual monitors. However, I don't have debug builds of xorg-server-1.18.4_11,1, xrdp-0.9.10_2,1 or xorgxrdp-0.2.10. But the backtrace looks almost the same.

I'll rebuild Xorg and xrdp with debug/non-stripped binaries and continue to test.

from xorgxrdp.

derekschrock avatar derekschrock commented on May 26, 2024

Steps to reproduce one crash is the following:

  1. Connect with 2 displays, disconnect
  2. Connect with 1 display, disconnect
  3. Connect with 2 displays, disconnect
  4. Connect with 2 displays, Crash
* thread #1, name = 'Xorg', stop reason = signal SIGBUS: hardware error
    frame #0: 0x00000000003dc82a Xorg`RROutputChanged(output=0x0000000807fdd3a0, configChanged=1) at rroutput.c:42
    frame #1: 0x00000000003dcec4 Xorg`RROutputSetModes(output=0x0000000807fdd3a0, modes=0x00007fffffffe188, numModes=1, numPreferred=0) at rroutput.c:187
  * frame #2: 0x0000000801be7348 libxorgxrdp.so`rdpRRUpdateOutput(dev=0x0000000801197800, x=0, y=0, width=735, height=727, index=1) at rdpRandR.c:415
    frame #3: 0x0000000801be6f7a libxorgxrdp.so`rdpRRSetRdpOutputs(dev=0x0000000801197800) at rdpRandR.c:513
    frame #4: 0x0000000801bf0664 libxorgxrdp.so`rdpClientConProcessMsgClientInfo(dev=0x0000000801197800, clientCon=0x00000008081fe000) at rdpClientCon.c:985
    frame #5: 0x0000000801bef744 libxorgxrdp.so`rdpClientConProcessMsg(dev=0x0000000801197800, clientCon=0x00000008081fe000) at rdpClientCon.c:1110
    frame #6: 0x0000000801beb0c0 libxorgxrdp.so`rdpClientConGotData(pScreen=0x0000000801c66600, dev=0x0000000801197800, clientCon=0x00000008081fe000) at rdpClientCon.c:1141
    frame #7: 0x0000000801bea7b0 libxorgxrdp.so`rdpClientConCheck(pScreen=0x0000000801c66600) at rdpClientCon.c:1280
    frame #8: 0x0000000801c3664f xrdpdev_drv.so`rdpWakeupHandler1(blockData=0x0000000801c66600, result=1, pReadmask=0x0000000000511638) at xrdpdev.c:417
    frame #9: 0x00000000002b1235 Xorg`WakeupHandler(result=1, pReadmask=0x0000000000511638) at dixutils.c:423
    frame #10: 0x00000000004d3d8a Xorg`WaitForSomething(pClientsReady=0x0000000806d5f000) at WaitFor.c:230
    frame #11: 0x000000000029e6ef Xorg`Dispatch at dispatch.c:359
    frame #12: 0x00000000002b0196 Xorg`dix_main(argc=9, argv=0x00007fffffffeac0, envp=0x00007fffffffeb10) at main.c:300
    frame #13: 0x000000000028c37a Xorg`main(argc=9, argv=0x00007fffffffeac0, envp=0x00007fffffffeb10) at stubmain.c:34
    frame #14: 0x000000000028c11b Xorg`_start(ap=<unavailable>, cleanup=<unavailable>) at crt1.c:76

It seems like it's some off by one error with the way xorgxrdp is keeping track of RROutputPtr's that it indexes over from dev->output.

I get a bad feeling about this.

dev->extra_outputs++;

extra_ouputs will be 2 (third element of dev->output) on step 3?
Then during step 4 when we're indexing over dev in rdpRRSetRdpOutputs and rdpRRUpdateOutput we're hitting an RROutputPtr that are bogus.

Looking at dev->output at crash time you see three RROutputPtr.

Should dev->extra_outputs be reset or set to monitorCount if numCrtcs < monitorCount?

from xorgxrdp.

metalefty avatar metalefty commented on May 26, 2024

Thank you for detailed debug info. I'll look at it later.

from xorgxrdp.

jsorg71 avatar jsorg71 commented on May 26, 2024

yup, I can repro it following directions above, thanks.

from xorgxrdp.

jsorg71 avatar jsorg71 commented on May 26, 2024

I created PR #147 for this

from xorgxrdp.

derekschrock avatar derekschrock commented on May 26, 2024

I can confirm PR #147 fixes the crash from #121 (comment)

from xorgxrdp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.