Function guacamole_socket_alloc in server/src/libguac/server.c uses malloc to allocate a guac_socket structure but afterwards does not initialize:
socket->__keep_alive_enabled = 0;
If _keep_alive_enabled is not 0 by chance and if the calling procedure doesn't call guac_socket_require_keep_alive (which will overwrite keep_alive_enabled) guacd will try to access/join a _keep_alive_thread that doesn't exist.
This error does occur only rarely, but is severe and hard to determine. To fix it simply add the initializing line to function guac_socket_alloc in server/src/libguac/server.c.