Univention Bugzilla – Bug 40133
uvmmd-nodes.py throws SystemError: dynamic module not initialized properly
Last modified: 2016-01-13 13:11:32 CET
Ticket#2015113021000481 UCS 4.0-4 errata363 listener.log shows (frequently): 30.11.15 11:56:28.524 LISTENER ( ERROR ) : import of filename=/usr/lib/univention-directory-listener/system/uvmmd-nodes.py failed Traceback (most recent call last): File "/usr/lib/univention-directory-listener/system/uvmmd-nodes.py", line 44, in <module> from univention.uvmm.uvmm_ldap import SERVICES, ldap2fqdn File "/usr/lib/pymodules/python2.7/univention/uvmm/uvmm_ldap.py", line 46, in <module> from helpers import TranslatableException, N_ as _, FQDN as HOST_FQDN File "/usr/lib/pymodules/python2.7/univention/uvmm/helpers.py", line 77, in <module> import libvirt File "/usr/lib/pymodules/python2.7/libvirt.py", line 20, in <module> import libvirtmod SystemError: dynamic module not initialized properly 30.11.15 11:56:28.524 LISTENER ( ERROR ) : import of filename=/usr/lib/univention-directory-listener/system/uvmmd-nodes.py failed in module_import()
I've found this trace on two other customer systems as well running UCS 4.0-0 and UCS 4.0-4 amd64 as well as i386 (4.1.0-ucs153-amd64 and 2.6.32-ucs64-amd64). Reproduction is not possible by simply importing the modules into the python interpreter but only by PyImport_ExecCodeModuleEx in handler.c
The call to initlibvirtmod() fails, as virGlobalInit() checks for getuid()=0 == geteuid()=100 and aborts. # python -c 'import pwd,os;os.seteuid(pwd.getpwnam("listener").pw_uid);import libvirt' Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/pymodules/python2.7/libvirt.py", line 20, in <module> import libvirtmod SystemError: dynamic module not initialized properly This is so since libvirt-1.2.X.
(In reply to Philipp Hahn from comment #2) > This is so since libvirt-1.2.X. Since v1.1.4 to fix CVE-2013-4400(-3)
r66332 | Bug #40133 UVMM: Remove unused imports Remove unused import of libvirt Package: univention-virtual-machine-manager-daemon Version: 5.0.1-8.611.201512150831 Branch: ucs_4.1-0 Scope: errata4.1-0 r66335 | Bug #40133 UVMM: Remove unused imports YAML univention-virtual-machine-manager-daemon.yaml
Fix: OK YAML: OK
<http://errata.software-univention.de/ucs/4.1/53.html>