Sorry about that, I was treating this a bit like chat
My hypthesis is that this is related to a mix of libc’s being used. To explore on that this is what I’ve seen happen:
When running the command exposed by the teleconsole snap on an artful system, this LD_LIBRARY_PATH
gets set
LD_LIBRARY_PATH="/snap/core/current/usr/lib:/snap/core/current/lib/x86_64-linux-gnu:/snap/core/current/usr/lib/x86_64-linux-gnu"
In that LD_LIBARY_PATH
we have one specific path which includes libc related libraries: /snap/core/current/lib/x86_64-linux-gnu
, such that, simulating behavior of snap run
, this run of ldd
fails:
LD_LIBRARY_PATH="/snap/core/current/lib:/snap/core/current/usr/lib:/snap/core/current/lib/x86_64-linux-gnu:/snap/core/current/usr/lib/x86_64-linux-gnu" ldd /snap/teleconsole/current/teleconsole
Segmentation fault
And this one works:
LD_LIBRARY_PATH="/snap/core/current/lib:/snap/core/current/usr/lib:/snap/core/current/usr/lib/x86_64-linux-gnu" ldd /snap/teleconsole/current/teleconsole linux-vdso.so.1 => (0x00007ffeaa1f2000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f14a27b8000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f14a23d8000)
/lib64/ld-linux-x86-64.so.2 (0x00007f14a29d7000)
This was not a problem in the past for classic snaps given that from 16.04 until now (17.10) libc has not changed. Take into account I mention 16.04 and not 14.04 as, I am most certain due to the bug I mentioned earlier, it currently fails to run on 14.04 given that there is a different libc6.
Now in that last snippet where I run ldd which works I excluded one entry, which is the one that has all the libc libraries, and that is what gives me confidence in my response.
Now, when I said technically incorrect, I really meant it as we want to only use ld and libraries from either core or the snap when loading an elf file but today, there is only one way to do that (on the snapcraft side) and that is by compiling the binaries that are intended to be called.
Just running snapcraft
again on teleconsole project should get rid of the command wrapper as described in the bug I mentioned and would make it use the system’s libc6 and for the specific case of teleconsole
it would work as it only links against libc6
and there would be no mix of binaries/libraires and yes it is technically incorrect and yes this has been my grudge with classic confinement; I alway recommend building from source for classic confinement.