← Back to Pull requests

MDEV-42362, MDEV-42466 Fix lotofstack JSON_TABLE test on armhf and Windows threadpool stack reserve #6213

Open
unknown opened this pull request with 182 lines diff across 2 files
View on GitHub
unknown unknown commented on Nov 24, 2026 20:44 UTC
Author

On armhf, 5000 nested JSON_TABLE paths stay under the default stack-overrun threshold, and raising the depth hits the Bison parser limit (MY_YACC_MAX) first.

This restarts the server with --thread-stack=192K around the MDEV-40847 (c746ca3e2d0) block and restores the original options afterward, leaving the rest of lotofstack.test unchanged. Using restart_mysqld.inc instead of a .opt file keeps the lower stack limit after the sanitizer skip checks.

Running with --thread-stack=192K exposed a separate Windows bug (MDEV-42466) where TP_pool_win::init() sets StackReserve directly to my_thread_stack_size with no headroom, causing 0xc00000fd on exact 64 KiB multiples. The first commit adds 64 KiB of virtual stack headroom in sql/threadpool_win.cc (keeping StackCommit = 0).

Tested locally (RelWithDebInfo):

  • armhf (cross-compiled, qemu-arm): reproduced the failure before the fix, passes after with default, --ps-protocol, and --view-protocol

  • amd64 (native): passes with default, --ps-protocol, --view-protocol, --cursor-protocol, and --repeat=2, confirmed in gdb that the overrun still fires in Json_table_nested_path::print()
  • Windows builds (sql/threadpool_win.cc) and native armhf still need CI verification.

    Fixes MDEV-42362 and MDEV-42466.

    Diff: 182 lines (+136 / -46) across 2 files Reviewer: gkodinov Review duration: 9212m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.36) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.36 · 182 lines diff across 2 files
    0.36
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.312
    Real PR Conversation Timeline
    1 comments
    "Review active on #6213"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 35.6% (MEDIUM) · Higher = larger blast radius
    35.6%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 46.7% · Lower = rushed or shallow review
    46.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 19.0% · Safe to merge
    19.0%
    Repository