[
https://issues.apache.org/jira/browse/GUACAMOLE-1140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17245045#comment-17245045
]
Mike Jumper commented on GUACAMOLE-1140:
----------------------------------------
I think what you're running into is a race condition during initialization of
the various structures used for the RDP support, in this case the list of
arbitrary SVCs. While that list may be empty (and probably is in your case),
it's not allocated until a connection is being established to the RDP server,
which occurs in its own thread later on:
https://github.com/apache/guacamole-server/blob/b48e34fc3e7482fef7bb75a72d12add9da9c4c9b/src/protocols/rdp/rdp.c#L434
That would normally happen very soon after the first user starts the
connection. If your users are being added almost instantaneously after the
connection ID is available, that's probably why this hasn't been encountered in
practice until now. If that list is not initialized, the code attempting to
duplicate session state across newly-joining users would segfault when it
attempts to access the list.
> 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 restart everything works again like a charm. The crash happens
> about once per 2 hours while connections are opened/closed multiple times
> (approx. every 6-7 minutes).
> I read the "it is probably not a bug" section of the FAQ, I believe this is
> indeed a bug, though.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)