After the pain of upgrading python to version 3.7 (dev-lang/python-3.7.7-r2) ansible is no longer working: ~> ANSIBLE_FORCE_COLOR=true ansible-pull --url=git@xxx:ansible --inventory=hosts --private-key=/root/.ssh/ansible.key --vault-id=/etc/ansible/vault.pw --full postinstall.yaml -vvv ansible-pull 2.9.7 config file = /etc/ansible/ansible.cfg configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.7/site-packages/ansible executable location = /usr/lib/python-exec/python3.7/ansible-pull python version = 3.7.7 (default, Apr 25 2020, 14:05:00) [GCC 9.3.0] Using /etc/ansible/ansible.cfg as config file Starting Ansible Pull at 2020-05-08 16:18:49 /usr/lib/python-exec/python3.7/ansible-pull --url=git@tschil:ansible --inventory=hosts --private-key=/root/.ssh/ansible.key --vault-id=/etc/ansible/vault.pw --full postinstall.yaml -vvv ansible 2.9.7 config file = /etc/ansible/ansible.cfg configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.7/site-packages/ansible executable location = /usr/lib/python-exec/python3.7/ansible python version = 3.7.7 (default, Apr 25 2020, 14:05:00) [GCC 9.3.0] Using /etc/ansible/ansible.cfg as config file Parsed localhost, inventory source with host_list plugin [WARNING]: Could not match supplied host pattern, ignoring: xxx ERROR! Unexpected Exception, this is probably a bug: This platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed will not function, see issue 3770. the full traceback was: Traceback (most recent call last): File "/usr/lib/python3.7/multiprocessing/synchronize.py", line 28, in <module> from _multiprocessing import SemLock, sem_unlink ImportError: cannot import name 'SemLock' from '_multiprocessing' (/usr/lib/python3.7/lib-dynload/_multiprocessing.cpython-37m-x86_64-linux-gnu.so) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python-exec/python3.7/ansible", line 123, in <module> exit_code = cli.run() File "/usr/lib/python3.7/site-packages/ansible/cli/adhoc.py", line 160, in run forks=context.CLIARGS['forks'], File "/usr/lib/python3.7/site-packages/ansible/executor/task_queue_manager.py", line 100, in __init__ self._final_q = multiprocessing_context.Queue() File "/usr/lib/python3.7/multiprocessing/context.py", line 102, in Queue return Queue(maxsize, ctx=self.get_context()) File "/usr/lib/python3.7/multiprocessing/queues.py", line 39, in __init__ from .synchronize import SEM_VALUE_MAX as maxsize File "/usr/lib/python3.7/multiprocessing/synchronize.py", line 32, in <module> " synchronization primitives needed will not" + ImportError: This platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed will not function, see issue 3770. No idea where I should search for that bug 3770, it is no gentoo bug, it is also no ansible bug. This bug is really fatal as I depend on a working ansible! Reproducible: Always Actual Results: ImportError: This platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed will not function, see issue 3770. Expected Results: Working ansible run app-admin/ansible-2.9.7
I can close that bug. IT did happen due to moving to a separate build host in chroot. I missed to mount /dev/shm as tmpfs. The python that was build later did not have the shm feature. This might be still a bug that python accept to compile that way but for me the bug was solved after rebuilding python after mounting that dir.