Skip to content

SNOW-2111927: fix thread handle leak from event loop #903

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: deps/aws-sdk-1.11.283
Choose a base branch
from

Conversation

sfc-gh-ext-simba-hx
Copy link
Collaborator

@sfc-gh-ext-simba-hx sfc-gh-ext-simba-hx commented Jun 26, 2025

teamwork issue 1265
The handle leak is from event loop having a duplicated thread handle opened in thread itself.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses a handle leak in the EventLoopGroup by ensuring threads are managed rather than detached.

  • Sets the thread join strategy to AWS_TJS_MANAGED to allow proper cleanup.
  • Adds a comment indicating the change for SNOW-2111927.
Comments suppressed due to low confidence (1)

crt/aws-crt-cpp/crt/aws-c-io/source/event_loop.c:124

  • Add or update a unit test to verify that using AWS_TJS_MANAGED indeed prevents thread handle leaks when the event loop group is shut down.
            thread_options.join_strategy = AWS_TJS_MANAGED;

Copy link
Collaborator

@sfc-gh-dstempniak sfc-gh-dstempniak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sfc-gh-ext-simba-hx
Copy link
Collaborator Author

Hi @sfc-gh-dstempniak @sfc-gh-jszczerbinski
I'm not authorized to push to branch deps/aws-sdk-1.11.283 so can't merge this PR.
Please go ahead to merge it once you think it's all good.
On the other hand, in the PR for updating aws sdk I'll download the source from original repo and apply a patch which would be made from all custom changes in deps/aws-sdk-1.11.283 branch.

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