Skip to content

2 tests fail on Alpinelinux s390x #16528

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

Closed
andypost opened this issue Oct 21, 2024 · 14 comments
Closed

2 tests fail on Alpinelinux s390x #16528

andypost opened this issue Oct 21, 2024 · 14 comments

Comments

@andypost
Copy link
Contributor

Description

Preparing a next release the rebuild required to upgrade to RC1 for new libxml but 2 tests fail using clang 18.1.8

The following failure #15168

TEST 8148/17152 [ext/json/tests/gh15168.phpt]
========DIFF========
     bool(false)
     int(1)
     string(28) "Maximum stack depth exceeded"
+ 
+ Termsig=0
========DONE========
�[1;31mFAIL�[0m GH-15168 (stack overflow in json_encode()) [ext/json/tests/gh15168.phpt] 

and another one #15169

TEST 15215/17151 [ext/standard/tests/serialize/gh15169.phpt]
========DIFF========
     Maximum call stack size reached. Infinite recursion?
�[1;32m002+ �[0m
�[1;32m003+ Termsig=0�[0m
========DONE========
�[1;31mFAIL�[0m GH-15169 (stack overflow when var serialization in ext/standard/var) [ext/standard/tests/serialize/gh15169.phpt] 

PHP Version

PHP 8.3.13RC1

Operating System

Alpinelinux

@iluuu1994
Copy link
Member

@andypost Can you check if this SKIPIF solves the problem for you?

if (!function_exists('zend_test_zend_call_stack_get')) die("skip zend_test_zend_call_stack_get() is not available");

I'm assuming the other stack limit tests also get skipped? E.g. Zend/tests/stack_limit/stack_limit_001.phpt

@andypost
Copy link
Contributor Author

I bet the function should exist as I do build zend_test module and other arches are passing tests

Moreover both tests passing in CI but fails on builder... so I'm lost a bit

@andypost
Copy link
Contributor Author

@iluuu1994 you can see full log from CI - all tests are executed and passed

@andypost
Copy link
Contributor Author

And here's a build log from builder

@iluuu1994
Copy link
Member

@andypost These methods exist conditionally, namely when ZEND_CHECK_STACK_LIMIT is declared.

I can't see stack_limit_001.phpt in your output, so are you sure you are compiling with zend_test? I can see them in the second log, where the new tests are also passing.

@andypost
Copy link
Contributor Author

andypost commented Oct 21, 2024

Yes, it's here in raw log

TEST 4153/17152 [Zend/tests/stack_limit/stack_limit_001.phpt]
�[1;32mPASS�[0m Stack limit 001 - Stack limit checks with max_allowed_stack_size detection [Zend/tests/stack_limit/stack_limit_001.phpt] 

@iluuu1994
Copy link
Member

Yes, it's here in raw log

But the two new tests are also passing in this build. Do you have one where:

  • stack_limit_001.phpt is running (and passing)
  • gh15168.phpt and gh15169.phpt are running (and failing)

@andypost
Copy link
Contributor Author

And here's a build log from builder

Here it was but env is the same just tests removed, in CI it passed as you see in full log

@iluuu1994
Copy link
Member

Ok, gotcha. Unfortunately, I don't know then.

@cmb69
Copy link
Member

cmb69 commented Oct 21, 2024

What does Termsig=0 mean? Has the test perhaps terminated, possibly because it took too long?

@arnaud-lb
Copy link
Member

A possibility is that the test is overflowing the stack during dtor of $firstNode (I'm not sure why Termsig would be 0 in this case however).

@andypost are you able to run the test suite with this patch? https://github.com/arnaud-lb/php-src/commit/5a279639bbc1fd9a34e48c359612e40c0b98e162.diff

@andypost
Copy link
Contributor Author

As I get PHP 8.3.13 and 8.4RC3 both randomly fails this test, used to build with clang 19.1.1 but gh15168 still fail - log

@arnaud-lb gonna apply patch and will report

@andypost
Copy link
Contributor Author

@arnaud-lb thank you! patch works somehow)

bell-sw pushed a commit to bell-sw/alpaquita-aports that referenced this issue Oct 28, 2024
[ commit 0f0a48250e2806c6a97c5dd0eb926d4a8bd2f1bc ]

ref php/php-src#16528
algitbot pushed a commit to alpinelinux/aports that referenced this issue Oct 29, 2024
bell-sw pushed a commit to bell-sw/alpaquita-aports that referenced this issue Oct 30, 2024
[ commit 8477ec2c4b478f3d3e986e296676ffa87fe6fa1f ]

ref php/php-src#16528
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants