runner-images icon indicating copy to clipboard operation
runner-images copied to clipboard

`pkg-config --list-all segfaults` on macOS-{11,12}

Open andreasabel opened this issue 2 years ago • 6 comments

Description

cabal-install 3.8.1.0 runs pkg-config --list-all to build its own pkg-config database. Pointer:

  • https://github.com/haskell/cabal/pull/8496

Unfortunately pkg-config --list-all crashes on macOS-11 and macOS-12, see e.g. https://github.com/andreasabel/gha-test/actions/runs/3202198515. Here is the reproducer:

on:
  - push
  - pull_request
  - workflow_dispatch

jobs:
  pkg-config:
    strategy:
      fail-fast: false
      matrix:
        os:
          - macOS-10.15
          - macOS-11
          - macOS-12
          - ubuntu-18.04
          - ubuntu-20.04
          - ubuntu-22.04
          - windows-2019
          - windows-2022
    runs-on: ${{ matrix.os }}

    steps:
      - run: pkg-config --list-all

On macOS-11, we see:

Run pkg-config --list-all
/Users/runner/work/_temp/e2399e25-8191-4922-af7b-0f952d0ea074.sh: 
line 1:  1693 Segmentation fault: 11  pkg-config --list-all
Error: Process completed with exit code 139.

On macOS-12, we see:

Run pkg-config --list-all
/Users/runner/work/_temp/f0113537-d05d-4532-a96d-bd2a0c83017a.sh: 
line 1:  1522 Segmentation fault: 11  pkg-config --list-all
Error: Process completed with exit code 139.

Possibly related:

  • #6129

Platforms affected

  • [ ] Azure DevOps
  • [X] GitHub Actions - Standard Runners
  • [ ] GitHub Actions - Larger Runners

Runner images affected

  • [ ] Ubuntu 18.04
  • [ ] Ubuntu 20.04
  • [ ] Ubuntu 22.04
  • [ ] macOS 10.15
  • [X] macOS 11
  • [X] macOS 12
  • [ ] Windows Server 2019
  • [ ] Windows Server 2022

Image version and build link

https://github.com/andreasabel/gha-test/actions/runs/3202198515

Runner Image Image: macos-11 Version: 20221002.2

Image: macos-12 Version: 20220929.2

Is it regression?

Yes, works with macOS-10.15.

Expected behavior

See other OSs: pkg-config --list-all should output a list of all packages known to pkg-config.

Actual behavior

Segfault.

Repro steps

See above. Run this workflow:

on:
  - push
  - pull_request
  - workflow_dispatch

jobs:
  pkg-config:
    strategy:
      fail-fast: false
      matrix:
        os:
          - macOS-10.15
          - macOS-11
          - macOS-12
          - ubuntu-18.04
          - ubuntu-20.04
          - ubuntu-22.04
          - windows-2019
          - windows-2022
    runs-on: ${{ matrix.os }}

    steps:
      - run: pkg-config --list-all

andreasabel avatar Oct 07 '22 04:10 andreasabel

@andreasabel thanks, we will take a look

mikhailkoliada avatar Oct 07 '22 07:10 mikhailkoliada

@andreasabel it looks like a pure software bug, as a workaround you can remove imagemagick and its dependencies in runtime, I am trying to figure out where it should be better reported.

mikhailkoliada avatar Oct 10 '22 15:10 mikhailkoliada

Ok, it will be fixed by homebrew maintainers

mikhailkoliada avatar Oct 10 '22 17:10 mikhailkoliada

It's fixed from our side now. You can do brew reinstall highway until there's a new runner image.

Bo98 avatar Oct 10 '22 17:10 Bo98

Fantastic research and swift action, thanks a lot, everyone!!

Might be advisable to add pkg-config --list-all to your regression testsuite, to prevent it from breaking again in the future...

andreasabel avatar Oct 10 '22 21:10 andreasabel

The new macOS images must be released this week

mikhailkoliada avatar Oct 11 '22 07:10 mikhailkoliada

Great work, everyone!

pkg-config --list-all succeeds now on the macOS runners dated 2022-10-10: https://github.com/andreasabel/gha-test/actions/runs/3273901704/jobs/5386715502

andreasabel avatar Oct 18 '22 13:10 andreasabel

yes, the changes have been fully deployed

mikhailkoliada avatar Oct 24 '22 05:10 mikhailkoliada