Open
Conversation
There is an issue where this fread can block up to 5 seconds. Fix it by not issuing fread() if stream_select() say there is nothing to read. Encountered a strange issue on Ubuntu24.04 where stream_select() would incorrectly return 0 if we had never ran fread() on the socket, so made a workaround to always call fread the first time, even if socket_select() say there is nothing to read. - resolves chrome-php/chrome#711 - resolves chrome-php/chrome#646 - resolves chrome-php/chrome#704 - probably resolves chrome-php/chrome#710
This was referenced Mar 16, 2026
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There is an issue where this fread can block up to 5 seconds when there is nothing to read.
Fix it by not issuing fread() if stream_select() say there is nothing to read.
Also encountered a strange issue on PHP8.4.12 Ubuntu24.04 where stream_select() would incorrectly return 0 if we had never ran fread() on the socket, so made a workaround to always call fread the first time, even if stream_select() say there is nothing to read.
resolves performance issue with Page::getCurentUrl() chrome#711
resolves PageNavigation constructor: 2 seconds delay BEFORE sending the Page.navigate message to the browser (keepAlive problem?) chrome#646
probably resolves Timeout issues when setting cookies chrome#704
probably resolves Operation timed out after 5s chrome#710
probably resolves Exception: OperationTimedOut on Chrome 131.0.6778.109 chrome#669
Reproduce script:
output before this patch:
(Had to ctrl+c cancel it because it was taking so long...)
Output after this patch: