kpumuk opened a new pull request, #3667:
URL: https://github.com/apache/thrift/pull/3667

   <!-- Explain the changes in the pull request below: -->
   `RunClientServer.py` selected an unused port by binding a temporary socket, 
closing it, and then launching `TestServer.py` on the same port. Another 
process could claim the port during that gap, causing intermittent macOS 
failures with `OSError: [Errno 48] Address already in use`.
   
   Let each test server bind port `0` so the kernel allocates and owns the 
port, then report the bound port to the parent before the client starts. The 
same reporting path covers regular, SSL, and HTTP test servers; ephemeral HTTP 
tests bind to loopback and avoid hostname lookup during startup.
   
   Representative failures include [macOS 26 with Python 
3.11](https://github.com/apache/thrift/actions/runs/28428056279/job/84236838312),
 [macOS 14 with Python 
3.13](https://github.com/apache/thrift/actions/runs/28479363162/job/84412507597),
 [Intel macOS 15 with Python 
3.10](https://github.com/apache/thrift/actions/runs/29483032119/job/87571428887),
 [macOS 26 with Python 
3.10](https://github.com/apache/thrift/actions/runs/29489364010/job/87592990982),
 and [macOS 15 with Python 
3.13](https://github.com/apache/thrift/actions/runs/29780122799/job/88479733889).
 Each failed in the Python check while binding a test-server socket with 
`OSError: [Errno 48] Address already in use`.
     
   <!-- We recommend you review the checklist/tips before submitting a pull 
request. -->
   
   - [ ] Did you create an [Apache 
Jira](https://issues.apache.org/jira/projects/THRIFT/issues/) ticket?  
([Request account here](https://selfserve.apache.org/jira-account.html), not 
required for trivial changes) — Skipped at maintainer request for this focused 
test-harness fix.
   - [x] If a ticket exists: Does your pull request title follow the pattern 
"THRIFT-NNNN: describe my issue"? — No ticket exists.
   - [x] Did you squash your changes to a single commit?  (not required, but 
preferred)
   - [x] Did you do your best to avoid breaking changes?  If one was needed, 
did you label the Jira ticket with "Breaking-Change"?
   - [ ] If your change does not involve any code, include `[skip ci]` anywhere 
in the commit message to free up build resources. — Not applicable; this 
changes Python test-harness code.
   
   <!--
     The Contributing Guide at:
     https://github.com/apache/thrift/blob/master/CONTRIBUTING.md
     has more details and tips for committing properly.
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to