SIGSEGV when Python tests use the `ctypes` module
Description:
When using the Python installed with this action I run into SIGSEGV on Linux if my tests use ctypes. This is is the offending workflow
name: Tests on: push concurrency: group: ${{ github.head_ref || github.run_id }} cancel-in-progress: true jobs: tests-linux: runs-on: ubuntu-latest strategy: fail-fast: false matrix: python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"] env: AUSTIN_TESTS_PYTHON_VERSIONS: ${{ matrix.python-version }} name: Tests on Linux with Python ${{ matrix.python-version }} steps: - uses: actions/checkout@v2 - name: Install build dependencies run: | sudo apt-get -y install libunwind-dev binutils-dev libiberty-dev - name: Install test dependencies run: | sudo apt-get -y install \ valgrind \ gdb - name: Install Python uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Install Python 3.10 uses: actions/setup-python@v4 with: python-version: "3.10" - name: Compile Austin run: | autoreconf --install ./configure --enable-debug-symbols true make - name: Run tests run: | ulimit -c unlimited python3.10 -m venv .venv source .venv/bin/activate pip install --upgrade pip pip install -r test/requirements.txt sudo -E .venv/bin/pytest --pastebin=failed --no-flaky-report -sr a -n auto .venv/bin/pytest --pastebin=failed --no-flaky-report -sr a -n auto deactivate
If Python is installed from, e.g., deadsnakes/ppa, then the tests pass without SIGSEGV. I can also get the tests to pass locally.
This is an example of a happy workflow that pulls Python from the PPA: https://github.com/P403n1x87/austin/runs/7046194671?check_suite_focus=true
This is a run with the action: https://github.com/P403n1x87/austin/runs/7045119660?check_suite_focus=true
This was discovered with this PR: https://github.com/P403n1x87/austin/pull/120/files
Action version:
v4
Platform:
- Ubuntu
- macOS
- Windows
Runner type:
- Hosted
- Self-hosted
Tools version:
Repro steps:
See description above
Expected behavior:
No SIGSEGV, like with the Pythons from the PPA.
Actual behavior:
SIGSEGV if ctypes is used