FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[RFC] Improve tests to temporarily downgrade to Xdebug 3.4.1 due to segfaults by clue · Pull Request #322 · reactphp/socket · GitHub

[RFC] Improve tests to temporarily downgrade to Xdebug 3.4.1 due to segfaults - #322

Closed
clue wants to merge 1 commit into
reactphp:3.xfrom
clue-labs:xdebug-segfault
Closed

[RFC] Improve tests to temporarily downgrade to Xdebug 3.4.1 due to segfaults#322
clue wants to merge 1 commit into
reactphp:3.xfrom
clue-labs:xdebug-segfault

Conversation

clue commented Mar 13, 2025

Copy link
Copy Markdown
Member

This changeset updates the test environment to work around a segfault with Xdebug 3.4.2. Right now, this causes an unrelated build error for all builds on Windows and macOS with PHP 8.1+ (see also clue/reactphp-redis#173 and clue/framework-x#276).

I've tried multiple approaches and it looks like this issue does not occur in Xdebug 3.4.1. The Linux builds happen to use the correct version, macOS can be downgraded just fine, but unfortunately I've been unable to downgrade on Windows (shivammathur/setup-php#923).

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 #296?). In either case, we should probably report this upstream to Xdebug and/or shivammathur/setup-php.

Builds on top of #321, #238 and clue/framework-x#276 and clue/reactphp-redis#173

clue added this to the v3.0.0 milestone Mar 13, 2025
clue requested review from PaulRotmann and WyriHaximus March 13, 2025 08:38

PaulRotmann left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

In my opinion, we should report the problem upstream to Xdebug in order to potentially find a final solution.

The workaround itself does solve the problem locally, but I can imagine that it might reappear at some point in the future and cost us a lot of time again.

By reporting the issue upstream, we might be able to resolve the problem at the root.

Copy link
Copy Markdown
Member

I'm with @PaulRotmann on this one. This should be reported upstream first, and we should only implement it if it blocks us. Once the issue is resolved upstream, we can then revert that change.

Alternatively we could also consider using PCOV for coverage instead.

clue commented Apr 1, 2025

Copy link
Copy Markdown
Member Author

I've managed to come up with a reproducible script that shows this is a bug in Xdebug 3.4.2 only with nested fibers and have reported this upstream accordingly last week: https://bugs.xdebug.org/view.php?id=2332. This is something that took the better half of the day. The bad news is this is something that will affect pretty much any project using fibers and Xdebug with code coverage enabled. The good news is this should not affect production at least.

I'm not sure how to best proceed here at the moment. I think it's best resolved upstream and there's hope this will happen within a reasonable time frame. If not, we would have to go through all affected repositories (talking a few dozens here, times number of supported version branches), pin this to an old Xdebug version and eventually revert all these changes once an upstream fix is released. Fingers crossed we can avoid this.

Copy link
Copy Markdown
Member

Lets wait before Derick replies about reverting the changes or not before considering that.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

3 participants


Back | FazBrowse Home | New Git URL