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

Update tests to work around segfault on PHP 8.4.4 with Xdebug 3.5.0-dev #173

Merged
merged 1 commit into from
Feb 22, 2025

Conversation

clue
Copy link
Owner

@clue clue commented Feb 22, 2025

This changeset updates the tests to work around a segfault on PHP 8.4.4 with Xdebug 3.5.0-dev.

We've started seeing consistent segfaults on PHP 8.4 only while working on #172. The tests worked just fine last Saturday (https://github.com/clue/reactphp-redis/actions/runs/13345833218) and started failing the next day (https://github.com/clue/reactphp-redis/actions/runs/13358390672) after applying some non-substantial style changes. Reverting these changes didn't change anything, so we went on to check for platform changes.

The build output above suggests the Saturday output used PHP 8.4.3, while Sunday used PHP 8.4.4. The shivammathur/setup-php@v2 action suggests both builds use the same Xdebug 3.5.0-dev enabled as coverage driver, while all older PHP versions use Xdebug-3.4.1. After toying around with some different approaches, it looks like always pinning this to the stable Xdebug version fixes this consistently, so I assume there might be some incompatibility between the Xdebug dev version and the most current PHP version only.

Using the stable Xdebug version seems reasonable and doesn't seem to cause any noticeable side-effects. I noticed only the PHP 8.4 install now takes ~15 seconds longer because the Xdebug version doesn't appear to be cached by default.

I wonder how widespread this problem would be exactly, as I don't see anything special that this project would execute (except perhaps for Fibers as of #149?). In either case, we should probably report this upstream to Xdebug and/or shivammathur/setup-php.

Builds on top of #164
Refs #172

@clue clue added this to the v3.0.0 milestone Feb 22, 2025
@clue clue requested a review from PaulRotmann February 22, 2025 09:32
Copy link
Collaborator

@PaulRotmann PaulRotmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes in code LGTM. Like already mentioned, reporting this might be best to avoid similar problems in other projects in future.

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

Successfully merging this pull request may close these issues.

2 participants