Hi, On Wed, May 05, 2021 at 07:03:44PM +0200, Hiltjo Posthuma wrote: > On Wed, May 05, 2021 at 01:38:06PM +0200, Sebastien Marie wrote: > > On Wed, May 05, 2021 at 12:52:54PM +0200, Hiltjo Posthuma wrote: > > > > > > Hi, > > > > > > I can (still) reproduce this issue. I don't use Iris though. > > > > > > Using LD_PRELOAD still crashes for me too. Did you make other changes to > > > the > > > mpv code? > > > > > > > the library to use in LD_PRELOAD will depend of the gpu. on mine > > system, it is radeonsi_dri.so for example.
Yes, I was so focused on my system that I neglected to mention that the exact filename will depend on your GPU, thanks for mentioning that! > > > > you could try with LD_DEBUG=1 to see the ld.so activity: > > > > $ LD_DEBUG=1 mpv --vo=gpu file.mp4 > > [...] > > (+) Video --vid=1 (*) (h264 640x360 25.000fps) > > (+) Audio --aid=1 (*) (aac 2ch 48000Hz) > > tib new=0x790502c1000 > > dlopen: loading: /usr/X11R6/lib/modules/dri/radeonsi_dri.so > > flags /usr/X11R6/lib/modules/dri/radeonsi_dri.so = 0x0 > > [...] > > Exiting... (Quit) > > free tib=0x790685f6800 > > free tib=0x790502c1a00 > > free tib=0x790685f6400 > > free tib=0x7908242bc00 > > pthread_mutex_destroy on mutex with waiters! > > free tib=0x790502c1600 > > free tib=0x78fe0bb9800 > > free tib=0x790502c1400 > > free tib=0x790502c1200 > > doing dtors obj 0x79020c0cc00 @0x790ca41c700: > > [/usr/X11R6/lib/modules/dri/radeonsi_dri.so] > > doing dtors obj 0x7908242a400 @0x7907e37c3d0: [/usr/lib/libelf.so.3.0] > > doing dtors obj 0x79042c59000 @0x790cd9b4ad0: [/usr/lib/libLLVM.so.5.0] > > doing dtors obj 0x79017a94c00 @0x7908e87a520: > > [/usr/X11R6/lib/libdrm_radeon.so.4.0] > > doing dtors obj 0x79042c59400 @0x79026e63b70: > > [/usr/X11R6/lib/libdrm_amdgpu.so.1.10] > > unload_shlib called on /usr/X11R6/lib/modules/dri/radeonsi_dri.so > > unload_shlib called on /usr/X11R6/lib/libglapi.so.0.3 > > unload_shlib called on /usr/lib/libelf.so.3.0 > > unload_shlib unloading on /usr/lib/libelf.so.3.0 > > unload_shlib called on /usr/lib/libLLVM.so.5.0 > > unload_shlib unloading on /usr/lib/libLLVM.so.5.0 > > unload_shlib called on /usr/lib/libexpat.so.12.0 > > unload_shlib called on /usr/lib/libz.so.5.0 > > unload_shlib called on /usr/lib/libm.so.10.1 > > unload_shlib called on /usr/X11R6/lib/libdrm.so.7.9 > > unload_shlib called on /usr/X11R6/lib/libdrm_radeon.so.4.0 > > unload_shlib called on /usr/X11R6/lib/libdrm.so.7.9 > > unload_shlib unloading on /usr/X11R6/lib/libdrm_radeon.so.4.0 > > unload_shlib called on /usr/X11R6/lib/libdrm_amdgpu.so.1.10 > > unload_shlib called on /usr/X11R6/lib/libdrm.so.7.9 > > unload_shlib unloading on /usr/X11R6/lib/libdrm_amdgpu.so.1.10 > > unload_shlib called on /usr/lib/libc++.so.8.0 > > unload_shlib called on /usr/lib/libc++abi.so.5.0 > > unload_shlib called on /usr/lib/libpthread.so.26.1 > > unload_shlib unloading on /usr/X11R6/lib/modules/dri/radeonsi_dri.so > > Segmentation fault > > > > > > I wonder if /usr/X11R6/lib/modules/dri/*.so libraries should be linked > > with -znodelete to keep them after loading. Another possibility would > > be using RTLD_NODELETE on dlopen() call, but it needs to be > > implemented first (it should be simple to do as we support > > DF_1_NODELETE Elf flag). > > > > It would be interesting to know what Linux is doing here. Thanks for the suggestions. I have an Arch Linux test system where I plan to repeat this experiment. Will report back soon. > > > > Thanks. > > -- > > Sebastien Marie > > Thanks that worked! I used the wrong .so. Now it also doesn't crash anymore. > > For completeness I used: > > LD_PRELOAD=/usr/X11R6/lib/modules/dri/i965_dri.so LD_DEBUG=1 \ > mpv -vo=gpu 'https://www.youtube.com/embed/QTk688cXTsA' > > -- > Kind regards, > Hiltjo It's a dirty workaround but hopefully it will make mpv usable as a player from other programs e.g. qutebrowser which get confused by the crash and display error messages. Regards, Anindya