Bug #81408 [Opn]: watchpoints don't work on powerpc64le-linux

From: Date: Thu, 02 Sep 2021 05:16:37 +0000
Subject: Bug #81408 [Opn]: watchpoints don't work on powerpc64le-linux
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-236371@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81408&edit=1 ID: 81408 User updated by: bauermann at kolabnow dot com Reported by: bauermann at kolabnow dot com Summary: watchpoints don't work on powerpc64le-linux Status: Open Type: Bug Package: phpdbg Operating System: Guix Linux PHP Version: 7.4.23 Block user comment: N Private report: N New Comment: Apparently I can only attach patches to bug reports, so I'll just concatenate the watch_*.log files here instead: watch_001.log ---------- ---- EXPECTED OUTPUT [Successful compilation of %s] prompt> [Breakpoint #0 added at %s:3] prompt> [Breakpoint #0 at %s:3, hits: 1] >00003: $a = 1; 00004: $b = [$a]; 00005: prompt> [Added recursive watchpoint #0 for $b] prompt> [Breaking on watchpoint $b] Old value: New value: Array ([0] => 1) >00006: unset($b); 00007: $b = 2; 00008: prompt> [Breaking on watchpoint $b] Old value inaccessible or destroyed New value: >00007: $b = 2; 00008: prompt> [Breaking on watchpoint $b] Old value: New value: 2 >00008: prompt> [$b has been removed, removing watchpoint recursively] [Script ended normally] prompt> ---- ACTUAL OUTPUT [Successful compilation of /tmp/guix-build-php-7.4.23.drv-0/php-7.4.23/sapi/phpdbg/tests/watch_001.php] prompt> [Breakpoint #0 added at prompt> /tmp/guix-build-php-7.4.23.drv-0/php-7.4.23/sapi/phpdbg/tests/watch_001.php:3] prompt> [Breakpoint #0 at prompt> /tmp/guix-build-php-7.4.23.drv-0/php-7.4.23/sapi/phpdbg/tests/watch_001.php:3, hits: 1] >00003: $a = 1; 00004: $b = [$a]; 00005: prompt> [Added recursive watchpoint #0 for $b] prompt> [$b has been removed, removing watchpoint recursively] [Script ended normally] prompt> [Breakpoint at prompt> /tmp/guix-build-php-7.4.23.drv-0/php-7.4.23/sapi/phpdbg/tests/watch_001.php:3 exists] prompt> [Breakpoint at prompt> /tmp/guix-build-php-7.4.23.drv-0/php-7.4.23/sapi/phpdbg/tests/watch_001.php:3 exists] prompt> [Breakpoint at prompt> /tmp/guix-build-php-7.4.23.drv-0/php-7.4.23/sapi/phpdbg/tests/watch_001.php:3 exists] prompt> ---- FAILED watch_003.log ---------- ---- EXPECTED OUTPUT [Successful compilation of %s] prompt> [Breakpoint #0 added at %s:6] prompt> [Breakpoint #0 at %s:6, hits: 1] >00006: $a[0] = 2; 00007: 00008: $a = [0 => 3, 1 => 4]; prompt> [Added watchpoint #0 for $a[0]] prompt> [Breaking on watchpoint $a[0]] Old value: 1 New value: 2 >00008: $a = [0 => 3, 1 => 4]; 00009: prompt> [Breaking on watchpoint $a[0]] Old value: 2 New value: 3 >00009: prompt> [$a[0] has been removed, removing watchpoint] [Script ended normally] prompt> ---- ACTUAL OUTPUT [Successful compilation of /tmp/guix-build-php-7.4.23.drv-0/php-7.4.23/sapi/phpdbg/tests/watch_003.php] prompt> [Breakpoint #0 added at prompt> /tmp/guix-build-php-7.4.23.drv-0/php-7.4.23/sapi/phpdbg/tests/watch_003.php:6] prompt> [Breakpoint #0 at prompt> /tmp/guix-build-php-7.4.23.drv-0/php-7.4.23/sapi/phpdbg/tests/watch_003.php:6, hits: 1] >00006: $a[0] = 2; 00007: 00008: $a = [0 => 3, 1 => 4]; prompt> [Added watchpoint #0 for $a[0]] prompt> [Breaking on watchpoint $a[0]] Old value: 1 New value: 3 >00009: prompt> [$a[0] has been removed, removing watchpoint] [Script ended normally] prompt> [Breakpoint at prompt> /tmp/guix-build-php-7.4.23.drv-0/php-7.4.23/sapi/phpdbg/tests/watch_003.php:6 exists] prompt> ---- FAILED watch_004.log ---------- ---- EXPECTED OUTPUT [Successful compilation of %s] prompt> [Breakpoint #0 added at %s:3] prompt> [Breakpoint #0 at %s:3, hits: 1] >00003: $b = "a"; 00004: $a = $b.$b; 00005: $a[1] = "b"; prompt> [Added watchpoint #0 for $a] prompt> [Breaking on watchpoint $a] Old value: New value: aa >00005: $a[1] = "b"; 00006: prompt> [Breaking on watchpoint $a] Old value: aa New value: ab >00006: prompt> [$a has been removed, removing watchpoint] [Script ended normally] prompt> ---- ACTUAL OUTPUT [Successful compilation of /tmp/guix-build-php-7.4.23.drv-0/php-7.4.23/sapi/phpdbg/tests/watch_004.php] prompt> [Breakpoint #0 added at prompt> /tmp/guix-build-php-7.4.23.drv-0/php-7.4.23/sapi/phpdbg/tests/watch_004.php:3] prompt> [Breakpoint #0 at prompt> /tmp/guix-build-php-7.4.23.drv-0/php-7.4.23/sapi/phpdbg/tests/watch_004.php:3, hits: 1] >00003: $b = "a"; 00004: $a = $b.$b; 00005: $a[1] = "b"; prompt> [Added watchpoint #0 for $a] prompt> [$a has been removed, removing watchpoint] [Script ended normally] prompt> [Breakpoint at prompt> /tmp/guix-build-php-7.4.23.drv-0/php-7.4.23/sapi/phpdbg/tests/watch_004.php:3 exists] prompt> [Breakpoint at prompt> /tmp/guix-build-php-7.4.23.drv-0/php-7.4.23/sapi/phpdbg/tests/watch_004.php:3 exists] prompt> ---- FAILED watch_005.log ---------- ---- EXPECTED OUTPUT [Successful compilation of %s] prompt> [Breakpoint #0 added at %s:3] prompt> [Breakpoint #0 at %s:3, hits: 1] >00003: $b = "a"; 00004: $a = $b.$b; 00005: $c = &$a; prompt> [Added recursive watchpoint #0 for $a] prompt> [Breaking on watchpoint $a] Old value: New value: aa >00005: $c = &$a; 00006: $a[1] = "b"; 00007: prompt> [Breaking on watchpoint $a] Old value inaccessible or destroyed New value (reference): aa >00006: $a[1] = "b"; 00007: 00008: exit; prompt> [Breaking on watchpoint $a] Old value: aa New value: ab >00008: exit; 00009: prompt> [$a has been removed, removing watchpoint recursively] [Script ended normally] prompt> ---- ACTUAL OUTPUT [Successful compilation of /tmp/guix-build-php-7.4.23.drv-0/php-7.4.23/sapi/phpdbg/tests/watch_005.php] prompt> [Breakpoint #0 added at prompt> /tmp/guix-build-php-7.4.23.drv-0/php-7.4.23/sapi/phpdbg/tests/watch_005.php:3] prompt> [Breakpoint #0 at prompt> /tmp/guix-build-php-7.4.23.drv-0/php-7.4.23/sapi/phpdbg/tests/watch_005.php:3, hits: 1] >00003: $b = "a"; 00004: $a = $b.$b; 00005: $c = &$a; prompt> [Added recursive watchpoint #0 for $a] prompt> [$a has been removed, removing watchpoint recursively] [Script ended normally] prompt> [Breakpoint at prompt> /tmp/guix-build-php-7.4.23.drv-0/php-7.4.23/sapi/phpdbg/tests/watch_005.php:3 exists] prompt> [Breakpoint at prompt> /tmp/guix-build-php-7.4.23.drv-0/php-7.4.23/sapi/phpdbg/tests/watch_005.php:3 exists] prompt> [Breakpoint at prompt> /tmp/guix-build-php-7.4.23.drv-0/php-7.4.23/sapi/phpdbg/tests/watch_005.php:3 exists] prompt> ---- FAILED watch_006.log ---------- ---- EXPECTED OUTPUT [Successful compilation of %s] prompt> [Breakpoint #0 added at %s:4] prompt> [Breakpoint #0 at %s:4, hits: 1] >00004: $a[0] = 1; 00005: $b = &$a; 00006: $a[0] = 2; prompt> [Added watchpoint #0 for $a[0]] prompt> [Added recursive watchpoint #1 for $b] prompt> [Breaking on watchpoint $a[0]] Old value: 0 New value: 1 >00005: $b = &$a; 00006: $a[0] = 2; 00007: $a[1] = 3; prompt> [Breaking on watchpoint $b] Old value: New value (reference): Array ([0] => 1) >00006: $a[0] = 2; 00007: $a[1] = 3; 00008: $c = [1]; prompt> [Breaking on watchpoint $a[0]] Old value: 1 New value: 2 >00007: $a[1] = 3; 00008: $c = [1]; 00009: $b = &$c; prompt> [Element 1 has been added to watchpoint] [Breaking on watchpoint $b[]] 1 elements were added to the array >00008: $c = [1]; 00009: $b = &$c; 00010: prompt> [Breaking on watchpoint $b] Old value inaccessible or destroyed New value (reference): Array ([0] => 2,[1] => 3) >00009: $b = &$c; 00010: prompt> [Breaking on watchpoint $b] Old value inaccessible or destroyed New value (reference): Array ([0] => 1) >00010: prompt> [$b has been removed, removing watchpoint recursively] [$a[0] has been removed, removing watchpoint] [Script ended normally] prompt> ---- ACTUAL OUTPUT [Successful compilation of /tmp/guix-build-php-7.4.23.drv-0/php-7.4.23/sapi/phpdbg/tests/watch_006.php] prompt> [Breakpoint #0 added at prompt> /tmp/guix-build-php-7.4.23.drv-0/php-7.4.23/sapi/phpdbg/tests/watch_006.php:4] prompt> [Breakpoint #0 at prompt> /tmp/guix-build-php-7.4.23.drv-0/php-7.4.23/sapi/phpdbg/tests/watch_006.php:4, hits: 1] >00004: $a[0] = 1; 00005: $b = &$a; 00006: $a[0] = 2; prompt> [Added watchpoint #0 for $a[0]] prompt> [Added recursive watchpoint #1 for $b] prompt> [$a[0] has been removed, removing watchpoint] [$b has been removed, removing watchpoint recursively] [Script ended normally] prompt> [Breakpoint at prompt> /tmp/guix-build-php-7.4.23.drv-0/php-7.4.23/sapi/phpdbg/tests/watch_006.php:4 exists] prompt> [Breakpoint at prompt> /tmp/guix-build-php-7.4.23.drv-0/php-7.4.23/sapi/phpdbg/tests/watch_006.php:4 exists] prompt> [Breakpoint at prompt> /tmp/guix-build-php-7.4.23.drv-0/php-7.4.23/sapi/phpdbg/tests/watch_006.php:4 exists] prompt> [Breakpoint at prompt> /tmp/guix-build-php-7.4.23.drv-0/php-7.4.23/sapi/phpdbg/tests/watch_006.php:4 exists] prompt> [Breakpoint at prompt> /tmp/guix-build-php-7.4.23.drv-0/php-7.4.23/sapi/phpdbg/tests/watch_006.php:4 exists] prompt> [Breakpoint at prompt> /tmp/guix-build-php-7.4.23.drv-0/php-7.4.23/sapi/phpdbg/tests/watch_006.php:4 exists] prompt> ---- FAILED Previous Comments: ------------------------------------------------------------------------ [2021-09-02 04:45:17] bauermann at kolabnow dot com Description: ------------ As part of building the php package, Guix runs the testsuite. The following tests fail on powerpc64le-linux: ===================================================================== FAILED TEST SUMMARY --------------------------------------------------------------------- Test simple recursive watchpoint [sapi/phpdbg/tests/watch_001.phpt] Test simple watchpoint with replace [sapi/phpdbg/tests/watch_003.phpt] Test detection of inline string manipulations on zval watch [sapi/phpdbg/tests/watch_004.phpt] Test proper watch comparisons when having multiple levels of indirection from a zval to its value [sapi/phpdbg/tests/watch_005.phpt] Test multiple watch elements pointing to the same watchpoint [sapi/phpdbg/tests/watch_006.phpt] ===================================================================== I'll see if I can upload the test report and individual test logs for more information. From looking at the logs, it looks like watchpoints don't work on this platform. From a very cursory look at phpdbg_watch.c, it seems that it is sensitive to the page size, which on powerpc64le-linux is 64KB. This may be a shot in the dark, but perhaps the problem is related to this? The kernel version is 5.10.0-0.bpo.8-powerpc64le (Debian's buster kernel). Expected result: ---------------- All watchpoint tests pass. Actual result: -------------- The tests mentioned in the description are failing. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=81408&edit=1

« previous php.bugs (#236371) next »