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

[Backport v2.7] tests: posix: pthread: init pthread_attr_t on each iteration #57413

Closed
wants to merge 2 commits into from

Conversation

cfriedt
Copy link
Member

@cfriedt cfriedt commented Apr 30, 2023

Backport 7c17bda..12ed08a from #57403

Fixes #56163

@cfriedt cfriedt requested a review from pfalcon as a code owner April 30, 2023 12:07
@github-actions github-actions bot added area: POSIX POSIX API Library area: Tests Issues related to a particular existing or missing test labels Apr 30, 2023
@cfriedt cfriedt force-pushed the backport-57403-to-v2.7-branch branch from acc9b98 to cf9d0f8 Compare April 30, 2023 12:11
@cfriedt cfriedt changed the title Backport 57403 to v2.7 branch Backport 57161 to v2.7 branch Apr 30, 2023
@cfriedt cfriedt marked this pull request as draft April 30, 2023 12:20
@cfriedt cfriedt force-pushed the backport-57403-to-v2.7-branch branch from cf9d0f8 to 3a132f6 Compare April 30, 2023 12:25
@github-actions github-actions bot removed the area: POSIX POSIX API Library label Apr 30, 2023
@cfriedt cfriedt changed the title Backport 57161 to v2.7 branch Backport 57403 to v2.7 branch Apr 30, 2023
@cfriedt cfriedt marked this pull request as ready for review April 30, 2023 12:27
@cfriedt cfriedt added the area: POSIX POSIX API Library label Apr 30, 2023
@cfriedt cfriedt requested review from jgl-meta and nashif April 30, 2023 12:31
@cfriedt cfriedt marked this pull request as draft April 30, 2023 12:45
cfriedt added 2 commits April 30, 2023 08:50
The `test_pthread_descriptor_leak` test was causing a kernel
panic on some platforms. Initially, it was not clear why.

The usual cases were examined - race conditions, stack sizes,
etc. Still no luck.

As it turns out, recycling a thread stack (or at least the
`pthread_attr_t`) in-place does not work on some platforms,
and we need to reinitialize the `pthread_attr_t` and set
set the stack property again prior to calling
`pthread_create()`.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
(cherry picked from commit 7c17bda)
Rather than pass an variable address to a `void *` in
`pthread_join()` and do nothing with it, just pass `NULL`.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
(cherry picked from commit 12ed08a)
@cfriedt cfriedt force-pushed the backport-57403-to-v2.7-branch branch from 3a132f6 to 99741c8 Compare April 30, 2023 12:50
@github-actions github-actions bot removed the area: POSIX POSIX API Library label Apr 30, 2023
@cfriedt cfriedt added the area: POSIX POSIX API Library label Apr 30, 2023
@cfriedt cfriedt marked this pull request as ready for review April 30, 2023 12:54
@nashif
Copy link
Member

nashif commented May 1, 2023

Can we please be a bit more descriptive in PR titles?

@nashif nashif changed the title Backport 57403 to v2.7 branch [Backport v2.7] tests: posix: pthread: init pthread_attr_t on each iteration May 1, 2023
@cfriedt
Copy link
Member Author

cfriedt commented May 2, 2023

This does not solve the actual problem. Additional details in #56163

@cfriedt cfriedt closed this May 2, 2023
@nashif nashif deleted the backport-57403-to-v2.7-branch branch February 13, 2024 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: POSIX POSIX API Library area: Tests Issues related to a particular existing or missing test
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants