Can't run virt-manager (Qemu) Segmentation fault

Hi!

A few days ago, I upgraded to UbuntuMate 19.04.

I can't run 'virt-manager' because of this:

virt-manager

Output: Segmentation fault

kernel: [ 2003.888116] virt-manager[16014]: segfault at 32d0 ip 00000000000032d0 sp 00007ffeb09ac658 error 14 in python3.7[400000+21000]

kernel: [ 2003.888124] Code: Bad RIP value.

PYTHONDEVMODE=1 virt-manager --no-fork

Fatal Python error: Segmentation fault

Current thread 0x00007f835bafd740 (most recent call first):
File "", line 219 in _call_with_frames_removed
File "", line 1043 in create_module
File "", line 583 in module_from_spec
File "", line 670 in _load_unlocked
File "", line 967 in _find_and_load_unlocked
File "", line 983 in _find_and_load
File "/usr/lib/python3.7/lzma.py", line 27 in
File "", line 219 in _call_with_frames_removed
File "", line 728 in exec_module
File "", line 677 in _load_unlocked
File "", line 967 in _find_and_load_unlocked
File "", line 983 in _find_and_load
File "/usr/lib/python3.7/shutil.py", line 29 in
File "", line 219 in _call_with_frames_removed
File "", line 728 in exec_module
File "", line 677 in _load_unlocked
File "", line 967 in _find_and_load_unlocked
File "", line 983 in _find_and_load
File "/usr/lib/python3.7/tempfile.py", line 44 in
File "", line 219 in _call_with_frames_removed
File "", line 728 in exec_module
File "", line 677 in _load_unlocked
File "", line 967 in _find_and_load_unlocked
File "", line 983 in _find_and_load
File "/usr/lib/python3/dist-packages/apport/report.py", line 12 in
File "", line 219 in _call_with_frames_removed
File "", line 728 in exec_module
File "", line 677 in _load_unlocked
File "", line 967 in _find_and_load_unlocked
File "", line 983 in _find_and_load
File "/usr/lib/python3/dist-packages/apport/init.py", line 5 in
File "", line 219 in _call_with_frames_removed
File "", line 728 in exec_module
File "", line 677 in _load_unlocked
File "", line 967 in _find_and_load_unlocked
File "", line 983 in _find_and_load
File "", line 219 in _call_with_frames_removed
File "", line 953 in _find_and_load_unlocked
File "", line 983 in _find_and_load
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63 in apport_excepthook
Segmentation fault

So I made a test and removed the file: "/usr/lib/python3/dist-packages/apport_python_hook.py"

...so the output of

PYTHONDEVMODE=1 virt-manager --no-fork

is now:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/libvirt.py", line 24, in
import cygvirtmod as libvirtmod
ModuleNotFoundError: No module named 'cygvirtmod'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/share/virt-manager/virt-manager", line 20, in
from virtinst import util
File "/usr/share/virt-manager/virtinst/init.py", line 26, in
from virtinst import util
File "/usr/share/virt-manager/virtinst/util.py", line 15, in
import libvirt
File "/usr/lib/python3/dist-packages/libvirt.py", line 28, in
raise lib_e
File "/usr/lib/python3/dist-packages/libvirt.py", line 20, in
import libvirtmod
ImportError: /usr/lib/x86_64-linux-gnu/libhogweed.so.4: symbol nettle_cnd_memcpy version NETTLE_6 not defined in file libnettle.so.6 with link time reference

Can someone help me to fix that?

I started a thread here, too...
https://bugs.launchpad.net/ubuntu-mate/+bug/1838402

Dear @mate2go it seems to be another problem with your libraries from /usr/local/lib.
I can't reproduce your problem on clean install of Ubuntu MATE 19.04.

Please show the output of the following three commands:

ls -al /usr/local/lib
locate libnettle.so.6
ldd /usr/lib/x86_64-linux-gnu/libhogweed.so.4

Also you should not manually remove files which are controlled by APT. This may end with big mess. You have to reinstall removed file with

sudo apt-get install --reinstall python3-apport

@ Norbert_X...

ls -al /usr/local/lib

Output:

