Re: multimedia/mpv debug vo=gpu crash on exit

2021-06-16 Thread srfsh
Sebastien Marie  wrote:
> I think that torsocks is diverting syscalls with LD_PRELOAD. so
> depending how you call it, you might override the LD_PRELOAD setted by
> torsocks.
>
Yeah, that might explain it.  Thank you.

> the "method" you mentioned isn't a way to resolv the problem. it was a
> way to properly diagnostic the problem: something inside
> radeonsi_dri.so (exactly emutls) which cause segfault when the library
> is unloaded. using LD_PRELOAD permitted to unsure that forcing the
> library to stick correct the problem.
>
Yeah I know, sorry for choosing wrong wording -- English is not my
native language.

> if you want alternate ways to fix/workaround the problem:
> 
> - provide a patch with proper TLS support
> 
> - provide a patch for emuTLS for avoiding unloading a library when emuTLS is 
> from library
> 
> - use another video output (mpv --vo=sdl ...)
> 
> - ignore the core file and/or disable the coredump generation (with a 
> wrapper):
> #!/bin/sh
> ulimit -c 0
> exec /usr/local/bin/mpv "$@"
> 
I've been using mpv(1) with --vo=x11 all along.  I just wanted to report
what I've found.

Sincerely,
srfsh



Re: multimedia/mpv debug vo=gpu crash on exit

2021-06-16 Thread srfsh
To ports@openbsd.org  wrote:
> Sebastien Marie  wrote:
> > the library to use in LD_PRELOAD will depend of the gpu. on mine
> > system, it is radeonsi_dri.so for example.
> > 
> > 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
> 
> Thanks for the information.  It works for me with radeonsi_dri.so too.

Okay, little bit late response but I discovered this very recently.
Let me explain: I run an unwind(8) instance on my computer where I
blacklist a very long list of hosts (such as www.youtube.com).  The
thing is, when I try to access www.youtube.com through torsocks(1) and
tor(1) (such as with mpv(1)), I expect everything (including DNS
queries) to go through the tor network, but when I have LD_PRELOAD set,
mpv(1) just tells me this:

[ffmpeg] tcp: Failed to resolve hostname www.youtube.com: no address 
associated with name

This is exactly what happens when I try to query a blacklisted hostname
through unwind(8).  When I don't have LD_PRELOAD set, though, it just
works as expected (that is, www.youtube.com is queried through the tor
network).  I'm sorry I realized this a little late, but this method has
an issue like this, so I wanted report as soon as possible.  I'm on
-current, by the way.

Sincerely,
srfsh