Skip to content

swift build + test (macOS) crashes 3/3 on fix/910-thrusections-generatedface-guard's CI runner, 0/7 locally — CI-environment-specific, unresolved #920

Description

@gsdali

What & why

Investigated during PR #912's round-2 review response (#910). Not root-caused — filing to record
the evidence rather than let a real, reproducible-on-CI signal drop silently, since swift build + test (macOS) is not a required check (only gate-scripts is) and didn't block that PR's merge.

swift build + test (macOS) on fix/910-thrusections-generatedface-guard (commit 115f17a, the
round-2 fix) failed 3/3 CI reruns with the same crash class: two simultaneous, uncaught
SIGSEGVs per run —

*** Abort *** an exception was raised, but no catch was found.
	... The exception is: SIGSEGV 'segmentation violation' detected. Address <large heap address>.
*** Abort *** an exception was raised, but no catch was found.
	... The exception is: SIGSEGV 'segmentation violation' detected. Address 10.

(Address 10 reported identically across two of the three runs; the third reported Address 20.
The large-address crash's value differs each run, consistent with a heap address rather than a
fixed offset.)

Investigation performed

  • Round 1 (7b0abee)'s own CI run of the same job passed cleanly — the crash only appeared on
    round 2's commit.
  • Test-name correlation was investigated and found too weak to draw a conclusion from. The
    tests reported as "started" nearest the crash differed between the three runs (unrelated
    face/section/pocket tests in run 1; a cluster including "Loft polar-method SIGSEGV regression
    (Modelling ops (loft/ThruSections) SIGSEGV on degenerate profiles; OCC_CATCH_SIGNALS is a no-op without OCC_CONVERT_SIGNALS (#175 follow-up) #176)" in runs 2 and 3) — initially looked suggestive since that suite name references a past
    BRepOffsetAPI_ThruSections crash and this PR touches that same class, but on closer inspection
    Swift Testing dispatches a target's entire test list (~6800+ tests) as "started" almost
    immediately on process launch, so nearly everything sits in that state at any given instant —
    it does not specifically identify what was actually executing concurrently at crash time. None
    of this PR's own new/changed tests (generatedFaceIsMemberOfShapeAfterSuccessFailureSuccess...,
    shapeNilAfterSettingChangedWithoutRebuild, etc.) ever reported a pass OR a fail before any of
    the three crashes — they were queued, not confirmed executing.
  • Control comparison: reran main's most recent CI run (unrelated to this PR) twice on the
    same day, same job, same runner pool — 2/2 clean.
  • Local reproduction attempted 7 times (OCCTSWIFT_LOCAL=1 swift test, full suite, same commit
    as the 3 failing CI runs) — 7/7 clean, 5537/5537 tests each run, ~55-65s each, no crashes,
    no exceptions.

Net evidence

Result
main control (CI, same day) 2/2 clean
This branch (CI) 3/3 crashed, same signature
This branch (local, identical commit) 7/7 clean

This is not general infra flakiness (the control rules that out) and not a deterministic logic bug
reproducible locally (7 clean local runs on the exact commit that crashed 3/3 on CI rules that out
too). The two-simultaneous-SIGSEGV shape, with one crash at a small, near-repeatable address, is
the same general signature this project's docs/thread-safety.md/CLAUDE.md "Known OCCT Bugs"
history associates with unsynchronized shared/global OCCT state (#298, #341, #344, #349, #353,
#374) — several of those were found by exactly this mechanism (a PR's new test coverage
concurrently exercising an OCCT class for the first time in a way that surfaces a latent race).
This PR's round 2 added two new tests that exercise BRepOffsetAPI_ThruSections more heavily
under Swift Testing's parallel execution than before (build → fail → build again on a reused
instance, and setter changes between builds) — a plausible but unconfirmed trigger, not
established. CI's runner has meaningfully fewer cores than the local dev machine this was
investigated on, which would explain reproducing there and not locally if the mechanism is
timing/scheduling-window-dependent.

Not done here

  • No TSan investigation — this needs the project's established minimal-module TSan protocol
    (see Scripts/tsan-stress.sh and the #298/#341/etc. write-ups this project already has) to
    actually localize a race, if that's what this is. That's a real time investment and out of scope
    for a review-response cycle on an unrelated PR.
  • Root cause not identified. This issue exists to hold the evidence, not to claim a diagnosis.

Scope note

Related to, but broader than, #342 (bridge thread contract, open, project-wide) — filing standalone
rather than as a sub-issue since the root cause isn't established and could turn out to be
unrelated to that thread. Cross-referencing it there.

Activity

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