-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Labels
Description
Description
Once in while, the phpMyAdmin's testsuite on ARM64 causes a segmentation fault. For example:
- https://github.com/phpmyadmin/phpmyadmin/actions/runs/3130857168/jobs/5081574596#step:6:573
- https://github.com/phpmyadmin/phpmyadmin/actions/runs/3130850431/jobs/5081556935#step:6:580
- https://github.com/phpmyadmin/phpmyadmin/actions/runs/3102363522/jobs/5024589985#step:6:575
I tried to replicate in CI one that I was able to reproduce on my machine, but it passed.
On my machine the core dump file was not useful, it did not had a backtrace and I wasn't able to use gdb inside Docker.
I was able to get a backtrace using a remote gdb, but I don't know if this backtrace is useful. I never used gdb this way.
$ sudo docker run --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -i -v $PWD:/app --workdir /app --rm arm64v8/alpine:3.16 sh /app/do-tests.sh
+ bash
qemu-aarch64 -g 1234 ./docker/usr/bin/php8 ./vendor/bin/phpunit --no-coverage --testsuite unit --exclude-group=extension-iconv --random-order-seed 1664232984 --stop-on-failure
PHPUnit 9.5.25 #StandWithUkraine
Runtime: PHP 8.0.22
Configuration: /app/phpunit.xml
Random Seed: 1664232984
Warning: Your XML configuration validates against a deprecated schema.
Suggestion: Migrate your XML configuration using "--migrate-configuration"!
............................................................. 61 / 2830 ( 2%)
.........S...........S....................................... 122 / 2830 ( 4%)
............................................................. 183 / 2830 ( 6%)
............................................................. 244 / 2830 ( 8%)
............................................................. 305 / 2830 ( 10%)
............................................................. 366 / 2830 ( 12%)
............................................................. 427 / 2830 ( 15%)
............................................................. 488 / 2830 ( 17%)
............................................................. 549 / 2830 ( 19%)
.................................qemu-aarch64: QEMU: Terminated via GDBstub
$ gdb-multiarch -q --nh -ex 'set architecture aarch64' -ex 'set sysroot docker' -ex 'file docker/usr/bin/php8' -ex 'target remote 172.17.0.2:1234'
The target architecture is set to "aarch64".
Reading symbols from docker/usr/bin/php8...
Reading symbols from docker/usr/lib/debug/usr/bin/php8.debug...
Remote debugging using 172.17.0.2:1234
Reading symbols from docker/lib/ld-musl-aarch64.so.1...
(No debugging symbols found in docker/lib/ld-musl-aarch64.so.1)
0x00007f56e851f4c0 in _dlstart () from docker/lib/ld-musl-aarch64.so.1
(gdb) continue
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0x00007f56e82e1050 in ?? () from docker/usr/lib/libpcre2-8.so.0
(gdb) bt
#0 0x00007f56e82e1050 in ?? () from docker/usr/lib/libpcre2-8.so.0
#1 0x00007f56da1f9900 in ?? ()
#2 0x00007f56d9d4c770 in zend_is_callable_ex (callable=0x7f56dbdd3000, object=0x7f56dbdcb000, check_flags=<optimized out>, callable_name=0x7f56d91fffff,
fcc=<optimized out>, error=<optimized out>) at /home/buildozer/aports/community/php8/src/php-8.0.22/Zend/zend_API.c:3520
#3 0x00007f56d9d4c770 in zend_is_callable_ex (callable=0x7f56dbe192e0, object=0xf4241, check_flags=<optimized out>, callable_name=0x0, fcc=<optimized out>,
error=<optimized out>) at /home/buildozer/aports/community/php8/src/php-8.0.22/Zend/zend_API.c:3520
#4 0x00007f56d91ffff7 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) q
Let me know if this backtrace tell something that I could use to isolate the issue.
PHP Version
8.0.22
Operating System
Host: Debian bookworm amd64
Docker: Alpine 3.16 arm64v8