Bug #103912 OUT OF THREAD STACK IN CREATEITERATORFROMACCESSPATH (AGAIN)
Submitted: 4 Jun 2021 11:36 Modified: 9 Jun 2021 11:03
Reporter: Tor Didriksen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:8.0.27 OS:Any
Assigned to: CPU Architecture:Any

[4 Jun 2021 11:36] Tor Didriksen
Description:
The patch for
Bug #32934187: HYPERGRAPH: CRASHING IN ITEM_IN_SUBSELECT::EXEC
increased stack usage for CreateIteratorFromAccessPath()
and we have queries which run out of stack space when building with
clang debug and no optimization.

How to repeat:
Debug build with clang.
Several of the subquery_sj_xxx tests will fail,
with "illegal instruction" or "segmentation fault".

Suggested fix:
Increase DEFAULT_THREAD_STACK, and pick a value which works 
for the entire mtr test suite, on all known/supported platforms.

Currently, the platform requiring most stack is
clang with debug + ASAN + UBSAN +  "-O0 -fno-inline"
[22 Jul 2021 16:02] Jon Stephens
Documented change in the MySQL 8.0.27 changelog as follows:

    The default value for the thread_stack system variable has been
    increased to 1048576 on all supported platforms.

Closed.
[22 Jul 2021 16:12] Jon Stephens
Also updated the documentation to reflect the change.