ExportXMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • Fully Compatible
    • ALL
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Problem

      jstests/aggregation/expressions/bindata_construction_validation.js, added by SERVER-129785 in commit 1ad5c938d233, has no @tags block. 15 of its 19 cases execute server-side JavaScript through $function, $accumulator, or mapReduce, so on builds without a JavaScript engine they fail the uassert(31264, ...) in ExpressionContext::getJsExecWithScope() (src/mongo/db/pipeline/expression_context.h):

      Cannot run server-side javascript without the javascript engine enabled
      

      The three ppc64le variants link scripting_none and filter such tests out with test_flags: --excludeWithAnyTags=incompatible_ppc,requires_scripting (etc/evergreen_yml_components/variants/ibm/test_release.yml). Because the test carries no tag, it is not excluded and fails on every run.

      This is reported as BF-46580: 18 linked BFGs over 30 days, across 8 aggregation* tasks on enterprise-rhel-81-ppc64le, enterprise-rhel-9-ppc64le, and enterprise-rhel-10-ppc64le, failing 17-25% of runs.

      Fix

      Add requires_scripting to the test's tags.

      Coverage impact

      Tagging the whole file also excludes its four $const cases on ppc64le. That loses no coverage, because all entry points funnel into one validator, uassertValidUserConstructedBinData() in src/mongo/db/exec/convert_utils.cpp, and the $const path into it is already covered on ppc64le by untagged siblings:

      • jstests/aggregation/expressions/const_literal_bindata_restricted_subtypes.js covers $const and $literal across 21 nesting shapes, with error codes 13016802, 12978505, and 12978506, plus the Encrypt and generic-BinData accept paths. It is strictly more thorough on the $const path than the four cases being excluded.
      • jstests/aggregation/expressions/convert_bindata_vector.js covers parseBinDataVector() error paths including 10506600.
      • jstests/aggregation/expressions/subtype.js and jstests/aggregation/expressions/serialize_ejson.js cover 12978506 and 12978507.

      The only two things unique to the excluded $const cases are subtype 4 (newUUID) at the wrong length, which shares a case label with subtypes 3 and 5 already covered by const_literal_bindata_restricted_subtypes.js, and reaching the Vector arm through $const rather than $convert, which exercises no code below the dispatch that is not already covered.

      Alternative considered

      Splitting the JS-dependent cases into a separate tagged file would keep the four $const cases running on ppc64le. This is the pattern used elsewhere: every tagged file in jstests/aggregation/expressions/ and jstests/aggregation/accumulators/ is a dedicated JS-feature file, and no test in the repo mixes JS-dependent and JS-independent coverage with a runtime check. We chose the single tag instead because the coverage the split preserves is redundant, as shown above, and the file is predominantly a JavaScript test.

      Testing

      • With --excludeWithAnyTags=incompatible_ppc,requires_scripting, the test is now excluded rather than selected.
      • Without the filter, the aggregation suite runs the test and it passes.

      Follow-up

      Build Baron added an auto-resolution rule on BF-46580 closing matches as Duplicate on ppc64le + aggregation + bindata_construction_validation.js. That rule should be removed once this lands, otherwise it will suppress genuinely new ppc64le failures in this file.

            Assignee:
            Timour Katchaounov
            Reporter:
            Timour Katchaounov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: