Why is qemu-system-x86_64 trying to open("/lib/x86_64-linux-gnu/tls/x86_64/libxenctrl-4.4.so" under Ubuntu 16.04.3 LTS when /lib/x86_64-linux-gnu/tls/x86_64/libxenctrl-4.6.so is an intended .so target?

Asked by David West Sr

Ubuntu 16.04.3 LTS previously upgraded from Ubuntu 14.04.

cli cmd:
$ qemu-system-x86_64 -localtime -net user -net nic -m 256 -cdrom minix.iso -drive file=minix.img,format=raw -boot d -curses

error:
qemu-system-x86_64: error while loading shared libraries: libxenctrl-4.4.so: cannot open shared object file: No such file or directory

Partial strace:
...open("/lib/x86_64-linux-gnu/tls/x86_64/libxenctrl-4.4.so"

$ sudo apt install libxen-4.4
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libxen-4.4 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'libxen-4.4' has no installation candidate

File references under libxen-4.4 package should not be used; however, some config remnant existed.

$ sudo apt purge libxen-4.4
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  libxen-4.4*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 162542 files and directories currently installed.)
Removing libxen-4.4 (4.4.2-0ubuntu0.14.04.10) ...
Purging configuration files for libxen-4.4 (4.4.2-0ubuntu0.14.04.10) ...

Partial strace:
...
 44 [00007f385fb5e367] open("/usr/lib/x86_64-linux-gnu/libxenstore.so.3.0", O_RDONLY|O_CLOEXEC) = 3

Next open() syscall is for /usr/lib/x86_64-linux-gnu/libxenctrl-4.4.so"
...
[00007f385fb5e367] open("/usr/lib/x86_64-linux-gnu/libxenctrl-4.4.so", O_RDONLY|O_CLOEXEC) = 3

Does libxenstore.so.3.0 contain incorrect calling function parameter to open() sysycall for "/usr/lib/x86_64-linux-gnu/libxenctrl-4.4.so"?

Temp solution:
lrwxrwxrwx 1 root root 17 Jan 19 20:56 libxenctrl-4.4.so -> libxenctrl-4.6.so
lrwxrwxrwx 1 root root 18 Jan 19 20:57 libxenguest-4.4.so -> libxenguest-4.6.so

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu xen Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Sounds like a bug to me. I suggest you report one.

Revision history for this message
David West Sr (infinitelymanic) said :
#2

Will do. Thanks, dw

On Mon, Jan 22, 2018 at 12:17 PM, actionparsnip <
<email address hidden>> wrote:

> Your question #663400 on xen in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/xen/+question/663400
>
> Status: Open => Answered
>
> actionparsnip proposed the following answer:
> Sounds like a bug to me. I suggest you report one.
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+source/xen/+question/
> 663400/+confirm?answer_id=0
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+source/xen/+question/663400
>
> You received this question notification because you asked the question.
>

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

What is the output of the command

apt-cache policy libxenstore3.0

Revision history for this message
David West Sr (infinitelymanic) said :
#4

$ apt-cache policy libxenstore3.0

libxenstore3.0:

 Installed: 4.6.5-0ubuntu1.4

 Candidate: 4.6.5-0ubuntu1.4

 Version table:

*** 4.6.5-0ubuntu1.4 500

       500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64
Packages

       500 http://security.ubuntu.com/ubuntu xenial-security/main amd64
Packages

       100 /var/lib/dpkg/status

    4.6.0-1ubuntu4 500

       500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 P

On Tue, Jan 23, 2018 at 2:22 AM, Manfred Hampl <
<email address hidden>> wrote:

> Your question #663400 on xen in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/xen/+question/663400
>
> Status: Open => Needs information
>
> Manfred Hampl requested more information:
> What is the output of the command
>
> apt-cache policy libxenstore3.0
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/ubuntu/+source/xen/+question/663400
>
> You received this question notification because you asked the question.
>

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

This does not show any indication that libxenstore3.0 would be the culprit (it is the 4.6 version for xenial).

What is the output of the command
ldd /usr/bin/qemu-system-x86_64

Revision history for this message
David West Sr (infinitelymanic) said :
#6

I've been trying to find the .so an underlying function that calls the
open() syscall for libxenctrl-4.4.so.

I presumed that underlying function was within libxenstore3.0 since that
object was opened and read prior to the call to open(...libxenctrl-4.4.so);
as I read through the strace. But I don't think that necessarily proves
that the underlying calling function is indeed from libxenstore3.0.

Also, to the extent it may be important, my system was upgraded from
14.05...; therefore, some artifacts (i.e., config files from trusty) may
exist.

For example, please note the purge I did last week on libxen-4.4; which may
suggest that other artifacts from trusty still exist and perhaps are noted
as elements in some array.

$ sudo apt purge libxen-4.4

Reading package lists... Done

Building dependency tree

Reading state information... Done

The following packages will be REMOVED:

 libxen-4.4*

0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.

After this operation, 0 B of additional disk space will be used.

Do you want to continue? [Y/n] y

(Reading database ... 162542 files and directories currently installed.)

Removing libxen-4.4 (4.4.2-0ubuntu0.14.04.10) ...

Purging configuration files for libxen-4.4 (4.4.2-0ubuntu0.14.04.10) ...

$ ldd /usr/bin/qemu-system-x86_64
linux-vdso.so.1 => (0x00007ffd11ffd000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007ffa0dfe7000)
        libaio.so.1 => /lib/x86_64-linux-gnu/libaio.so.1
(0x00007ffa0dde5000)
        libpixman-1.so.0 => /usr/lib/x86_64-linux-gnu/libpixman-1.so.0
(0x00007ffa0db3d000)
        libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1
(0x00007ffa0d939000)
        libnuma.so.1 => /usr/lib/x86_64-linux-gnu/libnuma.so.1
(0x00007ffa0d72e000)
        libbluetooth.so.3 => /usr/lib/x86_64-linux-gnu/libbluetooth.so.3
(0x00007ffa0d50c000)
        libncurses.so.5 => /lib/x86_64-linux-gnu/libncurses.so.5
(0x00007ffa0d2e9000)
        libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5
(0x00007ffa0d0c0000)
        libbrlapi.so.0.6 => /lib/x86_64-linux-gnu/libbrlapi.so.0.6
(0x00007ffa0ceb4000)
        libasound.so.2 => /usr/lib/x86_64-linux-gnu/libasound.so.2
(0x00007ffa0cbb3000)
        libpulse.so.0 => /usr/lib/x86_64-linux-gnu/libpulse.so.0
(0x00007ffa0c963000)
        libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1
(0x00007ffa0c75e000)
        libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0
(0x00007ffa0c538000)
        libjpeg.so.8 => /usr/lib/x86_64-linux-gnu/libjpeg.so.8
(0x00007ffa0c2df000)
        libsasl2.so.2 => /usr/lib/x86_64-linux-gnu/libsasl2.so.2
(0x00007ffa0c0c4000)
        libSDL-1.2.so.0 => /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0
(0x00007ffa0be2a000)
        libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6
(0x00007ffa0baf0000)
        libnettle.so.6 => /usr/lib/x86_64-linux-gnu/libnettle.so.6
(0x00007ffa0b8ba000)
        libgnutls.so.30 => /usr/lib/x86_64-linux-gnu/libgnutls.so.30
(0x00007ffa0b589000)
        libxenstore.so.3.0 => /usr/lib/x86_64-linux-gnu/libxenstore.so.3.0
(0x00007ffa0b37f000)
        libxenctrl-4.6.so => /usr/lib/x86_64-linux-gnu/libxenctrl-4.6.so
(0x00007ffa0b150000)
        libxenguest-4.6.so => /usr/lib/x86_64-linux-gnu/libxenguest-4.6.so
(0x00007ffa0af26000)
        libseccomp.so.2 => /lib/x86_64-linux-gnu/libseccomp.so.2
(0x00007ffa0ace1000)
        libfdt.so.1 => /usr/lib/x86_64-linux-gnu/libfdt.so.1
(0x00007ffa0aada000)
        libspice-server.so.1 =>
/usr/lib/x86_64-linux-gnu/libspice-server.so.1 (0x00007ffa0a7aa000)
        libcacard.so.0 => /usr/lib/x86_64-linux-gnu/libcacard.so.0
(0x00007ffa0a59f000)
        libusb-1.0.so.0 => /lib/x86_64-linux-gnu/libusb-1.0.so.0
(0x00007ffa0a387000)
        libusbredirparser.so.1 =>
/usr/lib/x86_64-linux-gnu/libusbredirparser.so.1 (0x00007ffa0a17e000)
        libgmodule-2.0.so.0 =>
/usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007ffa09f7a000)
        libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0
