Also happens on Fedora 33 with:
containers-common-1-16.fc33.noarch
libseccomp-2.5.0-3.fc33.x86_64
podman-3.1.2-2.fc33.x86_64
+++ This bug was initially created as a clone of Bug #1985499 +++
Fedora 35 and RHEL 9 Beta will first attempt to use the clone3 system call for thread creation.
The changes are not yet in mainline Fedora rawhide (as a mass rebuild is under way). Builds are available in Koji: glibc-2.33.9000-44.fc35 or later, or glibc-2.33.9000-46.el9 or later.
After the glibc upgrade, thread creation is no longer possible:
# python3 -c 'import threading; threading.Thread(None, lambda: 0).start()'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib64/python3.10/threading.py", line 928, in start
_start_new_thread(self._bootstrap, ())
RuntimeError: can't start new thread
strace from outside the container shows the problematic EPERM error:
2667529 clone3({flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, child_tid=0x7fd5c687f910, parent_tid=0x7fd5c687f910, exit_signal=0, stack=0x7fd5c607f000, stack_size=0x7fff00, tls=0x7fd5c687f640}, 88) = -1 EPERM (Operation not permitted)