-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Workload Resilience
-
Fully Compatible
-
ALL
-
Workload Resilience 2026-11-09
-
0
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Problem
FuzzPriorityOrdering in src/mongo/db/admission/ticketing/ordered_ticket_semaphore_fuzz_test.cpp normalizes each fuzzed int32_t admission count with c = std::abs(c) % 1000 (line 42). The domain is fuzztest::VectorOf(fuzztest::Arbitrary<int32_t>()).WithMinSize(1).WithMaxSize(16) (lines 136-137), which includes -2147483648 (INT_MIN). std::abs on a signed int of that value is undefined: the negation cannot be represented. UBSan aborts the test and libfuzzertests! fails.
The production OrderedTicketSemaphore is not on the stack. The failure is in the fuzz test's input normalization, before the semaphore is constructed (lines 41-46).
Failure
- BF: BF-46887
- Variant: rhel8-debug-aubsan-lite_fuzzer-arm64
- Task: libfuzzertests! (fetch_and_run_libfuzzertests)
- Test: OrderedTicketSemaphoreFuzz.FuzzPriorityOrdering (bazel-bin/install/bin/ordered_ticket_semaphore_fuzz_test)
- Project: mongodb-mongo-master
- Most recent linked failure: BFG-3748397 on 2ac479867c6502493d98a03c4ff54cc65ce98632, completed 2026-10-25. The same line is also on BFG-3756114 (2026-10-28), which was auto-closed onto BF-45103.
src/mongo/db/admission/ticketing/ordered_ticket_semaphore_fuzz_test.cpp:42:26: runtime error: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/mongo/db/admission/ticketing/ordered_ticket_semaphore_fuzz_test.cpp:42:26 argument 0: {0, 0, 0, 1, 0, 0, 0, 0, 0, 0, -2147483648, 0, -1504334024, -1060314372, -1}
An earlier run (Liubov Molchanova, 2026-10-22) hits the same line with seed FUZZTEST_PRNG_SEED=LTb_k-GGEZQqh20xS3exW-013fpLHT0763i7Jyw2wes.
Scope of Work
- src/mongo/db/admission/ticketing/ordered_ticket_semaphore_fuzz_test.cpp — stop applying signed std::abs to int32_t values that include -2147483648.
Either approach keeps the 0..999 admission-count range the test then uses:
- Widen before the absolute value, for example std::abs(static_cast<int64_t>(c)) % 1000, then narrow back to int32_t.
- Restrict the fuzz domain so it cannot produce INT_MIN.
Do not change OrderedTicketSemaphore for this failure. The October commits named on the BF (082cf9c1 / SERVER-136970, 203cea53 / SERVER-136867, 2ac47986) do not touch this file and are not revert targets.
The crashing line was added in 14d454c1bb754e383c3ff922d10983cd431de40a (SERVER-120340, 2026-03-26) and moved under src/mongo/db/admission/ticketing/ in f77df57467738f00128b99a8bacfa0ffb3fb47fc (SERVER-120544). SERVER-120340 is Closed; it introduced the line and is not a fix.
Acceptance Criteria
- //src/mongo/db/admission/ticketing:ordered_ticket_semaphore_fuzz_test passes on an UBSan build with a vector containing -2147483648, including the counterexample above, and with FUZZTEST_PRNG_SEED=LTb_k-GGEZQqh20xS3exW-013fpLHT0763i7Jyw2wes.
- Normalized admission counts stay in 0..999, and FuzzPriorityOrdering still checks non-decreasing wake-up order.
- libfuzzertests! on rhel8-debug-aubsan-lite_fuzzer-arm64 no longer fails this test for negation of -2147483648.
Notes
- protocol_fuzzer, ddl_stress_test_fuzz, and op_msg_fuzzer_shard fail the same task with different faults (BF-46956, BF-45103). This ticket covers only ordered_ticket_semaphore_fuzz_test.
- Keep BF-46887 open until this lands. Later multi-test failures that still contain this line are being closed onto BF-45103. An auto-resolution rule on BF-46887 with search term negation of -2147483648 and test ordered_ticket_semaphore_fuzz_test would keep them on this BF.