Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Invalid
-
1.0.0
-
None
-
None
Description
A guacd process may drop the connection to the rdp server and stay around consuming CPU.
The rdp is the xrdp v0.9.9 https://github.com/neutrinolabs/xrdp/releases
This happens when the guacd is running in a docker container https://hub.docker.com/r/guacamole/guacd/ 1.0.0
In this case the connection to the guacamole client enters in a CLOSE_WAIT state.
The parent guacd process starts writing WaitForSingleObject: unknown handle type, but is able to accept new clients.
A backtrace of the hanging process looks like:
Thread 6 (Thread 0x7f7c35b78700 (LWP 953)):
#0 0x00007f7c48684603 in select () at ../sysdeps/unix/syscall-template.S:84
#1 0x00007f7c3cfe1f33 in WaitForSingleObject () from /usr/lib/x86_64-linux-gnu/libwinpr-synch.so.0.1
#2 0x00007f7c3d3f2352 in MessageQueue_Wait () from /usr/lib/x86_64-linux-gnu/libwinpr-utils.so.0.1
#3 0x00007f7c3fbd789f in ?? () from /usr/lib/x86_64-linux-gnu/libfreerdp-utils.so.1.1
#4 0x00007f7c494bc4a4 in start_thread (arg=0x7f7c35b78700) at pthread_create.c:456
#5 0x00007f7c4868bd0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
Thread 5 (Thread 0x7f7c36379700 (LWP 952)):
#0 0x00007f7c48684603 in select () at ../sysdeps/unix/syscall-template.S:84
#1 0x00007f7c3cfe1f33 in WaitForSingleObject () from /usr/lib/x86_64-linux-gnu/libwinpr-synch.so.0.1
#2 0x00007f7c3d3f2352 in MessageQueue_Wait () from /usr/lib/x86_64-linux-gnu/libwinpr-utils.so.0.1
#3 0x00007f7c3fbd789f in ?? () from /usr/lib/x86_64-linux-gnu/libfreerdp-utils.so.1.1
#4 0x00007f7c494bc4a4 in start_thread (arg=0x7f7c36379700) at pthread_create.c:456
#5 0x00007f7c4868bd0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
Thread 4 (Thread 0x7f7c376d4700 (LWP 951)):
#0 __lll_lock_wait () at ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
#1 0x00007f7c494bec26 in _GI__pthread_mutex_lock (mutex=0x7f7c4001cec8) at ../nptl/pthread_mutex_lock.c:115
#2 0x00007f7c444c37da in guac_rdp_user_mouse_handler (user=0x7f7c38002ad0, x=1051, y=641, mask=0) at input.c:41
#3 0x00007f7c4a09792e in __guac_handle_mouse (user=0x7f7c38002ad0, argc=3, argv=0x7f7c38004a20) at user-handlers.c:142
#4 0x00007f7c4a096fd4 in guac_user_handle_instruction (user=0x7f7c38002ad0, opcode=0x7f7c3800632f "mouse", argc=3, argv=0x7f7c38004a20) at user.c:178
#5 0x00007f7c4a0987c0 in guac_user_input_thread (data=0x7f7c44eedd10) at user-handshake.c:222
#6 0x00007f7c494bc4a4 in start_thread (arg=0x7f7c376d4700) at pthread_create.c:456
#7 0x00007f7c4868bd0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
Thread 3 (Thread 0x7f7c456ef700 (LWP 950)):
#0 0x00007f7c4867e92d in read () at ../sysdeps/unix/syscall-template.S:84
#1 0x00007f7c4868bfde in eventfd_read (fd=<optimized out>, value=<optimized out>) at ../sysdeps/unix/sysv/linux/eventfd_read.c:26
#2 0x00007f7c3cfe1725 in ResetEvent () from /usr/lib/x86_64-linux-gnu/libwinpr-synch.so.0.1
#3 0x00007f7c4427bd59 in transport_check_fds () from /usr/lib/x86_64-linux-gnu/libfreerdp-core.so.1.1
#4 0x00007f7c4426c407 in freerdp_check_fds () from /usr/lib/x86_64-linux-gnu/libfreerdp-core.so.1.1
#5 0x00007f7c444c52b2 in guac_rdp_handle_connection (client=0x7f7c4000b010) at rdp.c:768
#6 0x00007f7c444c58ff in guac_rdp_client_thread (data=0x7f7c4000b010) at rdp.c:1013
#7 0x00007f7c494bc4a4 in start_thread (arg=0x7f7c456ef700) at pthread_create.c:456
#8 0x00007f7c4868bd0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
Thread 2 (Thread 0x7f7c44eee700 (LWP 949)):
#0 0x00007f7c494bd6dd in pthread_join (threadid=140171482580736, thread_return=0x0) at pthread_join.c:90
#1 0x00007f7c4a0988c4 in guac_user_start (parser=0x7f7c380049f0, user=0x7f7c38002ad0, usec_timeout=15000000) at user-handshake.c:278
#2 0x00007f7c4a098d37 in guac_user_handle_connection (user=0x7f7c38002ad0, usec_timeout=15000000) at user-handshake.c:417
#3 0x0000558b4027979f in guacd_user_thread (data=0x7f7c400297a0) at proc.c:98
#4 0x00007f7c494bc4a4 in start_thread (arg=0x7f7c44eee700) at pthread_create.c:456
#5 0x00007f7c4868bd0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
Thread 1 (Thread 0x7f7c45ef0700 (LWP 946)):
#0 0x00007f7c494c5e10 in __libc_recvmsg (fd=8, msg=0x7f7c45eefc60, flags=0) at ../sysdeps/unix/sysv/linux/recvmsg.c:28
#1 0x0000558b40279683 in guacd_recv_fd (sock=8) at move-fd.c:86
#2 0x0000558b40279b03 in guacd_exec_proc (proc=0x7f7c4000aff0, protocol=0x7f7c4000c113 "rdp") at proc.c:335
#3 0x0000558b40279dba in guacd_create_proc (protocol=0x7f7c4000c113 "rdp") at proc.c:441
#4 0x0000558b402786b8 in guacd_route_connection (map=0x7f7c4a3aa010, socket=0x7f7c4000af10) at connection.c:298
#5 0x0000558b402788ca in guacd_connection_thread (data=0x558b41c3b3f0) at connection.c:393
#6 0x00007f7c494bc4a4 in start_thread (arg=0x7f7c45ef0700) at pthread_create.c:456