Skip to content

segfault on macos-14 (latest) Github runners #266

@miguelbiron

Description

@miguelbiron

These appear sporadically in the CI tests, see e.g.

https://github.com/Julia-Tempering/Pigeons.jl/actions/runs/10375077719/job/28723955660?pr=265#step:8:1429

Details

BridgeStan not found at location specified by $BRIDGESTAN environment variable, downloading version 2.5.0 to /Users/runner/.bridgestan/bridgestan-2.5.0
Done!
┌ Info: Neither traces, disk, nor online recorders included.
│    You may not have access to your samples (unless you are using a custom recorder, or maybe you just want log(Z)).
└    To add recorders, use e.g. pigeons(target = ..., record = [traces; record_default()])
┌ Warning: It looks like sample_iid!() is not implemented for a 
│ reference_log_potential of type StanLogPotential{...}. 
│ Instead, using step!(). 
└ @ Pigeons ~/work/Pigeons.jl/Pigeons.jl/src/targets/target.jl:51
─────────────────────────────────────────────────────────────────────────────────────────────────────────────
  scans        Λ        Λ_var      time(s)    allc(B)  log(Z₁/Z₀)   min(α)     mean(α)    min(αₑ)   mean(αₑ) 
────────── ────────── ────────── ────────── ────────── ────────── ────────── ────────── ────────── ──────────
        2          0          0      0.358   2.38e+07          0          1          1      0.422      0.678 
        4          0          0     0.0772    9.2e+06          0          1          1      0.469      0.678 
        8          0          0    0.00912   1.72e+05          0          1          1       0.59      0.677 
       16          0          0     0.0185   3.32e+05          0          1          1      0.593      0.657 
       32          0          0     0.0388   5.13e+05          0          1          1      0.648      0.696 
       64          0          0     0.0736   8.63e+05          0          1          1      0.636      0.651 

[5770] signal (11.2): Segmentation fault: 11
in expression starting at /Users/runner/work/Pigeons.jl/Pigeons.jl/test/test_BufferedAD.jl:115
__TBB_malloc_safer_msize at /Users/runner/.bridgestan/bridgestan-2.5.0/stan/lib/stan_math/lib/tbb/libtbbmalloc.dylib (unknown line)
Allocations: 132483465 (Pool: 132346220; Big: 137245); GC: 80
Package Pigeons errored during testing (received signal: 11)
Error: Process completed with exit code 1.
##[debug]Finished: run
##[debug]Finishing: Run julia-actions/julia-runtest@latest

Hypothesis: a bad interplay between garbage collection and BridgeStan (or C++ libraries called by it, see below).

BridgeStan does run tests on macos-latest runners but they don't get any errors

The offending function __TBB_malloc_safer_msize has been flagged at least once in the tbb repo, also in the context of a macOS application. It also seems to require a specific, non-reproducible combination of circumstances. No workaround yet....

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