Closed ezracelli closed 2 years ago
Sometimes xrdp-chansrv will get stuck and it causes this issue. I need to find out the root cause of chansrv stuck but I'll merge #1393 ad workaround.
Oops, when #1393 is merged, the session disconnects.
@ezracelli With allow_channels=false
and get stuck in connecting chansrv, is xrdp-chansrv
process running? Let me know your process state.
@metalefty Nope, doesn't appear so. Results of ps aux | grep xrdp
...
...with no session attempt in progress:
root 29497 0.0 0.0 5256 948 ? S 20:31 0:00 /usr/sbin/xrdp
root 29581 0.0 0.0 4076 312 ? S 20:31 0:00 /usr/sbin/xrdp-sesman
...with session attempt in progress (black screen visible on client):
root 29497 0.0 0.0 5256 948 ? S 20:31 0:00 /usr/sbin/xrdp
root 29581 0.0 0.0 4076 312 ? S 20:31 0:00 /usr/sbin/xrdp-sesman
root 31087 0.2 0.0 13724 8020 ? S 20:33 0:00 /usr/sbin/xrdp
So it appears xrdp-chansrv
crashed for some reasons and no longer running. It is reasonable that connecting to chansrv fails because it is not running.
The root cause seems crash of xrdp-chansrv
.
The issue is separated into these 3 issues:
xrdp-chansrv
should not crash, should be more stable and reliablexrdp-chansrv
crashed #1393 xrdp-chansrv
should be restarted when crashed #1259 Then next, we need to find out the cause of chansrv crash.
I can consistently reproduce xrdp-chansrv stuck on 18.10 Ubuntu, xrdp-0.9.11. xrdp-chansrv process won't crash, but eats up ~100% cpu and GUI is completely frozen (unresponsive) for some 10-30s. It's somehow closely related to sound redirection, because it usually happens when playing short sounds/beeps (visual bell in terminal/editor, etc). How can i elaborate on this problem? Strace, debug log? To me channel_thread_loop() calling g_obj_wait with INFINITIVE timeout looks suspicious...
@lv-gh If you think it's audio related, can you delete the xrdp source and sink and see if it still happens. If not it might be the pulseaudio >= 12 issue. What pulseaudio version is in Ubuntu 18.10?
pulseaudio 12.2. This (incompatibility or bug) is known or maybe documented somewhere? Yes, when xrdp-source xrdp-sink modules are not loaded, then xrdp-chansrv won't stuck.
@lv-gh https://github.com/neutrinolabs/pulseaudio-module-xrdp/issues/31 The issue with Debian 10 is delayed audio, not hang in chansrv, but can you try my possible fix?
Well, it kind of works. At least seams so, cause i was unable to hang chansrv, but it might start hanging sometime later (as with orig pulseaudio-module-xrdp). Kind of, because sound is still not very usable/reliable (though better, i'd say): delays, jerks, lost frames. It misses almost all of short audio bells and some of them, that are actually played, are inconsistently delayed about ~3-4 seconds. It's off-topic, though. My major concern is that sound or other auxiliary problems definitely shouldn't hang chansrv/xrdp. Thank you.
Just to summarize, these issues are related (same root cause).
I also suffered from chansrv high CPU usage and audio redirection instability in #1265. neutrinolabs/pulseaudio-module-xrdp#38 solved the issue.
I can consistently reproduce xrdp-chansrv stuck on 18.10 Ubuntu, xrdp-0.9.11. xrdp-chansrv process won't crash, but eats up ~100% cpu and GUI is completely frozen (unresponsive) for some 10-30s. It's somehow closely related to sound redirection, because it usually happens when playing short sounds/beeps (visual bell in terminal/editor, etc). How can i elaborate on this problem? Strace, debug log? To me channel_thread_loop() calling g_obj_wait with INFINITIVE timeout looks suspicious...
I think I have also users with such a problem in debian buster, after ring bell in terminal, session freezed (default packages 0.9.9, was working fine with previous version , or in debian stretch)
I'm closing this issue now. Version 0.6 of the pulseaudio module has been released with significant changes, and the wiki README has been updated with better build instructions.
Having a similar issue to #1288, but the client still disconnects after a pause on a black screen. I've built twice: first directly from devel and then with #1393 merged into a forked repo. Seems to also be similar to https://unix.stackexchange.com/questions/532983/arch-linux-issues-with-xorgxrdp-and-xfce4-windows-manager.
System info:
Built with (per https://git.alpinelinux.org/aports/tree/main/xrdp/APKBUILD):
/etc/xrdp/xrdp.ini (default):
/var/log/xrdp.log:
With
allow_channels=false
set and #1393 merged in, the session disconnects immediately with this in the log: