Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vfs.sftp version 1.0.1 causing segfault #25

Open
mkreisl opened this Issue Feb 13, 2019 · 5 comments

Comments

Projects
None yet
2 participants
@mkreisl
Copy link

mkreisl commented Feb 13, 2019

As already noted in my previous issue, Kodi crashes with segfault when activating this addon


Debian Stretch, build for armv7-a (Raspberry Pi 2) architecture

Using compiler (Kodi and binary addons):
arm-linux-gnueabihf-gcc (Debian 6.5.0-2) 6.5.0 20181026

@Rechi

This comment has been minimized.

Copy link
Member

Rechi commented Feb 13, 2019

Which OpenSSL version are you using for building Kodi?

@mkreisl

This comment has been minimized.

Copy link
Author

mkreisl commented Feb 14, 2019

libssl1.0-dev:armhf 1.0.2l-2

root@kmxbilr2 ~ # ldd /usr/local/lib/kodi/kodi.bin | grep ssl
        libssl.so.1.0.2 => /usr/lib/arm-linux-gnueabihf/libssl.so.1.0.2 (0x73c50000)

I don't understand the question, because

ldd vfs.sftp.so.1.0.1
        linux-vdso.so.1 (0x7ee7d000)
        /opt/lib/libmediaclient.so (0x76daa000)
        /lib/libarmmem.so (0x76d95000)
        libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x76d60000)
        libEGL.so => /opt/vc/lib/libEGL.so (0x76d27000)
        libGLESv2.so => /opt/vc/lib/libGLESv2.so (0x76d02000)
        libbcm_host.so => /opt/vc/lib/libbcm_host.so (0x76cdb000)
        libvcos.so => /opt/vc/lib/libvcos.so (0x76cc2000)
        libvchiq_arm.so => /opt/vc/lib/libvchiq_arm.so (0x76cac000)
        libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0x76ba0000)
        libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x76b25000)
        libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0x76afc000)
        libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x76a02000)
        /lib/ld-linux-armhf.so.3 (0x76f95000)
        libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x769ef000)
        librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0x769d9000)

the addon has the ssl stuff statically linked

@Rechi

This comment has been minimized.

Copy link
Member

Rechi commented Feb 14, 2019

Yes it shouldn't matter, but maybe it does. Please post the crash log.
Can you try with vfs.sftp built against system libssh?

@mkreisl

This comment has been minimized.

Copy link
Author

mkreisl commented Feb 15, 2019

Yes it shouldn't matter, but maybe it does. Please post the crash log.

But it seems to be
Crashlog: http://paste.debian.net/1068016/

dpkg -S /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.0.2
libssl1.0.2:armhf: /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.0.2

But I'm a bit confused why still libssl1.0 is used, because Debian Stretch has libssl 1.1 already included. Will try to replace those libs and see what happens

Can you try with vfs.sftp built against system libssh?

That's what I'm currently doing, Addon works perfectly when building it from commit 47cb680

@mkreisl

This comment has been minimized.

Copy link
Author

mkreisl commented Feb 15, 2019

So, building Kodi against libssl1.1 is working. Kodi comes up and vfs.sftp addon gives me access to my test-sftp share after removing old key from ~/.ssh/known_hosts file.

root@kmxbilr2 ~ # ldd /usr/local/lib/kodi/kodi.bin | grep ssl
        libssl.so.1.1 => /usr/lib/arm-linux-gnueabihf/libssl.so.1.1 (0x73bdb000)
root@kmxbilr2 ~ # dpkg -S /usr/lib/arm-linux-gnueabihf/libssl.so.1.1
libssl1.1:armhf: /usr/lib/arm-linux-gnueabihf/libssl.so.1.1
root@kmxbilr2 ~ # cd /usr/local/lib/kodi/addons/vfs.sftp/
root@kmxbilr2 /usr/local/lib/kodi/addons/vfs.sftp # ll
insgesamt 1804
lrwxrwxrwx 1 root root      16 Feb 15 17:53 vfs.sftp.so -> vfs.sftp.so.18.1
-rw-r--r-- 1 root root 1836396 Feb 15 17:55 vfs.sftp.so.1.0.1
lrwxrwxrwx 1 root root      17 Feb 15 17:53 vfs.sftp.so.18.1 -> vfs.sftp.so.1.0.1
root@kmxbilr2 /usr/local/lib/kodi/addons/vfs.sftp # ldd vfs.sftp.so.1.0.1
        linux-vdso.so.1 (0x7ef9b000)
        /lib/libarmmem.so (0x76d4a000)
        libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x76d15000)
        libEGL.so => /opt/vc/lib/libEGL.so (0x76cdc000)
        libGLESv2.so => /opt/vc/lib/libGLESv2.so (0x76cb7000)
        libbcm_host.so => /opt/vc/lib/libbcm_host.so (0x76c90000)
        libvcos.so => /opt/vc/lib/libvcos.so (0x76c77000)
        libvchiq_arm.so => /opt/vc/lib/libvchiq_arm.so (0x76c61000)
        libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0x76b55000)
        libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x76ada000)
        libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0x76ab1000)
        libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x769b7000)
        /lib/ld-linux-armhf.so.3 (0x76f32000)
        libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x769a4000)
        librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0x7698e000)
root@kmxbilr2 /usr/local/lib/kodi/addons/vfs.sftp #

But the question remains, why does it not work if Kodi is using different libssl version?
That really gives me a bad feeling about it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.