Ray's Knowledge Base
Unlock

Brahma CI fails with num_bindings one short of api_count when a *64 variant is not bound

PitfallVerified 13 Oct 2026Holds anywhere
Pitfall. The symptom, what causes it, and the fix that was run and seen to work.

Symptom#

The brahma test fails in CI on the Ubuntu jobs with posix->num_bindings == posix->api_count at test/test_posix.cpp:1944. The numbers are POSIX num_bindings: 200, api_count: 199. The glibc 2.28 and 2.34 jobs pass.

Cause#

The Ubuntu jobs build brahma with HDF5, and HDF5 turns on _FILE_OFFSET_BITS=64. With that flag glibc maps scandirat() to scandirat64(). Brahma bound scandir, scandir64 and scandirat, but not scandirat64, so the test captured 199 of 200 calls. The jobs without HDF5 do not map the names, so they hide the gap.

Fix#

Bind the missing *64 name (scandirat64) in brahma, with a test override and a direct call in the test. Add the matching override in dftracer and a test that checks each of scandirat and scandirat64 gives 1 event. When you add any call, bind its *64 form as well. Test with and without _FILE_OFFSET_BITS=64.

Evidence#

Reproduced locally on the old commit with the same counts. After the fix, brahma passed on Ubuntu 24.04 and manylinux 2.28, with and without 64-bit offsets, and dftracer passed all 16 tests on glibc 2.28 and 2.34.