Skip to content
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

Always creating worker threads without affinitization on error. #3041

Merged
merged 3 commits into from
Sep 6, 2022

Conversation

rzikm
Copy link
Member

@rzikm rzikm commented Sep 5, 2022

Description

On combination Docker+Debian11+ARM64, the call to pthread_create sometimes returns EINVAL when attempting thread affinitization. This PR always retries thread creation without thread affinitization when the first call to pthread_create fails.

Related to dotnet/runtime#74952

Testing

Tested manually on the affected platform.

Documentation

NO

src/platform/platform_posix.c Outdated Show resolved Hide resolved
@nibanks
Copy link
Member

nibanks commented Sep 6, 2022

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@karelz
Copy link
Member

karelz commented Sep 6, 2022

@nibanks can we get this change in msquic servicing branch release/2.1?

We need to be able to determine version of msquic library (and which which backend we use - OpenSSL or Schannel) without inflicting the cost of keeping msquic threads in apps that do not use msquic. Currently all the threads are consuming some memory and they are confusing users who do deep dive into perf of their app.
We are ok with loading msquic and then unloading it after we get the info, but we need to be able to load it again if msquic is needed by the app. This fix will unblock us to load it for 2nd time.

BTW: In ideal world, we would like to avoid unloading msquic entirely, so if you are ok to do lazy initialization of threads in servicing, we would be thrilled.
@rzikm can you please file issue to track that? At minimum we want it for next release (.NET 8.0).

@nibanks
Copy link
Member

nibanks commented Sep 6, 2022

@nibanks can we get this change in msquic servicing branch release/2.1?

Yes, that should be fine.

@nibanks nibanks merged commit 3906ffd into microsoft:main Sep 6, 2022
@nibanks
Copy link
Member

nibanks commented Sep 6, 2022

@rzikm would you mine creating a PR to cherry-pick this into the release/2.1 branch?

@rzikm
Copy link
Member Author

rzikm commented Sep 6, 2022

@karelz I filed #3044

@karelz karelz mentioned this pull request Sep 8, 2022
26 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants