Skip to content

macOS: ae3d's standing ragdolls cost about 2x per step after 1409bf2..89d8f79 #120

Closed as not planned

Description

@nicolas-maman

Moving ae3d from aephysics 1409bf2 to 89d8f79 (main, with #101 to #112) fails ae3d's tests/test_motion_cost.ae on macOS CI. Windows is unchanged.

Test. 16 POWERED box-man ragdolls standing on one ground: the fixed step's cost per figure, best of 5 runs over 120 steps after 60. The bound is 80 µs.

macOS CI (GitHub runner) Windows local
1409bf2 passes (< 80 µs) 40.2 µs
89d8f79 86.67 µs, twice, to 0.02% (1387.2 and 1387.5 µs a step); 4 figures 78.4 µs 40.3 µs

The two macOS readings agree to 0.02%. That steadiness looks systematic, not runner noise. Reverting only the submodule pin turned macOS green again (ae3d PR #644, runs 37538020309 failed and 3f7e696's passed).

Suspects, from the range: #106 "independent worlds stepped at once: worker slots of their own per world", #103's parallel-step race fixes (allocation counters, the stepping thread's index), and #107's joint layout. A per-step worker wake or slot cost on macOS's scheduler would fit a cost that grows with the figures but sits well above Windows.

To reproduce: in ae3d, ./build.sh tests/test_motion_cost.ae on macOS with deps/aephysics at each pin.

ae3d stays on 1409bf2 until this is understood.

Activity

  1. added a commit that references this issue on Oct 6, 2026
  2. nicolas-maman commented on Oct 6, 2026

    @nicolas-maman
    CollaboratorAuthor

    Bisected on a macOS arm64 runner (Apple M1, virtual, 3 cores), and I can't reproduce a regression in aephysics.

    Repro without ae3d. 16 powered ragdolls standing on one ground: an align spring at the pelvis, motor anchors driven to a moving pose every step, 8 sub-steps, 3 workers. Best of 5 × 120 steps after 60, the empty world subtracted. That's the shape of test_motion_cost, built directly on aephysics. I ran it both with the world's own scheduler and with one host scheduler lent to a fresh world on each run, as ae3d's engines do.

    Every merge in 1409bf2..89d8f79, one job (µs per figure at 16, 3 workers): 68, 57, 34, 29, 33, 50, 27, 28, 30, 31, 23, 69, 24, 28, 50, 48, 94, 47, 45, 35. No step, no trend. The old pin is the slowest reading.

    The two pins alternated, three rounds, same job:

    host scheduler own scheduler
    1409bf2 52.7, 98.9, 58.9 45.0, 60.3, 94.0
    89d8f79 72.8, 89.9, 46.8 104.1, 45.0, 48.8

    Best at each pin: 45.0 vs 45.0. A single best-of-5 reading moves by 2x on this runner at a fixed commit. ae3d's own test notes the same thing (#534: all three 16-figure runs at 87 µs where 4 and 32 read 43). 86.7 µs is that slow mode, and two readings agreeing to 0.02% would be two runs that landed in it.

    On Windows the repro reads 22.5 µs at 1409bf2 and 21.5 µs at 89d8f79. Current main is the same or faster on both platforms.

    Suggestion for ae3d: bump the pin again and rerun macOS a few times. If the test has to hold on this runner, a best over more runs or several rounds interleaved with the empty world would keep the slow mode out of a single verdict. Closing as not reproducible in aephysics. Reopen with a run that shows it at a fixed runner and I'll dig again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions