kpumuk opened a new pull request, #3677: URL: https://github.com/apache/thrift/pull/3677
<!-- Explain the changes in the pull request below: --> Python process-pool tests currently stop the server through a four-second alarm and `os._exit(0)`. The abrupt exit bypasses normal multiprocessing cleanup, can report leaked semaphore objects, and forces every process-pool test to wait for the alarm. Observed macOS failures from this lifecycle include: - [macOS 15 Intel with Python 3.14](https://github.com/apache/thrift/actions/runs/29772369990/job/88454190096), where the alarm shut down `TProcessPoolServer` while the client was still running and emitted leaked-semaphore warnings. - [macOS 15 Intel with Python 3.12](https://github.com/apache/thrift/actions/runs/29755655340/job/88397891601), where the server exited with return code 0 before the harness completed. - [macOS 15 with Python 3.13](https://github.com/apache/thrift/actions/runs/28817226680/job/85471806532), where the earlier process-pool shutdown path deadlocked until GitHub Actions cancelled it at the six-hour limit. This change replaces the alarm with a `SIGTERM` handler that unwinds `TProcessPoolServer.serve()` through its existing `SystemExit` handling. The client/server harness waits for the complete POSIX process group to exit and falls back to `SIGKILL` only when graceful shutdown times out. Windows retains equivalent terminate-and-kill fallback behavior for its supported server types. This is a focused test-harness lifecycle fix, so Jira was intentionally skipped. <!-- 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) - [ ] If a ticket exists: Does your pull request title follow the pattern "THRIFT-NNNN: describe my issue"? - [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. <!-- 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]