drwxr-xr-x 5 root root 4096 Jun 22 2018 cmake
drwxr-xr-x 2 root root 4096 Okt 10 2018 engines-1.1
-rw-r--r-- 1 root root 151152 Jun 22 2018 libassuan.a
-rwxr-xr-x 1 root root 994 Jun 22 2018 libassuan.la
lrwxrwxrwx 1 root root 18 Jun 22 2018 libassuan.so -> libassuan.so.0.8.1
lrwxrwxrwx 1 root root 18 Jun 22 2018 libassuan.so.0 -> libassuan.so.0.8.1
-rwxr-xr-x 1 root root 76784 Jun 22 2018 libassuan.so.0.8.1
-rw-r--r-- 1 root root 812256 Jul 16 2017 libcurl.so
lrwxrwxrwx 1 root root 13 Jun 14 12:09 libdnet -> libdnet.1.0.1
lrwxrwxrwx 1 root root 13 Jun 14 12:09 libdnet.1 -> libdnet.1.0.1
-rwxr-xr-x 1 root root 208328 Jun 14 12:09 libdnet.1.0.1
-rw-r--r-- 1 root root 350550 Jun 14 12:09 libdnet.a
-rwxr-xr-x 1 root root 778 Jun 14 12:09 libdnet.la
lrwxrwxrwx 1 root root 21 Jun 21 2017 libevent-2.1.so.6 -> libevent-2.1.so.6.0.2
-rwxr-xr-x 1 root root 1421656 Jun 21 2017 libevent-2.1.so.6.0.2
-rw-r--r-- 1 root root 2391272 Jun 21 2017 libevent.a
lrwxrwxrwx 1 root root 26 Jun 21 2017 libevent_core-2.1.so.6 -> libevent_core-2.1.so.6.0.2
-rwxr-xr-x 1 root root 923248 Jun 21 2017 libevent_core-2.1.so.6.0.2
-rw-r--r-- 1 root root 1584510 Jun 21 2017 libevent_core.a
-rwxr-xr-x 1 root root 979 Jun 21 2017 libevent_core.la
lrwxrwxrwx 1 root root 26 Jun 21 2017 libevent_core.so -> libevent_core-2.1.so.6.0.2
lrwxrwxrwx 1 root root 27 Jun 21 2017 libevent_extra-2.1.so.6 -> libevent_extra-2.1.so.6.0.2
-rwxr-xr-x 1 root root 526464 Jun 21 2017 libevent_extra-2.1.so.6.0.2
-rw-r--r-- 1 root root 806834 Jun 21 2017 libevent_extra.a
-rwxr-xr-x 1 root root 986 Jun 21 2017 libevent_extra.la
lrwxrwxrwx 1 root root 27 Jun 21 2017 libevent_extra.so -> libevent_extra-2.1.so.6.0.2
-rwxr-xr-x 1 root root 944 Jun 21 2017 libevent.la
lrwxrwxrwx 1 root root 30 Jun 21 2017 libevent_pthreads-2.1.so.6 -> libevent_pthreads-2.1.so.6.0.2
-rwxr-xr-x 1 root root 26496 Jun 21 2017 libevent_pthreads-2.1.so.6.0.2
-rw-r--r-- 1 root root 26374 Jun 21 2017 libevent_pthreads.a
-rwxr-xr-x 1 root root 1007 Jun 21 2017 libevent_pthreads.la
lrwxrwxrwx 1 root root 30 Jun 21 2017 libevent_pthreads.so -> libevent_pthreads-2.1.so.6.0.2
lrwxrwxrwx 1 root root 21 Jun 21 2017 libevent.so -> libevent-2.1.so.6.0.2
-rwxr-xr-x 1 root root 987 Jun 22 2018 libgcrypt.la
lrwxrwxrwx 1 root root 19 Jun 22 2018 libgcrypt.so -> libgcrypt.so.20.2.3
lrwxrwxrwx 1 root root 19 Jun 22 2018 libgcrypt.so.20 -> libgcrypt.so.20.2.3
-rwxr-xr-x 1 root root 1160584 Jun 22 2018 libgcrypt.so.20.2.3
-rw-r--r-- 1 root root 228922 Jun 22 2018 libgpg-error.a
-rwxr-xr-x 1 root root 970 Jun 22 2018 libgpg-error.la
lrwxrwxrwx 1 root root 22 Jun 22 2018 libgpg-error.so -> libgpg-error.so.0.24.2
lrwxrwxrwx 1 root root 22 Jun 22 2018 libgpg-error.so.0 -> libgpg-error.so.0.24.2
-rwxr-xr-x 1 root root 130120 Jun 22 2018 libgpg-error.so.0.24.2
-rwxr-xr-x 1 root root 1011 Jun 22 2018 libgpgme.la
-rwxr-xr-x 1 root root 1045 Jun 22 2018 libgpgmepp.la
lrwxrwxrwx 1 root root 19 Jun 22 2018 libgpgmepp.so -> libgpgmepp.so.6.7.0
lrwxrwxrwx 1 root root 19 Jun 22 2018 libgpgmepp.so.6 -> libgpgmepp.so.6.7.0
-rwxr-xr-x 1 root root 379360 Jun 22 2018 libgpgmepp.so.6.7.0
lrwxrwxrwx 1 root root 19 Jun 22 2018 libgpgme.so -> libgpgme.so.11.20.1
lrwxrwxrwx 1 root root 19 Jun 22 2018 libgpgme.so.11 -> libgpgme.so.11.20.1
-rwxr-xr-x 1 root root 299416 Jun 22 2018 libgpgme.so.11.20.1
-rwxr-xr-x 1 root root 974 Jun 22 2018 libksba.la
lrwxrwxrwx 1 root root 17 Jun 22 2018 libksba.so -> libksba.so.8.11.6
lrwxrwxrwx 1 root root 17 Jun 22 2018 libksba.so.8 -> libksba.so.8.11.6
-rwxr-xr-x 1 root root 231872 Jun 22 2018 libksba.so.8.11.6
-rw-r--r-- 1 root root 242963278 Apr 15 2017 libLLVMAnalysis.a
-rw-r--r-- 1 root root 10710506 Apr 15 2017 libLLVMAsmParser.a
-rw-r--r-- 1 root root 85833268 Apr 15 2017 libLLVMAsmPrinter.a
-rw-r--r-- 1 root root 16588392 Apr 15 2017 libLLVMBitReader.a
-rw-r--r-- 1 root root 14183208 Apr 15 2017 libLLVMBitWriter.a
-rw-r--r-- 1 root root 557479532 Apr 15 2017 libLLVMCodeGen.a
-rw-r--r-- 1 root root 145495306 Apr 15 2017 libLLVMCore.a
-rw-r--r-- 1 root root 17475478 Apr 15 2017 libLLVMCoroutines.a
-rw-r--r-- 1 root root 6219412 Apr 15 2017 libLLVMCoverage.a
-rw-r--r-- 1 root root 15268380 Apr 15 2017 libLLVMDebugInfoCodeView.a
-rw-r--r-- 1 root root 15196434 Apr 15 2017 libLLVMDebugInfoDWARF.a
-rw-r--r-- 1 root root 3715466 Apr 15 2017 libLLVMDebugInfoMSF.a
-rw-r--r-- 1 root root 26281932 Apr 15 2017 libLLVMDebugInfoPDB.a
-rw-r--r-- 1 root root 571874 Apr 15 2017 libLLVMDemangle.a
-rw-r--r-- 1 root root 7434934 Apr 15 2017 libLLVMExecutionEngine.a
-rw-r--r-- 1 root root 245990 Apr 15 2017 libLLVMGlobalISel.a
-rw-r--r-- 1 root root 56918210 Apr 15 2017 libLLVMInstCombine.a
-rw-r--r-- 1 root root 48435700 Apr 15 2017 libLLVMInstrumentation.a
-rw-r--r-- 1 root root 7527888 Apr 15 2017 libLLVMInterpreter.a
-rw-r--r-- 1 root root 97682474 Apr 15 2017 libLLVMipo.a
-rw-r--r-- 1 root root 1661406 Apr 15 2017 libLLVMIRReader.a
-rw-r--r-- 1 root root 1144968 Apr 15 2017 libLLVMLibDriver.a
-rw-r--r-- 1 root root 510682 Apr 15 2017 libLLVMLineEditor.a
-rw-r--r-- 1 root root 7472502 Apr 15 2017 libLLVMLinker.a
-rw-r--r-- 1 root root 28902202 Apr 15 2017 libLLVMLTO.a
-rw-r--r-- 1 root root 47028542 Apr 15 2017 libLLVMMC.a
-rw-r--r-- 1 root root 2600092 Apr 15 2017 libLLVMMCDisassembler.a
-rw-r--r-- 1 root root 2830062 Apr 15 2017 libLLVMMCJIT.a
-rw-r--r-- 1 root root 9852284 Apr 15 2017 libLLVMMCParser.a
-rw-r--r-- 1 root root 13019734 Apr 15 2017 libLLVMMIRParser.a
-rw-r--r-- 1 root root 22789126 Apr 15 2017 libLLVMObjCARCOpts.a
-rw-r--r-- 1 root root 20990696 Apr 15 2017 libLLVMObject.a
-rw-r--r-- 1 root root 7922044 Apr 15 2017 libLLVMObjectYAML.a
-rw-r--r-- 1 root root 1910740 Apr 15 2017 libLLVMOption.a
-rw-r--r-- 1 root root 20966458 Apr 15 2017 libLLVMOrcJIT.a
-rw-r--r-- 1 root root 28089992 Apr 15 2017 libLLVMPasses.a
-rw-r--r-- 1 root root 12769156 Apr 15 2017 libLLVMProfileData.a
-rw-r--r-- 1 root root 11923550 Apr 15 2017 libLLVMRuntimeDyld.a
-rw-r--r-- 1 root root 260215244 Apr 15 2017 libLLVMScalarOpts.a
-rw-r--r-- 1 root root 132350516 Apr 15 2017 libLLVMSelectionDAG.a
-rw-r--r-- 1 root root 32317242 Apr 15 2017 libLLVMSupport.a
-rw-r--r-- 1 root root 3473300 Apr 15 2017 libLLVMSymbolize.a
-rw-r--r-- 1 root root 10611948 Apr 15 2017 libLLVMTableGen.a
-rw-r--r-- 1 root root 9263962 Apr 15 2017 libLLVMTarget.a
-rw-r--r-- 1 root root 146297820 Apr 15 2017 libLLVMTransformUtils.a
-rw-r--r-- 1 root root 34453818 Apr 15 2017 libLLVMVectorize.a
-rw-r--r-- 1 root root 6000802 Apr 15 2017 libLLVMX86AsmParser.a
-rw-r--r-- 1 root root 2910632 Apr 15 2017 libLLVMX86AsmPrinter.a
-rw-r--r-- 1 root root 145255472 Apr 15 2017 libLLVMX86CodeGen.a
-rw-r--r-- 1 root root 10623992 Apr 15 2017 libLLVMX86Desc.a
-rw-r--r-- 1 root root 3490924 Apr 15 2017 libLLVMX86Disassembler.a
-rw-r--r-- 1 root root 282300 Apr 15 2017 libLLVMX86Info.a
-rw-r--r-- 1 root root 151368 Apr 15 2017 libLLVMX86Utils.a
-rw-r--r-- 1 root root 757112 Apr 15 2017 libLLVMXRay.a
-rwxr-xr-x 1 root root 1042 Apr 29 2018 libnetfilter_queue.la
lrwxrwxrwx 1 root root 27 Apr 29 2018 libnetfilter_queue.so -> libnetfilter_queue.so.1.4.0
lrwxrwxrwx 1 root root 27 Apr 29 2018 libnetfilter_queue.so.1 -> libnetfilter_queue.so.1.4.0
-rwxr-xr-x 1 root root 118848 Apr 29 2018 libnetfilter_queue.so.1.4.0
-rw-r--r-- 1 root root 11281522 Jul 12 2018 libnettle.a
lrwxrwxrwx 1 root root 16 Jul 12 2018 libnettle.so -> libnettle.so.6.4
lrwxrwxrwx 1 root root 16 Jul 12 2018 libnettle.so.6 -> libnettle.so.6.4
-rw-r--r-- 1 root root 1159152 Jul 12 2018 libnettle.so.6.4
-rwxr-xr-x 1 root root 955 Apr 29 2018 libnfnetlink.la
lrwxrwxrwx 1 root root 21 Apr 29 2018 libnfnetlink.so -> libnfnetlink.so.0.2.0
lrwxrwxrwx 1 root root 21 Apr 29 2018 libnfnetlink.so.0 -> libnfnetlink.so.0.2.0
-rwxr-xr-x 1 root root 113976 Apr 29 2018 libnfnetlink.so.0.2.0
-rw-r--r-- 1 root root 15288 Jun 22 2018 libnpth.a
-rwxr-xr-x 1 root root 944 Jun 22 2018 libnpth.la
lrwxrwxrwx 1 root root 16 Jun 22 2018 libnpth.so -> libnpth.so.0.1.1
lrwxrwxrwx 1 root root 16 Jun 22 2018 libnpth.so.0 -> libnpth.so.0.1.1
-rwxr-xr-x 1 root root 14696 Jun 22 2018 libnpth.so.0.1.1
-rwxr-xr-x 1 root root 1037 Dez 12 2018 libntbtls.la
lrwxrwxrwx 1 root root 18 Dez 12 2018 libntbtls.so -> libntbtls.so.0.0.2
lrwxrwxrwx 1 root root 18 Dez 12 2018 libntbtls.so.0 -> libntbtls.so.0.0.2
-rwxr-xr-x 1 root root 365944 Dez 12 2018 libntbtls.so.0.0.2
-rwxr-xr-x 1 root root 1078 Jun 22 2018 libqgpgme.la
lrwxrwxrwx 1 root root 18 Jun 22 2018 libqgpgme.so -> libqgpgme.so.7.3.2
lrwxrwxrwx 1 root root 18 Jun 22 2018 libqgpgme.so.7 -> libqgpgme.so.7.3.2
-rwxr-xr-x 1 root root 1109280 Jun 22 2018 libqgpgme.so.7.3.2
-rw-r--r-- 1 root root 229744 Apr 15 2017 LLVMHello.so
drwxr-xr-x 2 root root 4096 Jun 28 11:09 pkgconfig
drwxrwsr-x 4 root staff 4096 Jul 20 13:15 python2.7
drwxrwsr-x 3 root staff 4096 Jul 20 13:06 python3.7

