On 2/7/24 05:24, Nick Couchman wrote:
On Wed, Feb 7, 2024 at 6:40 AM Yannick Martin
<yannick.mar...@ovhcloud.com <mailto:yannick.mar...@ovhcloud.com>> wrote:
Hello
About pthread_keys leak, I wonder if
https://github.com/apache/guacamole-server/blob/master/src/libguac/client.c#L299
<https://github.com/apache/guacamole-server/blob/master/src/libguac/client.c#L299>
and L300 is not a duplicate call of those done in:
guac_rwlock_init(&(client->__users_lock));
guac_rwlock_init(&(client->__pending_users_lock));
which call pthread_key_create too =>
https://github.com/apache/guacamole-server/blob/master/src/libguac/rwlock.c#L52
<https://github.com/apache/guacamole-server/blob/master/src/libguac/rwlock.c#L52>
Two issues with this:
* I'm not sure that duplicating a call to pthread_key_create()
would/should result in the behavior we're seeing - where TLS-based
connections fail after a certain, relatively well-defined number (58-60).
* This also would not explain why this only occurs in certain
situations, on certain platforms - that is, the same exact libguac code
running on EL7 (RHEL, CentOS, etc.) does not result in the resource
leak, whereas it does on some other set of platforms (Debian, Alpine,
EulerOS). Unless the pthread library has been changed substantially
between those versions to not clean up after itself?
This *might* now be fixed on master and staging/1.5.5, if folks want to
take a look. The issue does appear to be have been the duplicate
pthread_key_create() calls noted above (pending confirmation with testing).
If this is the cause, it's still unclear why the behavior varies between
platforms. It might be a matter of varying implementations, different
resource limits, or something else platform-specific.
- Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@guacamole.apache.org
For additional commands, e-mail: user-h...@guacamole.apache.org