Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 25 additions & 13 deletions .github/workflows/behat-mariadb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,7 @@ jobs:
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV

- name: Install system dependencies
run: sudo apt update && sudo apt install poppler-utils

- name: Install PHP crash diagnostics
if: runner.debug == '1'
run: sudo apt install -y gdb systemd-coredump
run: sudo apt update && sudo apt install poppler-utils gdb systemd-coredump

- name: Checkout server
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand All @@ -116,7 +112,8 @@ jobs:
coverage: none
ini-file: development
# Required: re-enable pcntl_* functions that may be disabled via disable_functions
ini-values: disable_functions=
# php -S workers SIGSEGV in zend_objects_store_del under a JIT frame.
ini-values: disable_functions=, opcache.jit=disable, opcache.jit_buffer_size=0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -178,19 +175,34 @@ jobs:
- name: Print logs
if: always()
run: |
echo "=== php -S diagnostics ==="
shopt -s nullglob
files=(/tmp/behat-php-server-*)
if (( ${#files[@]} )); then
ls -la "${files[@]}"
for f in "${files[@]}"; do
echo "----- $f -----"
cat "$f"
done
else
echo "No /tmp/behat-php-server-* files"
fi
echo "=== nextcloud.log ==="
cat data/nextcloud.log

- name: List PHP core dumps
if: failure() && runner.debug == '1'
run: |
sudo coredumpctl --no-pager list || true
- name: Backtrace PHP core dumps
if: failure()
working-directory: apps/${{ env.APP_NAME }}
run: tests/integration/bin/ci-dump-php-s-core.sh

- name: Upload PHP server diagnostics
if: failure() && runner.debug == '1'
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: behat-mariadb-server-diagnostics-${{ matrix.mariadb-versions }}-php${{ matrix.php-versions }}-nc${{ matrix.server-versions }}
path: /tmp/behat-php-server-*
name: behat-mariadb-php-s-core-${{ matrix.mariadb-versions }}-php${{ matrix.php-versions }}-nc${{ matrix.server-versions }}
path: |
/tmp/behat-php-server-*
/tmp/php-s-gdb-bt.txt
if-no-files-found: ignore

summary:
Expand Down
38 changes: 25 additions & 13 deletions .github/workflows/behat-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,7 @@ jobs:
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV

- name: Install system dependencies
run: sudo apt update && sudo apt install poppler-utils

- name: Install PHP crash diagnostics
if: runner.debug == '1'
run: sudo apt install -y gdb systemd-coredump
run: sudo apt update && sudo apt install poppler-utils gdb systemd-coredump

- name: Checkout server
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand All @@ -120,7 +116,8 @@ jobs:
coverage: none
ini-file: development
# Required: re-enable pcntl_* functions that may be disabled via disable_functions
ini-values: disable_functions=
# php -S workers SIGSEGV in zend_objects_store_del under a JIT frame.
ini-values: disable_functions=, opcache.jit=disable, opcache.jit_buffer_size=0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -190,19 +187,34 @@ jobs:
- name: Print logs
if: always()
run: |
echo "=== php -S diagnostics ==="
shopt -s nullglob
files=(/tmp/behat-php-server-*)
if (( ${#files[@]} )); then
ls -la "${files[@]}"
for f in "${files[@]}"; do
echo "----- $f -----"
cat "$f"
done
else
echo "No /tmp/behat-php-server-* files"
fi
echo "=== nextcloud.log ==="
cat data/nextcloud.log

- name: List PHP core dumps
if: failure() && runner.debug == '1'
run: |
sudo coredumpctl --no-pager list || true
- name: Backtrace PHP core dumps
if: failure()
working-directory: apps/${{ env.APP_NAME }}
run: tests/integration/bin/ci-dump-php-s-core.sh

- name: Upload PHP server diagnostics
if: failure() && runner.debug == '1'
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: behat-mysql-server-diagnostics-php${{ matrix.php-versions }}-nc${{ matrix.server-versions }}
path: /tmp/behat-php-server-*
name: behat-mysql-php-s-core-php${{ matrix.php-versions }}-nc${{ matrix.server-versions }}
path: |
/tmp/behat-php-server-*
/tmp/php-s-gdb-bt.txt
if-no-files-found: ignore

summary:
Expand Down
38 changes: 25 additions & 13 deletions .github/workflows/behat-pgsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,7 @@ jobs:
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV

- name: Install system dependencies
run: sudo apt update && sudo apt install poppler-utils

- name: Install PHP crash diagnostics
if: runner.debug == '1'
run: sudo apt install -y gdb systemd-coredump
run: sudo apt update && sudo apt install poppler-utils gdb systemd-coredump

- name: Checkout server
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand All @@ -119,7 +115,8 @@ jobs:
coverage: none
ini-file: development
# Required: re-enable pcntl_* functions that may be disabled via disable_functions
ini-values: disable_functions=
# php -S workers SIGSEGV in zend_objects_store_del under a JIT frame.
ini-values: disable_functions=, opcache.jit=disable, opcache.jit_buffer_size=0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -184,19 +181,34 @@ jobs:
- name: Print logs
if: always()
run: |
echo "=== php -S diagnostics ==="
shopt -s nullglob
files=(/tmp/behat-php-server-*)
if (( ${#files[@]} )); then
ls -la "${files[@]}"
for f in "${files[@]}"; do
echo "----- $f -----"
cat "$f"
done
else
echo "No /tmp/behat-php-server-* files"
fi
echo "=== nextcloud.log ==="
cat data/nextcloud.log

- name: List PHP core dumps
if: failure() && runner.debug == '1'
run: |
sudo coredumpctl --no-pager list || true
- name: Backtrace PHP core dumps
if: failure()
working-directory: apps/${{ env.APP_NAME }}
run: tests/integration/bin/ci-dump-php-s-core.sh

- name: Upload PHP server diagnostics
if: failure() && runner.debug == '1'
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: behat-pgsql-server-diagnostics-php${{ matrix.php-versions }}-nc${{ matrix.server-versions }}
path: /tmp/behat-php-server-*
name: behat-pgsql-php-s-core-php${{ matrix.php-versions }}-nc${{ matrix.server-versions }}
path: |
/tmp/behat-php-server-*
/tmp/php-s-gdb-bt.txt
if-no-files-found: ignore

summary:
Expand Down
38 changes: 25 additions & 13 deletions .github/workflows/behat-sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,7 @@ jobs:
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV

- name: Install system dependencies
run: sudo apt update && sudo apt install poppler-utils

- name: Install PHP crash diagnostics
if: runner.debug == '1'
run: sudo apt install -y gdb systemd-coredump
run: sudo apt update && sudo apt install poppler-utils gdb systemd-coredump

- name: Checkout server
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand All @@ -110,7 +106,8 @@ jobs:
coverage: none
ini-file: development
# Required: re-enable pcntl_* functions that may be disabled via disable_functions
ini-values: disable_functions=
# php -S workers SIGSEGV in zend_objects_store_del under a JIT frame.
ini-values: disable_functions=, opcache.jit=disable, opcache.jit_buffer_size=0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -175,19 +172,34 @@ jobs:
- name: Print logs
if: always()
run: |
echo "=== php -S diagnostics ==="
shopt -s nullglob
files=(/tmp/behat-php-server-*)
if (( ${#files[@]} )); then
ls -la "${files[@]}"
for f in "${files[@]}"; do
echo "----- $f -----"
cat "$f"
done
else
echo "No /tmp/behat-php-server-* files"
fi
echo "=== nextcloud.log ==="
cat data/nextcloud.log

- name: List PHP core dumps
if: failure() && runner.debug == '1'
run: |
sudo coredumpctl --no-pager list || true
- name: Backtrace PHP core dumps
if: failure()
working-directory: apps/${{ env.APP_NAME }}
run: tests/integration/bin/ci-dump-php-s-core.sh

- name: Upload PHP server diagnostics
if: failure() && runner.debug == '1'
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: behat-sqlite-server-diagnostics-php${{ matrix.php-versions }}-nc${{ matrix.server-versions }}
path: /tmp/behat-php-server-*
name: behat-sqlite-php-s-core-php${{ matrix.php-versions }}-nc${{ matrix.server-versions }}
path: |
/tmp/behat-php-server-*
/tmp/php-s-gdb-bt.txt
if-no-files-found: ignore

summary:
Expand Down
19 changes: 19 additions & 0 deletions tests/integration/bin/ci-dump-php-s-core.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
# SPDX-License-Identifier: AGPL-3.0-or-later
#
# Dump a readable PHP stack from a php -S worker core.
# JIT frames show as n/a in coredumpctl; zbacktrace reads EG(current_execute_data).
set -u

sudo coredumpctl --no-pager list || true

curl -fsSL -o /tmp/php.gdbinit \
https://raw.githubusercontent.com/php/php-src/PHP-8.3/.gdbinit || true

{
echo "===== latest php core ====="
sudo coredumpctl --no-pager info || true
echo "===== gdb zbacktrace + bt full ====="
sudo coredumpctl --no-pager debug --debugger=gdb --debugger-arguments="-batch -ex 'set pagination off' -ex 'set debuginfod enabled on' -ex 'source /tmp/php.gdbinit' -ex zbacktrace -ex 'bt full' -ex 'info registers'" || true
} | tee /tmp/php-s-gdb-bt.txt
4 changes: 1 addition & 3 deletions tests/integration/config/behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ default:
base_url: http://mailpit:8025
PhpBuiltin\Server:
runAs: www-data
# Keep two workers while the intermittent PHP built-in server crash is
# investigated. Single-process mode did not eliminate the cURL 52 failure.
workers: 2
workers: 10
jarnaiz\JUnitFormatter\JUnitFormatterExtension:
filename: report.xml
outputDir: '%paths.base%/../output/'
Expand Down
Loading