(0x00007ffa09c69000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007ffa09a60000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ffa09757000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1
(0x00007ffa09541000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x00007ffa09323000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ffa08f59000)
        /lib64/ld-linux-x86-64.so.2 (0x00005555944cc000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ffa08d55000)
        libjson-c.so.2 => /lib/x86_64-linux-gnu/libjson-c.so.2
(0x00007ffa08b49000)
        libpulsecommon-8.0.so => /usr/lib/x86_64-linux-gnu/pulseaudio/
libpulsecommon-8.0.so (0x00007ffa088ce000)
        libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3
(0x00007ffa08681000)
        libpulse-simple.so.0 =>
/usr/lib/x86_64-linux-gnu/libpulse-simple.so.0 (0x00007ffa0847c000)
        libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6
(0x00007ffa08269000)
        libcaca.so.0 => /usr/lib/x86_64-linux-gnu/libcaca.so.0
(0x00007ffa07fa0000)
        libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1
(0x00007ffa07d7e000)
        libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0
(0x00007ffa07b19000)
        libidn.so.11 => /usr/lib/x86_64-linux-gnu/libidn.so.11
(0x00007ffa078e6000)
        libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6
(0x00007ffa076d3000)
    libhogweed.so.4 => /usr/lib/x86_64-linux-gnu/libhogweed.so.4
(0x00007ffa0749f000)
        libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10
(0x00007ffa0721f000)
        liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5
(0x00007ffa06ffd000)
        libopus.so.0 => /usr/lib/x86_64-linux-gnu/libopus.so.0
(0x00007ffa06db2000)
        libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0
(0x00007ffa06b49000)
        libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
(0x00007ffa06705000)
        libnss3.so => /usr/lib/x86_64-linux-gnu/libnss3.so
(0x00007ffa063bd000)
        libnspr4.so => /usr/lib/x86_64-linux-gnu/libnspr4.so
(0x00007ffa0617e000)
        libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1
(0x00007ffa0615e000)
        libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3
(0x00007ffa05eed000)
        libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0
(0x00007ffa05e68000)
        libwrap.so.0 => /lib/x86_64-linux-gnu/libwrap.so.0
(0x00007ffa05c5d000)
        libsndfile.so.1 => /usr/lib/x86_64-linux-gnu/libsndfile.so.1
(0x00007ffa059f4000)
        libasyncns.so.0 => /usr/lib/x86_64-linux-gnu/libasyncns.so.0
(0x00007ffa057ee000)
        libslang.so.2 => /lib/x86_64-linux-gnu/libslang.so.2
(0x00007ffa05461000)
        libncursesw.so.5 => /lib/x86_64-linux-gnu/libncursesw.so.5
(0x00007ffa05232000)
        libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6
(0x00007ffa0502e000)
        libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6
(0x00007ffa04e27000)
        libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6
(0x00007ffa04c1f000)
        libnssutil3.so => /usr/lib/x86_64-linux-gnu/libnssutil3.so
(0x00007ffa049f1000)
        libplc4.so => /usr/lib/x86_64-linux-gnu/libplc4.so
(0x00007ffa047ec000)
        libplds4.so => /usr/lib/x86_64-linux-gnu/libplds4.so
(0x00007ffa045e8000)
        libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1
(0x00007ffa043c5000)
        libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20
(0x00007ffa040e4000)
        libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1
(0x00007ffa03ecb000)
        libFLAC.so.8 => /usr/lib/x86_64-linux-gnu/libFLAC.so.8
(0x00007ffa03c55000)
        libvorbisenc.so.2 => /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2
(0x00007ffa039ac000)
        libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2
(0x00007ffa03791000)
        libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0
(0x00007ffa0357c000)
        libogg.so.0 => /usr/lib/x86_64-linux-gnu/libogg.so.0
(0x00007ffa03373000)
        libvorbis.so.0 => /usr/lib/x86_64-linux-gnu/libvorbis.so.0
(0x00007ffa03146000)

On Tue, Jan 23, 2018 at 7:12 AM, Manfred Hampl <
<email address hidden>> wrote:

> Your question #663400 on xen in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/xen/+question/663400
>
> Status: Open => Needs information
>
> Manfred Hampl requested more information:
> This does not show any indication that libxenstore3.0 would be the
> culprit (it is the 4.6 version for xenial).
>
> What is the output of the command
> ldd /usr/bin/qemu-system-x86_64
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/ubuntu/+source/xen/+question/663400
>
> You received this question notification because you asked the question.
>

Revision history for this message
Manfred Hampl (m-hampl) said :
#7

Your output shows that the correct libraries (4.6) are loaded
...
         libxenstore.so.3.0 => /usr/lib/x86_64-linux-gnu/libxenstore.so.3.0 (0x00007ffa0b37f000)
         libxenctrl-4.6.so => /usr/lib/x86_64-linux-gnu/libxenctrl-4.6.so (0x00007ffa0b150000)
         libxenguest-4.6.so => /usr/lib/x86_64-linux-gnu/libxenguest-4.6.so (0x00007ffa0af26000)
...

What is the output of the command
which qemu-system-x86_64
apt-cache policy qemu-system-x86

Revision history for this message
David West Sr (infinitelymanic) said :
#8

$ which qemu-system-x86_64
/usr/local/bin/qemu-system-x86_64

$ apt-cache policy qemu-system-x86
qemu-system-x86:
  Installed: 1:2.5+dfsg-5ubuntu10.16
  Candidate: 1:2.5+dfsg-5ubuntu10.16
  Version table:
 *** 1:2.5+dfsg-5ubuntu10.16 500
        500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64
Packages
        500 http://security.ubuntu.com/ubuntu xenial-security/main amd64
Packages
        100 /var/lib/dpkg/status
     1:2.5+dfsg-5ubuntu10 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

On Tue, Jan 23, 2018 at 9:13 AM, Manfred Hampl <
<email address hidden>> wrote:

> Your question #663400 on xen in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/xen/+question/663400
>
> Status: Open => Needs information
>
> Manfred Hampl requested more information:
> Your output shows that the correct libraries (4.6) are loaded
> ...
> libxenstore.so.3.0 => /usr/lib/x86_64-linux-gnu/libxenstore.so.3.0
> (0x00007ffa0b37f000)
> libxenctrl-4.6.so => /usr/lib/x86_64-linux-gnu/libxenctrl-4.6.so
> (0x00007ffa0b150000)
> libxenguest-4.6.so => /usr/lib/x86_64-linux-gnu/libx
> enguest-4.6.so (0x00007ffa0af26000)
> ...
>
> What is the output of the command
> which qemu-system-x86_64
> apt-cache policy qemu-system-x86
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/ubuntu/+source/xen/+question/663400
>
> You received this question notification because you asked the question.
>

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#9

You seem to have two different versions of the qemu-system-x86_64 executable on your system!

What is the output of

/usr/local/bin/qemu-system-x86_64 -version
/usr/bin/qemu-system-x86_64 -version

Ubuntu installs its files usually in /usr/bin, so I assume that the one in /usr/local/bin is coming from a different source (maybe self-compiled)

Revision history for this message
David West Sr (infinitelymanic) said :
#10

Self compiled ???
I've done a "lot of things" on this particular system so that is a
possibility from over the years.
60/62 files in /usr/local/bin are QEMU objects from April 2015.

So - I think you have solved this mystery.

$ /usr/local/bin/qemu-system-x86_64 -version
(process:3932): GLib-WARNING **:
/build/glib2.0-prJhLS/glib2.0-2.48.2/./glib/gmem.c:483: custom memory
allocation vtable not supported
QEMU emulator version 2.2.92, Copyright (c) 2003-2008 Fabrice Bellard

$ /usr/bin/qemu-system-x86_64 -version
QEMU emulator version 2.5.0 (Debian 1:2.5+dfsg-5ubuntu10.16), Copyright (c)
2003-2008 Fabrice Bellard

$ ldd /usr/bin/qemu-system-x86_64 | grep 4.4

$ ldd /usr/local/bin/qemu-system-x86_64| grep 4.4
        libxenctrl-4.4.so => /usr/lib/x86_64-linux-gnu/libxenctrl-4.4.so
(0x00007f8296c76000) **** soft link
        libxenguest-4.4.so => /usr/lib/x86_64-linux-gnu/libxenguest-4.4.so
(0x00007f8296a4c000) *** soft link

On Tue, Jan 23, 2018 at 9:27 AM, Manfred Hampl <
<email address hidden>> wrote:

> Your question #663400 on xen in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/xen/+question/663400
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> You seem to have two different versions of the qemu-system-x86_64
> executable on your system!
>
> What is the output of
>
> /usr/local/bin/qemu-system-x86_64 -version
> /usr/bin/qemu-system-x86_64 -version
>
> Ubuntu installs its files usually in /usr/bin, so I assume that the one
> in /usr/local/bin is coming from a different source (maybe self-
> compiled)
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+source/xen/+question/
> 663400/+confirm?answer_id=8
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+source/xen/+question/663400
>
> You received this question notification because you asked the question.
>

Revision history for this message
David West Sr (infinitelymanic) said :
#11

Thanks Manfred Hampl, that solved my question.