Termux-packages: Segfault while running mpv

Created on 30 Dec 2016  路  37Comments  路  Source: termux/termux-packages

When I execute either mpv or mpv --version, it segfaults. Latest Termux and mpv, Android 6.0.1, Galaxy Tab A SM-T550.

bug report mpv

All 37 comments

Going to need a tad more info. I don't even know what arch that uses.

CPU: ARM Cortex-A53 quad-core, using ARMv8-A architecture, GPU: Adreno 306, supports up to OpenGL 3.0, RAM: 1.5 GB. Please let me know if there's anything else I should add.

First, apt install ltrace strace
Then paste output of both ltrace mpv and strace mpv. Use a paste site as the 2nd one will have quite a bit (or should I say bytes) of data.

Is there a libvendorconn.so in the /system/lib64/ dir?
system/vendor/lib64/libvendorconn.so i guess right?
i suppose
ln -s /system/vendor/lib64/libvendorconn.so /data/data/com.termux/files/usr/lib
would temp fix it.

I can't find libvendorconn.so in any of those places. This is reflected in the strace output as well:
openat(AT_FDCWD, "/data/data/com.termux/files/usr/lib/libvendorconn.so", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/vendor/lib/libvendorconn.so", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/system/lib/libvendorconn.so", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/data/data/com.termux/files/usr/lib/libvendorconn.so", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/vendor/lib/libvendorconn.so", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/system/lib/libvendorconn.so", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)

I don't think its caused by libvendorconn. The symbol which cannot be found is provided by ffmpeg libs. I suspect you have mpv and ffmpeg of separate bits.
Where did you install termux from? Your arch is aarch64. What does dpkg --print-architecture show you?
BTW, he was talking about /system/lib64

I installed Termux from Google Play. Output from dpkg --print-architecture is just arm, whereas /system/lib64 contains only a single file, libSecMMCodec.so. I'm running an unmodified (except rooted, which shouldn't be relevant in this case) stock ROM.

It may be possible that your os reports arm as first arch and aarch64 as second, which may have led the app to download arm bootstrap instead of aarch64 one.
@fornwall Is this the case? How is the arch decided when downloading bootstrap zip?

@vishalbiswas The arch is decided using Build.SUPPORTED_ABIS, taking the first element since:

The most preferred ABI is the first element in the list

A guess would be that while the CPU supports 64-bit, Samsung only has a 32-bit userland on the device available. This is indicated by:

/system/lib64 contains only a single file, libSecMMCodec.so

If the device had a complete&working 64-bit userland there would be a lot more files there.

When running mpv command, I got the following message

~$ mpv
CANNOT LINK EXECUTABLE "/data/data/com.termux/files/usr/libexec/mpv": cannot locate symbol "avcodec_send_packet" referenced by "/data/data/com.termux/files/usr/libexec/mpv"...

Not sure if this is related to this bug or a different issue.

It seems that my issue has been reported #572

I have a similar problem on my Samsung Galaxy Grand running Cyanogenmod 12.1:

here is the strace on my mobile: http://pastebin.com/7yqsjZgB

I think the problem here is similar to #122.

I found a solution to the above problem. Just use the link to the direct binary data/data/com.termux/files/usr/libexec/mpv
instead of the wrapper shell script provided in /usr/bin.

The solution is similar to #542.

This fixes the issue for me atleast. Now, mpv works flawlessly on my Samsung Galaxy Grand Duos running CyanogenMod 12.1.

Cheers !!

For me, directly running /data/data/com.termux/files/usr/libexec/mpv fails with

CANNOT LINK EXECUTABLE: cannot locate symbol "png_set_seek_fn" referenced by "/system/lib/libskia.so"...
page record for 0脳b6e4808c was not found (block_size=64)

The address referenced in the error message changes with each attempt at running.

I remember yesterday I had tried running it too and it gave me a segfault. But today mpv is running with no problem...I dont know how it got solved today...try installing play-audio package using apt...I installed it just now...maybe because of that....not sure :)

Thanks but I have that installed for some time now, with no effects on this issue.

Thanks @pranavg189, executing /data/data/com.termux/files/usr/libexec/mpv solved the problem for me.

@feserafim @mindbound Does updating to the latest 0.24.0-1 version of mpv with apt update && apt upgrade fix the issue?

@fornwall It doesn't for me, mpv still crashes with the same errors as before.

try this http://pastebin.com/iHZTxcMp
see if it works?

@its-pointless It fails with the same error as in https://github.com/termux/termux-packages/issues/634#issuecomment-277269542.

could you list all files in /system/lib and /system/vendor/lib ?

@mindbound Sorry, there was a mistake in the last update, can you try updating again (this time to 0.24.0-2) and see if that helps? Thanks for the help!

@fornwall The update didn't help.

Today I decided to reinstall mpv and look at it again. It still fails but this time it does so with a different error (when calling with the full path):

CANNOT LINK EXECUTABLE: cannot locate symbol "ucnv_open_55" referenced by "/system/lib/libmedia.so".

Mindbound thats a library conflict issue. If you could provide a list of lib*.so files in /system/lib and /system/vendor/lib i can fix this issue.
Have you tried mpd + ncmpcpp instead of mpv same error?

@its-pointless I added these lists a few comments a while ago (https://github.com/termux/termux-packages/issues/634#issuecomment-281525033). Also, since mpv is [also] a video player, I don't think mpd can be a replacement in this case. Or did you rather mean to just check if mpd fails with the same error?

i think i know whats happening. libav stuff links to libopus its loading your system lib and then dying because it can't resolv a symbol.

exec this mpv script replacement and tell if it works please? http://its-pointless.github.io/mpv

It fails with a segfault. Please see the strace dump.

could you use this instead of strace?
its-pointless.github.io/tracefile
tracefile mpv

@mindbound run strace with -y -f

Issue seems not active since 19 May 2017.

Is there anyone who experiencing it ?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

christianrondeau picture christianrondeau  路  81Comments

tomtom picture tomtom  路  151Comments

twaik picture twaik  路  73Comments

Auxilus picture Auxilus  路  689Comments

urrut picture urrut  路  51Comments