locate libnettle.so.6

Output:

/usr/lib/i386-linux-gnu/libnettle.so.6
/usr/lib/i386-linux-gnu/libnettle.so.6.4
/usr/lib/x86_64-linux-gnu/libnettle.so.6
/usr/lib/x86_64-linux-gnu/libnettle.so.6.4
/usr/local/lib/libnettle.so.6
/usr/local/lib/libnettle.so.6.4

ldd /usr/lib/x86_64-linux-gnu/libhogweed.so.4

Output:

linux-vdso.so.1 (0x00007fff001d3000)
libnettle.so.6 => /usr/local/lib/libnettle.so.6 (0x00007f44d0a30000)
libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f44d09a8000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f44d07b8000)
/lib64/ld-linux-x86-64.so.2 (0x00007f44d0cc8000)

What to do?

I'll suggest to remove these libraries with:

sudo rm /usr/local/lib/libnettle.so.6 /usr/local/lib/libnettle.so.6.4

And try to start virt-manager again.

Could you please clarify why you have too many libraries in /usr/local/lib? What is the goal?
Why you do not want to install applications from repository with Synaptic / APT / Software Boutique?
Compilation and installation from source code archives creates a mess in the system. If you really want to do so - then use CheckInstall.

Please consult my post on AskUbuntu about software installation -

to make sure that you really understand how software installation works :slight_smile:

1 Like

Now, it's working :slight_smile: Many thanks @ Norbert_X...

Could you please clarify why you have too many libraries in /usr/local/lib? What is the goal?
Why you do not want to install applications from repository with Synaptic / APT / Software Boutique?
Compilation and installation from source code archives creates a mess in the system. If you really want to do so - then use CheckInstall.

...because, in the past I compiled OpenSSL and some libs.

1 Like