Repository navigation
GUACAMOLE-2341: Correct disconnect race vs. RDP channel cleanup. - #726
Open
mike-jumper wants to merge 1 commit into
Open
mike-jumper wants to merge 1 commit into
mike-jumper wants to merge 1 commit into
Conversation
necouchman
reviewed
Oct 23, 2026
Comment on lines
+316
to
+317
| size_t length = audio_buffer->packet_size; | ||
| if (length > packet_buffer_size) { |
Contributor
There was a problem hiding this comment.
Are there any conditions under which length/packet_size here could be zero that aren't caught prior to this? Any reason to check that?
Contributor
Author
There was a problem hiding this comment.
Nope - packet_size can't be zero here since that would mean guac_rdp_audio_buffer_may_flush() would have returned false earlier in the loop and skipped this section via continue.
Comment on lines
-972
to
-983
| /* Stop render loop */ | ||
| guac_display_render_thread_destroy(rdp_client->render_thread); | ||
| rdp_client->render_thread = NULL; | ||
|
|
||
| /* Ensure all background rendering processes are stopped before freeing | ||
| * underlying memory */ | ||
| guac_display_stop(rdp_client->display); | ||
|
|
||
| /* Clean up FreeRDP internal GDI implementation (this must be done BEFORE | ||
| * freeing the guac_display, as freeing the GDI will free objects like | ||
| * rdpPointer that will attempt to free associated guac_display_layer | ||
| * instances during cleanup) */ |
Contributor
There was a problem hiding this comment.
Did this get moved somewhere else? Or is it, for some reason, no longer required?
Contributor
Author
There was a problem hiding this comment.
Yes, the display and render thread cleanup moved to guac_rdp_client_free_handler().
Contributor
|
@mike-jumper Any feedback on my comments above? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change corrects cases where handling of RDP channels might race with resource cleanup at disconnect, leading to segfaults. Prior to the addition of the watchdog, a segfault during cleanup could lead to failure to reap the connection process (one of the possible causes of GUACAMOLE-2118).