Improve PHPT hang diagnostics and fix flaky socket tests - #6190
Merged
Conversation
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.
Summary
[PHPT START]and[PHPT END]records with worker ID, status, and duration in CI logs--status-intervalto configure or disable this heartbeatsendfile_client_reset.phptdeterministic, bounded, and isolated with a unique temporary fileunixsocket2.phptwith a unique Unix socket path and explicit cleanupRoot causes found
closed.phpt: the listener was released whileSocket::connect()was yielding, allowing Linux to reset the queued connection and retainECONNRESETinstead of testing post-closeEBADFsendfile_client_reset.phpt: the random file could be smaller than the 2 MiB client-close threshold, leavingrecv()blocked on an HTTP/1.1 keep-alive connectionTESTprogress without a durable newline and did not track the active test per workerproc_close()unixsocket2.phptreused a repository-local socket path, so an initial transient failure poisoned every retry withEADDRINUSEValidation
close_before_resume.phptandexec_twice.phptboth PASS locally and in Linux x86 CI in about 0.2 to 0.3 secondssendfile_client_reset.phptPASS in Linux x86 full CI in 0.536 secondsunixsocket2.phptpassed five consecutive local runsmacOS still reports existing platform-sensitive failures in
swoole_coroutine_lock/lock.phptandswoole_curl/error.phpt; neither is a runner timeout or worker-state failure.