Repository navigation
Conversation
huggingface_hub closes its shared httpx client in every forked child through an at-fork hook. A tool or sidecar spawned with preexec_fn runs that hook before exec, and it blocks forever on an httpx lock another thread held at the fork, leaving the tool call stuck in Running. A before-fork hook now makes the live client's close a no-op outside the process that owns it, so the child keeps it referenced and execs.
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a73163af8e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Codex converged and CI finished on a73163a; results posted upstream in unslothai#12234. |
Staging copy of unslothai#12234 for Codex review and CI. Base is the upstream PR merge base, so the diff is exactly the PR. Head is identical to the upstream PR head (
a73163af8e). Do not merge; closed once Codex converges and CI finishes.Since the chat database started reusing connections, a terminal or Python tool call now and then never starts. Its card stays on Running far past Max Tool Call Duration and Stop cannot clear it. It is more likely when several chats are busy at once.
Starting a tool forks Studio, and the copy tried to close database connections owned by other threads. If one of them was mid-query at that moment, the copy waited forever on its lock. Now the copy leaves them alone and the tool starts normally.
With eight busy project chats on main, 29 of about 1,260 terminal calls got stuck this way. On this branch none of 1,306 did. unslothai#12087 fixed a different hang (the credential check on commands like
echo "A=$A") and closed the issue, but this one still happens with it merged. Two branch calls still stalled on the Hugging Face client's own cleanup in the forked copy, which is a separate issue.Refs unslothai#12048
The second commit also covers the other instance of the same hang: huggingface_hub closes its shared httpx client in every forked child through an at-fork hook, which a preexec_fn child runs before exec and can block on an httpx lock another thread held at the fork. A before-fork hook in
utils/hub_settings.pynow makes that close a no-op outside the owning process.