tl;dr: Bug 1476828 significantly decreased the default thread stack size. If you notice any thread abort issues, please file bugs blocking that bug.

For some time, our default stack size for thread pools has been 256K on most platforms, but the stack size for other threads has remained set to the platform default. On Windows and Android, that's about 1MB. On desktop Linux, it defaults to 2MB, unless overridden by a ulimit.

One wouldn't generally expect this to cause problems, since thread stacks are generally lazily committed as they grow. On Linux, however, the 2MB default causes a specific problem: it matches the size of VM huge pages, which causes the kernel to sometimes allocate an entire 2MB region for them, in a single huge page, the first time they're touched.

Decreasing the number to anything lower than 2MB solves this problem, but 256K is much closer to what we actually expect them to reasonably use, and matches the defaults we generally use elsewhere, so that's the number we chose. It's possible that certain specific threads may need more, however, so if you notice any thread crashes, please report them.

Thanks.

-Kris
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to