[
https://issues.apache.org/jira/browse/GUACAMOLE-1140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17160638#comment-17160638
]
Thomas Kruse commented on GUACAMOLE-1140:
-----------------------------------------
Perhaps I should note that the machine in use hat 4 CPU cores available.
I have created a backtrace using this command
{code:java}
docker run --rm -it -v $PWD:/srv guacamole/guacd:1.2.0 /bin/bash
apt update
apt install -y gdb xz-utils
lzma -d core.lzma
cd /srv
gdb /usr/local/guacamole/sbin/guacd core
bt
bt thread apply all bt{code}
the crashing thread
{code:java}
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/local/guacamole/sbin/guacd -b 0.0.0.0 -L info -f'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 __GI___pthread_mutex_lock (mutex=0x8) at ../nptl/pthread_mutex_lock.c:67
67 ../nptl/pthread_mutex_lock.c: No such file or directory.
[Current thread is 1 (Thread 0x7f8b91ffb700 (LWP 23346))]
(gdb) bt
#0 __GI___pthread_mutex_lock (mutex=0x8) at ../nptl/pthread_mutex_lock.c:67
#1 0x000055da270e5de9 in guac_common_list_lock (list=<optimized out>) at
list.c:75
#2 0x00007f8bb956c5cb in guac_rdp_pipe_svc_send_pipes
(user=user@entry=0x7f8bac00d5e0) at channels/pipe-svc.c:49
#3 0x00007f8bb957a0cb in guac_rdp_user_join_handler (user=0x7f8bac00d5e0,
argc=<optimized out>, argv=<optimized out>) at user.c:92
#4 0x00007f8bbb1d134a in guac_client_add_user
(client=client@entry=0x7f8b280060e0, user=user@entry=0x7f8bac00d5e0,
argc=argc@entry=76,
argv=<optimized out>) at client.c:286
#5 0x00007f8bbb1d8bea in guac_user_handle_connection
(user=user@entry=0x7f8bac00d5e0, usec_timeout=usec_timeout@entry=15000000)
at user-handshake.c:337
#6 0x000055da270e5a96 in guacd_user_thread (data=0x7f8b280ad010) at proc.c:98
#7 0x00007f8bbade2fa3 in start_thread (arg=<optimized out>) at
pthread_create.c:486
#8 0x00007f8bba71f4cf in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:95{code}
for all threads
{code:java}
Thread 4 (Thread 0x7f8bb27fc700 (LWP 23189)):
#0 0x00007f8bba714819 in __GI___poll (fds=fds@entry=0x7f8bb27fbc98,
nfds=nfds@entry=1, timeout=15000) at ../sysdeps/unix/sysv/linux/poll.c:29
#1 0x00007f8bbb1d8e45 in guac_wait_for_fd (fd=<optimized out>,
usec_timeout=<optimized out>) at wait-fd.c:47
#2 0x00007f8bbb1d68bb in guac_socket_fd_select_handler (socket=<optimized
out>, usec_timeout=<optimized out>) at socket-fd.c:346
#3 0x00007f8bbb1d2cbe in guac_parser_read (parser=parser@entry=0x7f8bb401de00,
socket=socket@entry=0x7f8bb401cb60,
usec_timeout=usec_timeout@entry=15000000) at parser.c:222
#4 0x00007f8bbb1d8945 in guac_user_input_thread (data=<optimized out>) at
user-handshake.c:144
#5 0x00007f8bbade2fa3 in start_thread (arg=<optimized out>) at
pthread_create.c:486
#6 0x00007f8bba71f4cf in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 3 (Thread 0x7f8bb0ff9700 (LWP 23187)):
#0 0x00007f8bbade4495 in __GI___pthread_timedjoin_ex
(threadid=140237971900160, thread_return=thread_return@entry=0x0,
abstime=abstime@entry=0x0,
block=block@entry=true) at pthread_join_common.c:89
#1 0x00007f8bbade426c in __pthread_join (threadid=<optimized out>,
thread_return=thread_return@entry=0x0) at pthread_join.c:24
#2 0x00007f8bbb1d8d70 in guac_user_start (usec_timeout=15000000,
user=0x7f8bb401c940, parser=0x7f8bb401de00) at user-handshake.c:222
#3 guac_user_handle_connection (user=user@entry=0x7f8bb401c940,
usec_timeout=usec_timeout@entry=15000000) at user-handshake.c:355
#4 0x000055da270e5a96 in guacd_user_thread (data=0x7f8b28070f90) at proc.c:98
#5 0x00007f8bbade2fa3 in start_thread (arg=<optimized out>) at
pthread_create.c:486
#6 0x00007f8bba71f4cf in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 2 (Thread 0x7f8bb17fa700 (LWP 23184)):
#0 __libc_recvmsg (flags=0, msg=0x7f8b7b7fdbc0, fd=88) at
../sysdeps/unix/sysv/linux/recvmsg.c:28
#1 __libc_recvmsg (fd=88, msg=msg@entry=0x7f8b7b7fdbc0, flags=flags@entry=0)
at ../sysdeps/unix/sysv/linux/recvmsg.c:25
#2 0x000055da270e54fe in guacd_recv_fd (sock=<optimized out>) at move-fd.c:86
#3 0x000055da270e581d in guacd_exec_proc (protocol=0x0, proc=0x7f8b280060c0)
at proc.c:141
#4 guacd_create_proc (protocol=protocol@entry=0x7f8b2801f393 "rdp") at
proc.c:441
#5 0x000055da270e4d45 in guacd_route_connection (socket=0x7f8b28003d50,
map=0x7f8bb95a8010) at connection.c:298
#6 guacd_connection_thread (data=0x55da28c2ccc0) at connection.c:393
#7 0x00007f8bbade2fa3 in start_thread (arg=<optimized out>) at
pthread_create.c:486
#8 0x00007f8bba71f4cf in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 1 (Thread 0x7f8b91ffb700 (LWP 23346)):
#0 __GI___pthread_mutex_lock (mutex=0x8) at ../nptl/pthread_mutex_lock.c:67
#1 0x000055da270e5de9 in guac_common_list_lock (list=<optimized out>) at
list.c:75
#2 0x00007f8bb956c5cb in guac_rdp_pipe_svc_send_pipes
(user=user@entry=0x7f8bac00d5e0) at channels/pipe-svc.c:49
#3 0x00007f8bb957a0cb in guac_rdp_user_join_handler (user=0x7f8bac00d5e0,
argc=<optimized out>, argv=<optimized out>) at user.c:92
#4 0x00007f8bbb1d134a in guac_client_add_user
(client=client@entry=0x7f8b280060e0, user=user@entry=0x7f8bac00d5e0,
argc=argc@entry=76,
argv=<optimized out>) at client.c:286
#5 0x00007f8bbb1d8bea in guac_user_handle_connection
(user=user@entry=0x7f8bac00d5e0, usec_timeout=usec_timeout@entry=15000000)
at user-handshake.c:337
#6 0x000055da270e5a96 in guacd_user_thread (data=0x7f8b280ad010) at proc.c:98
#7 0x00007f8bbade2fa3 in start_thread (arg=<optimized out>) at
pthread_create.c:486
#8 0x00007f8bba71f4cf in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:95 {code}
> guacd segfaults with shared rdp sessions
> ----------------------------------------
>
> Key: GUACAMOLE-1140
> URL: https://issues.apache.org/jira/browse/GUACAMOLE-1140
> Project: Guacamole
> Issue Type: Bug
> Components: guacd, guacd-docker
> Affects Versions: 1.2.0
> Reporter: Thomas Kruse
> Priority: Major
> Attachments: core.lzma
>
>
> I am running guacd from docker on an Ubuntu 20.04 host.
> Connections to guacd are from a custom backend using the official
> guacamole-common 1.1.0 maven artifact with a websocket.
> To demonstrate stuff (teaching) multiple connections (10-12) are opened as
> shared sessions with the read-only property set after a leading session is
> opened and the connection id is propagated.
> The shared connections are all opened simultaneously - and closed (more or
> less) simultaneously, often together with the leading session.
> Shared drive is disabled.
> Most of the time it works flawlessly, until guacd segfaults.
> {code:java}
> [499569.970852] guacd[13354]: segfault at 0 ip 00007f8bbb1d5810 sp
> 00007f8b42483bc0 error 4 in libguac.so.17.1.0[7f8bbb1d0000+a000]
> [504671.630985] guacd[5546]: segfault at 0 ip 00007f8bb957eb1a sp
> 00007f8bb37fdbe0 error 4 in libguac-client-rdp.so.0.0.0[7f8bb9569000+18000]
> [504791.134857] guacd[6317]: segfault at 18 ip 00007f8bbade56c0 sp
> 00007f8b91ffac18 error 4 in libpthread-2.28.so[7f8bbade1000+f000] {code}
>
> After guacd recovers everything works again like a charm.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)