Skip to content

GUACAMOLE-2118: Signal end of user input to connection processes. - #699

Merged
mike-jumper merged 1 commit into
apache:staging/1.6.1from
Heyzi:GUACAMOLE-2118
Aug 6, 2026
Merged

GUACAMOLE-2118: Signal end of user input to connection processes.#699
mike-jumper merged 1 commit into
apache:staging/1.6.1from
Heyzi:GUACAMOLE-2118

Conversation

@Heyzi

@Heyzi Heyzi commented Aug 4, 2026

Copy link
Copy Markdown

Once no further data can be read from a user, the thread forwarding that user's input simply returns, leaving its end of the socketpair shared with the connection process open. A user which vanishes without sending "disconnect" therefore leaves that process blocked awaiting input indefinitely: nothing further informs it that its last user has left, so it never stops itself and never exits.

The thread reading from that process cannot detect this either, as it remains blocked on a socket which an idle process will never write to again, and so never reaches the point at which it would close its end.

Shut down the write side of the socketpair when no further user input is possible, such that the connection process observes end of input.

@necouchman

Copy link
Copy Markdown
Contributor

Thanks @Heyzi - one request, since this Jira issue is slated for 1.6.1, could you rebase against the staging/1.6.1 branch?

@Heyzi
Heyzi changed the base branch from main to staging/1.6.1 August 4, 2026 19:01
@Heyzi

Heyzi commented Aug 5, 2026

Copy link
Copy Markdown
Author

Thanks @Heyzi - one request, since this Jira issue is slated for 1.6.1, could you rebase against the staging/1.6.1 branch?

The Docker build is broken for everyone right now.

libwebsockets v5.0.0 turns on HTTP/3 by default, and HTTP/3 force-enables LWS_WITH_GNUTLS, which the builder stage has no packages for. Since WITH_LIBWEBSOCKETS is an unpinned pattern, autobuild.sh picks up v5.0.0 automatically.

guacd only uses libwebsockets for Kubernetes and doesn't need HTTP/3, so adding this to LIBWEBSOCKETS_OPTS fixes it without pinning:
-DLWS_WITH_HTTP3=OFF

Alternatively, pinning to the 4.x series on line 57 works too, and still picks up the newest 4.x release:
ARG WITH_LIBWEBSOCKETS='v4(.\d+)+'

Want me to open a PR, or would you rather take it?

@necouchman

Copy link
Copy Markdown
Contributor

Thanks @Heyzi - one request, since this Jira issue is slated for 1.6.1, could you rebase against the staging/1.6.1 branch?

The Docker build is broken for everyone right now.

libwebsockets v5.0.0 turns on HTTP/3 by default, and HTTP/3 force-enables LWS_WITH_GNUTLS, which the builder stage has no packages for. Since WITH_LIBWEBSOCKETS is an unpinned pattern, autobuild.sh picks up v5.0.0 automatically.

guacd only uses libwebsockets for Kubernetes and doesn't need HTTP/3, so adding this to LIBWEBSOCKETS_OPTS fixes it without pinning: -DLWS_WITH_HTTP3=OFF

Alternatively, pinning to the 4.x series on line 57 works too, and still picks up the newest 4.x release: ARG WITH_LIBWEBSOCKETS='v4(.\d+)+'

Want me to open a PR, or would you rather take it?

Thanks for the info on that - I'll put in a separate Jira issue for it, at least, and you can open a PR for it if you want. I don't have a terribly strong preference on direction at this point - disabling HTTP3 seems fine to me, but good either way.

@necouchman

Copy link
Copy Markdown
Contributor

Want me to open a PR, or would you rather take it?

Thanks for the info on that - I'll put in a separate Jira issue for it, at least, and you can open a PR for it if you want. I don't have a terribly strong preference on direction at this point - disabling HTTP3 seems fine to me, but good either way.

Opened GUACAMOLE-2315 for this build issue.

Comment thread src/guacd/connection.c Outdated
Once no further data can be read from a user, the thread forwarding that
user's input simply returns, leaving its end of the socketpair shared with the
connection process open. A user which vanishes without sending "disconnect"
therefore leaves that process blocked awaiting input indefinitely: nothing
further informs it that its last user has left, so it never stops itself and
never exits.

The thread reading from that process cannot detect this either, as it remains
blocked on a socket which an idle process will never write to again, and so
never reaches the point at which it would close its end.

Shut down the write side of the socketpair when no further user input is
possible, such that the connection process observes end of input.
@mike-jumper
mike-jumper merged commit f8a5f73 into apache:staging/1.6.1 Aug 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants