Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3 fiber tests fails on ppc64le Alpinelinux #10512

Open
andypost opened this issue Feb 5, 2023 · 6 comments
Open

3 fiber tests fails on ppc64le Alpinelinux #10512

andypost opened this issue Feb 5, 2023 · 6 comments

Comments

@andypost
Copy link
Contributor

andypost commented Feb 5, 2023

Description

The following tests are always fails at CI and builders:

Zend/tests/fibers/no-switch-force-close-finally.phpt
Zend/tests/fibers/suspend-in-force-close-fiber-after-shutdown.phpt
Zend/tests/fibers/throw-in-multiple-destroyed-fibers-after-shutdown.phpt

Resulted in this output:

TEST 2620/15985 [Zend/tests/fibers/no-switch-force-close-finally.phpt]
========DIFF========
     finally
002- 
003- Fatal error: Uncaught FiberError: Cannot switch fibers in current execution context in %sno-switch-force-close-finally.php:%d
004- Stack trace:
005- #0 %sno-switch-force-close-finally.php(%d): Fiber->start()
006- #1 [internal function]: {closure}()
007- #2 {main}
008-   thrown in %sno-switch-force-close-finally.php on line %d
========DONE========
FAIL Cannot start a new fiber in a finally block in a force-closed fiber [Zend/tests/fibers/no-switch-force-close-finally.phpt] 
...
TEST 2636/15985 [Zend/tests/fibers/suspend-in-force-close-fiber-after-shutdown.phpt]
========DIFF========
     done
002- 
003- Fatal error: Uncaught FiberError: Cannot suspend in a force-closed fiber in %ssuspend-in-force-close-fiber-after-shutdown.php:%d
004- Stack trace:
005- #0 %ssuspend-in-force-close-fiber-after-shutdown.php(%d): Fiber::suspend()
006- #1 [internal function]: {closure}()
007- #2 {main}
008-   thrown in %ssuspend-in-force-close-fiber-after-shutdown.php on line %d
========DONE========
FAIL Suspend in force-closed fiber after shutdown [Zend/tests/fibers/suspend-in-force-close-fiber-after-shutdown.phpt] 
...
TEST 2642/15985 [Zend/tests/fibers/throw-in-multiple-destroyed-fibers-after-shutdown.phpt]
========DIFF========
     done
002- 
003- Fatal error: Uncaught Exception: test1 in %sthrow-in-multiple-destroyed-fibers-after-shutdown.php:%d
004- Stack trace:
005- #0 [internal function]: {closure}()
006- #1 {main}
007- 
008- Next Exception: test2 in %sthrow-in-multiple-destroyed-fibers-after-shutdown.php:%d
009- Stack trace:
010- #0 [internal function]: {closure}()
011- #1 {main}
012-   thrown in %sthrow-in-multiple-destroyed-fibers-after-shutdown.php on line %d
========DONE========
FAIL Throw in multiple destroyed fibers after shutdown [Zend/tests/fibers/throw-in-multiple-destroyed-fibers-after-shutdown.phpt] 

But it works properly all other arches

PHP Version

PHP 8.1+

Operating System

Alpinelinux

@nielsdos
Copy link
Member

nielsdos commented Feb 5, 2023

I set up an Alpine ppc64le install on qemu (with software emulation to emulate the ppc CPU, which really tests my patience...) and I can't reproduce this.
Can you send which configuration you used for php? Also maybe sent your ./main/php_config.h ?
EDIT: Does the problem occur both with and without JIT?

@andypost
Copy link
Contributor Author

andypost commented Feb 13, 2023

@nielsdos I'm using to clone https://gitlab.alpinelinux.org/alpine/aports/ and following Makefile

IMAGE_ALP=alpinelinux/alpine-gitlab-ci:latest-

puller = docker pull $(IMAGE_ALP)

builder = docker run --rm -it -u 0:0 \
	--cap-add=SYS_PTRACE --privileged --platform=linux/$(or ${2},${1}) \
	--network host --pull=always \
	-v $(shell pwd):/mnt -e APORTSDIR=/mnt -w /mnt \
	--entrypoint='' $(IMAGE_ALP)${1} /bin/ash

ppc:
#	$(call puller,ppc64le)
	$(call builder,ppc64le)

x64:
#	$(call puller,x86_64)
	$(call builder,x86_64)
  • echo 'https://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories
  • su buildozer

Then cd community/php82 and abuild unpack prepare build check

@andypost
Copy link
Contributor Author

andypost commented Mar 1, 2023

Just got results from 8.1.17RC1 and 8.2.4RC1 and one more test failed on ppc64le

TEST 2967/15595 [Zend/tests/gh9916-009.phpt]
========DIFF========
     Before suspend
     ==DONE==
     Finally
[1;31m004- [0m
[1;31m005- Fatal error: Uncaught Error: Cannot use "yield from" in a force-closed generator in %s:%d[0m
[1;31m006- Stack trace:[0m
[1;31m007- #0 [internal function]: {closure}()[0m
[1;31m008- #1 %s(%d): Generator->current()[0m
[1;31m009- #2 [internal function]: {closure}()[0m
[1;31m010- #3 {main}[0m
[1;31m011-   thrown in %s on line %d[0m
========DONE========

@andypost
Copy link
Contributor Author

andypost commented Mar 1, 2023

@nielsdos
Copy link
Member

nielsdos commented Mar 2, 2023

It's weird that the test appears to give the correct output except for the exception.
I feel like the tests are actually executing correctly, and the exceptions must be thrown correctly because otherwise we would see the string "Not executed" in the output. It looks like it's just the exception does not get printed even though it is there.

@andypost
Copy link
Contributor Author

andypost commented Mar 4, 2023

It's often caused some big-little endianess but ppc64 here is LE but no other LE arches fail

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants