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

test/basic/thread_attr: increase the stack size #294

Merged

Conversation

shintaro-iwasaki
Copy link
Collaborator

It seems that 8 KB ULT stack used in test/basic/thread_attr.c is too little on some platforms. As far as I checked, 32-bit CentOS + clang 3.4.2 + some debugging options can sometimes cause SEGV because of stack overflow when ABT_thread_get_attr() is called in a ULT if (seemingly) the underlying execution stream has not executed posix_memalign() before and thus posix_memalign() internally called by ABT_thread_get_attr() takes a slow and deep execution path. I checked the function stack and $esp.

In any case, this SEGV is annoying and should be fixed. This patch increases the size to 262144.

Note that the stack canary (#293) could not detect this issue since SEGV occurred first. We need a page protection mechanism for debugging (though it is complicated and potentially heavier).

The stack overflow (rarely) happened because 8KB stack is too small.  This patch
increases the size to 262144.
@shintaro-iwasaki
Copy link
Collaborator Author

test:argobots/all
test:argobots/osx
test:argobots/freebsd
test:argobots/solaris

@shintaro-iwasaki
Copy link
Collaborator Author

test:argobots/freebsd

1 similar comment
@shintaro-iwasaki
Copy link
Collaborator Author

test:argobots/freebsd

@shintaro-iwasaki shintaro-iwasaki merged commit 6c933e1 into pmodels:main Jan 28, 2021
@shintaro-iwasaki shintaro-iwasaki deleted the pr/fix_thread_attr_test branch March 2, 2021 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant