Skip to content

Commit e0edd47

Browse files
ci(profiler): install fixed parallel 1.2.14 in UBSAN job (temporary)
The php-8.5_bookworm-8 image ships parallel 1.2.13, which has a bug that intermittently trips UBSAN in the profiler ASAN/UBSAN workflow's zts leg. A fixed parallel 1.2.14 has been released, so install it over the image's version before running the phpt tests on the zts build. pecl refuses to reinstall while the extension is loaded, so its ini is moved aside during the build and restored afterwards; the direct package URL is used because the image's channel REST cache lags behind new releases. nts is unaffected (parallel is ZTS-only). TODO: remove this step once the CI images are rebuilt with parallel >= 1.2.14.
1 parent 266017f commit e0edd47

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

.github/workflows/prof_asan.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,25 @@ jobs:
127127
cargo build --profile profiler-release
128128
cp -v "$CARGO_TARGET_DIR/profiler-release/libdatadog_php_profiling.so" "$(php-config --extension-dir)/datadog-profiling.so"
129129
130+
# TODO(parallel): the php-8.5_bookworm-8 image ships parallel 1.2.13, which
131+
# has a bug that intermittently trips UBSAN. Install the fixed 1.2.14 over
132+
# it (ZTS-only; parallel requires ZTS). Remove this step once the CI images
133+
# are rebuilt with parallel >= 1.2.14.
134+
- name: Install fixed parallel 1.2.14 (ZTS only, temporary until images rebuilt)
135+
if: matrix.php-build == 'zts'
136+
run: |
137+
set -eux
138+
switch-php zts
139+
scan_dir="$(php -r 'echo PHP_CONFIG_FILE_SCAN_DIR;')"
140+
# pecl refuses to reinstall while the extension is loaded, so move its
141+
# ini aside during the build, then restore it so the test run loads the
142+
# freshly installed parallel.so. Use the direct package URL because the
143+
# channel REST cache in the image can lag behind new releases.
144+
mv "$scan_dir/parallel.ini" /tmp/parallel.ini.disabled
145+
yes '' | pecl install -f https://pecl.php.net/get/parallel-1.2.14.tgz
146+
mv /tmp/parallel.ini.disabled "$scan_dir/parallel.ini"
147+
php --ri parallel | grep -i version
148+
130149
- name: Run phpt tests
131150
run: |
132151
set -eux

0 commit comments

Comments
 (0)