[Bug]: Python code hangs in macOS 26.1 with Rosetta 2
- Dominant language
- Swift
- Stars
- 49.9k
- Forks
- 1.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 22
Description
### I have done the following
- [x] I have searched the existing issues
- [x] If possible, I've reproduced the issue using the 'main' branch of this project
### Steps to reproduce
Upgrade macOS 26.1 .
```
> cat test.py
import zmq
import subprocess
if __name__ == "__main__":
print(f"creating context...")
context = zmq.Context()
print(f"creating socket...")
socket = context.socket(zmq.REP)
print(f"about to run cmd...")
result = subprocess.Popen("date")
print(f"FINISHED!")
> container run -it --name hang --mount source=.,target=/tmp/hang --platform linux/amd64 python:3-slim /bin/bash
root@hang:/# pip3 install pyzmq
...
root@hang:/# pip3 list | grep zmq
pyzmq 27.1.0
root@hang:/# python3 /tmp/hang/test.py
creating context...
creating socket...
about to run cmd...
```
Command `python3 /tmp/hang/test.py` running in container will hang forever.
### Current behavior
The script is just a abstraction of my actual running code which is used for automation testing.
If I follow the same steps in macOS 26.0, it will run to finish, no hang issue.
If I follow the same steps in macOS 26.1 but with platform arm64 for the image and the container, it will run to finish, no hang issue as well.
I also trie with different Python versions, or event different pyzmq versions, things don't change.
So it seems to be just relative to the macOS 26.1 together with Rosetta 2.
### Expected behavior
The script should run to finish instead of hanging forever.
### Environment
```markdown
- OS: macOS 26.1 (25B78)
- Xcode: not installed
- Container: container CLI version 0.7.1 (build: release, commit: unspeci)
```
### Relevant log output
```shell
N/A
```
### Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Contributor guide
Research direction
Start by reproducing test.py with container CLI 0.7.1 using the linux/amd64 python:3-slim image on macOS 26.1 under Rosetta 2, then compare with macOS 26.0 and an arm64 container. Trace the container CLI's amd64/Rosetta execution path; done means the shown script reaches “FINISHED!” without hanging.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, python, swift
- Domain
- cli, infrastructure, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100