-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
inspector: more conservative minimum stack size #27855
Conversation
Related: libuv/libuv#2310 |
Re-run to check if the freebsd failures are flakes or regressions: https://ci.nodejs.org/job/node-test-pull-request/23324/ |
da49258
to
e943c71
Compare
I guess freebsd doesn't like small stacks... I decided to leave well enough alone. |
// creating a big 2 or 4 MB address space gap (problematic on 32 bits | ||
// because of fragmentation), not squeeze out every last byte. | ||
const size_t stack_size = std::max(static_cast<size_t>(4 * 8192), | ||
static_cast<size_t>(PTHREAD_STACK_MIN)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this doesn’t change anything compared to the current situation, but should we do something like libuv/libuv@38bb0f5 (use PTHREAD_STACK_MIN
only inside an #ifdef
)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair point. Addressed in the fix-up commit.
PTHREAD_STACK_MIN is 2 KB with musl, which is too small to safely receive signals. PTHREAD_STACK_MIN + MINSIGSTKSZ is 8 KB on arm64, which is the musl architecture with the biggest MINSIGSTKSZ so let's use that as a lower bound and let's quadruple it just in case.
e943c71
to
ee68f56
Compare
Landed in 5539d7e |
PTHREAD_STACK_MIN is 2 KB with musl, which is too small to safely receive signals. PTHREAD_STACK_MIN + MINSIGSTKSZ is 8 KB on arm64, which is the musl architecture with the biggest MINSIGSTKSZ so let's use that as a lower bound and let's quadruple it just in case. PR-URL: nodejs#27855 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
PTHREAD_STACK_MIN is 2 KB with musl, which is too small to safely receive signals. PTHREAD_STACK_MIN + MINSIGSTKSZ is 8 KB on arm64, which is the musl architecture with the biggest MINSIGSTKSZ so let's use that as a lower bound and let's quadruple it just in case. PR-URL: #27855 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
PTHREAD_STACK_MIN is 2 KB with musl, which is too small to safely receive signals. PTHREAD_STACK_MIN + MINSIGSTKSZ is 8 KB on arm64, which is the musl architecture with the biggest MINSIGSTKSZ so let's use that as a lower bound and let's quadruple it just in case. Backport-PR-URL: nodejs#33720 PR-URL: nodejs#27855 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
PTHREAD_STACK_MIN is 2 KB with musl, which is too small to safely receive signals. PTHREAD_STACK_MIN + MINSIGSTKSZ is 8 KB on arm64, which is the musl architecture with the biggest MINSIGSTKSZ so let's use that as a lower bound and let's quadruple it just in case. Backport-PR-URL: #33720 PR-URL: #27855 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
PTHREAD_STACK_MIN is 2 KB with musl, which is too small to safely
receive signals. PTHREAD_STACK_MIN + MINSIGSTKSZ is 8 KB on arm64,
which is the musl architecture with the biggest MINSIGSTKSZ so let's
use that as a lower bound and let's quadruple it just in case.
This coincidentally also lets us remove a FreeBSD-specific workaround.