mpv: segmentation fault on exit

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

mpv: segmentation fault on exit

Klemens Nanni-2
Latest mpv on snapshots on my X250 dumps core whenever I quit playing
with `q' or `Q';  I have no mpv config and this happens regardless of
any values for the vm.malloc_conf and hw.smt sysctls:

        $ sysctl -n kern.version
        OpenBSD 6.8-beta (GENERIC.MP) #55: Tue Sep  1 01:01:32 MDT 2020
            [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP

        $ pkg_info -m | grep mpv
        mpv-0.32.0          movie player based on MPlayer/mplayer2

        $ rm -r ~/.config/mpv/
        rm: /home/kn/.config/mpv: No such file or directory
        $ mpv http://url/some.mkv
         mpv `xclip -o`  
         Resuming playback. This behavior can be disabled with --no-resume-playback.
          (+) Video --vid=1 (*) (h264 1904x1068 23.976fps)
           (+) Audio --aid=1 --alang=eng (*) (aac 2ch 48000Hz)
         AO: [sdl] 48000Hz stereo 2ch s32
         VO: [gpu] 1904x1068 yuv420p


         Exiting... (Quit)
         pthread_mutex_destroy on mutex with waiters!
         Segmentation fault (core dumped)

The pthread_mutex_destroy line has always been there but dumping core
is new behaviour, it most certainly started after upgrading to a newer
snapshot around one or two weeks ago and/or moving my installation/SSD
from an X230 to an X250 thinkpad (same config, just hardware swap).

        $ egdb --quiet -se `which mpv` -c ./mpv.core -batch -ex bt -ex l
        [New process 256621]
        [New process 165240]
        [New process 528996]
        [New process 170944]
        Core was generated by `mpv'.
        Program terminated with signal SIGSEGV, Segmentation fault.
        #0  0x000007e975d313e0 in ?? ()
        [Current thread is 1 (process 256621)]
        #0  0x000007e975d313e0 in ?? ()
        #1  0x000007e8a562a505 in _rthread_tls_destructors (thread=0x7e8785bdc40) at /usr/src/lib/libc/thread/rthread_tls.c:182
        #2  0x000007e8a5693ac3 in _libc_pthread_exit (retval=<optimized out>) at /usr/src/lib/libc/thread/rthread.c:150
        #3  0x000007e902c2d1d9 in _rthread_start (v=<optimized out>) at /usr/src/lib/librthread/rthread.c:97
        #4  0x000007e8a56505a8 in __tfork_thread () at /usr/src/lib/libc/arch/amd64/sys/tfork_thread.S:77
        #5  0x0000000000000000 in ?? ()
        1       #include "main-fn.h"
        2      
        3       int main(int argc, char *argv[])
        4       {
        5           return mpv_main(argc, argv);
        6       }

Now idea what's happening here.
Can someone else reproduce?

Reply | Threaded
Open this post in threaded view
|

Re: mpv: segmentation fault on exit

Sebastien Marie-3
On Sat, Sep 05, 2020 at 03:18:21AM +0200, Klemens Nanni wrote:

>
> $ rm -r ~/.config/mpv/
> rm: /home/kn/.config/mpv: No such file or directory
> $ mpv http://url/some.mkv
> mpv `xclip -o`  
> Resuming playback. This behavior can be disabled with --no-resume-playback.
>  (+) Video --vid=1 (*) (h264 1904x1068 23.976fps)
>   (+) Audio --aid=1 --alang=eng (*) (aac 2ch 48000Hz)
> AO: [sdl] 48000Hz stereo 2ch s32
> VO: [gpu] 1904x1068 yuv420p
>
>
> Exiting... (Quit)
> pthread_mutex_destroy on mutex with waiters!
> Segmentation fault (core dumped)
>
> The pthread_mutex_destroy line has always been there but dumping core
> is new behaviour, it most certainly started after upgrading to a newer
> snapshot around one or two weeks ago and/or moving my installation/SSD
> from an X230 to an X250 thinkpad (same config, just hardware swap).
>
> $ egdb --quiet -se `which mpv` -c ./mpv.core -batch -ex bt -ex l
> [New process 256621]
> [New process 165240]
> [New process 528996]
> [New process 170944]
> Core was generated by `mpv'.
> Program terminated with signal SIGSEGV, Segmentation fault.
> #0  0x000007e975d313e0 in ?? ()
> [Current thread is 1 (process 256621)]
> #0  0x000007e975d313e0 in ?? ()
> #1  0x000007e8a562a505 in _rthread_tls_destructors (thread=0x7e8785bdc40) at /usr/src/lib/libc/thread/rthread_tls.c:182
> #2  0x000007e8a5693ac3 in _libc_pthread_exit (retval=<optimized out>) at /usr/src/lib/libc/thread/rthread.c:150
> #3  0x000007e902c2d1d9 in _rthread_start (v=<optimized out>) at /usr/src/lib/librthread/rthread.c:97
> #4  0x000007e8a56505a8 in __tfork_thread () at /usr/src/lib/libc/arch/amd64/sys/tfork_thread.S:77
> #5  0x0000000000000000 in ?? ()
> 1       #include "main-fn.h"
> 2      
> 3       int main(int argc, char *argv[])
> 4       {
> 5           return mpv_main(argc, argv);
> 6       }
>
> Now idea what's happening here.
> Can someone else reproduce?
>

I think espie@ mentionned somewhere such behaviour.


From your mpv output, you are using "gpu" video output backend and "sdl" audio
output backend. Could you try another driver for each to see if it is related to
one of them ?

$ mpv --vo=sdl http://url/some.mkv
and
$ mpv --ao=sndio http://url/some.mkv

for example ?

(see mpv --ao=help and mpv --vo=help for list of backends. trying with "null" backend is also a possibility)


Thanks.
--
Sebastien Marie

Reply | Threaded
Open this post in threaded view
|

Re: mpv: segmentation fault on exit

Klemens Nanni-2
On Sat, Sep 05, 2020 at 06:56:46AM +0200, Sebastien Marie wrote:

> From your mpv output, you are using "gpu" video output backend and "sdl" audio
> output backend. Could you try another driver for each to see if it is related to
> one of them ?
>
> $ mpv --vo=sdl http://url/some.mkv
> and
> $ mpv --ao=sndio http://url/some.mkv
>
> for example ?
>
> (see mpv --ao=help and mpv --vo=help for list of backends. trying with "null" backend is also a possibility)
Audio output makes no difference but video output is the culprit:  all
work except "gpu", i.e. "xv", "sdl", "x11" and "tct" quit fine without
segmentation fault.

Reply | Threaded
Open this post in threaded view
|

Re: mpv: segmentation fault on exit

Klemens Nanni-2
On Sat, Sep 05, 2020 at 07:18:00AM +0200, Klemens Nanni wrote:
> Audio output makes no difference but video output is the culprit:  all
> work except "gpu", i.e. "xv", "sdl", "x11" and "tct" quit fine without
> segmentation fault.
FWIW, still happens with the latest snap that should contain the recent
mesa update:

        OpenBSD 6.8-beta (GENERIC.MP) #59: Fri Sep  4 22:46:14 MDT 2020
            [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP


Reply | Threaded
Open this post in threaded view
|

Re: mpv: segmentation fault on exit

Matthias Schmidt
Hi,

* Klemens Nanni wrote:
> On Sat, Sep 05, 2020 at 07:18:00AM +0200, Klemens Nanni wrote:
> > Audio output makes no difference but video output is the culprit:  all
> > work except "gpu", i.e. "xv", "sdl", "x11" and "tct" quit fine without
> > segmentation fault.
> FWIW, still happens with the latest snap that should contain the recent
> mesa update:
>
> OpenBSD 6.8-beta (GENERIC.MP) #59: Fri Sep  4 22:46:14 MDT 2020
>    [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP

FWIW, I can confirm the behaviour on a Thinkpad T450s running

OpenBSD 6.8-beta (GENERIC.MP) #64: Sun Sep  6 18:19:41 MDT 2020
    [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP

Cheers

        Matthias