Closed sahinakkaya closed 2 years ago
0.32
is pretty old, is there any chance you could try with git master? Also, a backtrace with debug symbols would be very helpful.
@LaserEyess I will try. Just to add more information, if I remove the configuration for backlight and reboot mpv works again. I also found this while searching for a solution.
@LaserEyess I tried with latest version and the problem is still there. Should I open a new issue or update this one?
Also, a backtrace with debug symbols would be very helpful.
How can I do this?
gdb mpv
r --no-config somevid.mp4
bt full
❯ gdb ./mpv
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./mpv...
(gdb) r --no-config somevid.mp4
Starting program: /home/sahin/Desktop/GitRepositories/mpv-build/mpv/build/mpv --no-config somevid.mp4
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff434c700 (LWP 14302)]
[New Thread 0x7ffff3b4b700 (LWP 14303)]
[New Thread 0x7ffff334a700 (LWP 14304)]
[New Thread 0x7ffff2b49700 (LWP 14305)]
[New Thread 0x7ffff2348700 (LWP 14306)]
[New Thread 0x7ffff1b47700 (LWP 14307)]
[Thread 0x7ffff1b47700 (LWP 14307) exited]
[New Thread 0x7ffff1b47700 (LWP 14308)]
[New Thread 0x7ffff1b47700 (LWP 14309)]
[Thread 0x7ffff1b47700 (LWP 14308) exited]
[New Thread 0x7fffe37e2700 (LWP 14310)]
(+) Video --vid=1 (*) (h264 1920x1080 60.000fps)
(+) Audio --aid=1 (*) (aac 2ch 44100Hz)
[New Thread 0x7fffe2fe1700 (LWP 14311)]
[Thread 0x7fffe2fe1700 (LWP 14311) exited]
[New Thread 0x7fffe2fe1700 (LWP 14312)]
[New Thread 0x7fffd26ec700 (LWP 14321)]
[New Thread 0x7fffd1eeb700 (LWP 14322)]
[New Thread 0x7fffd16ea700 (LWP 14323)]
[New Thread 0x7fffd0ee9700 (LWP 14324)]
[New Thread 0x7fffc6849700 (LWP 14329)]
[New Thread 0x7fffc6048700 (LWP 14332)]
[New Thread 0x7fffc5847700 (LWP 14333)]
[New Thread 0x7fffc5046700 (LWP 14335)]
[New Thread 0x7fffc4845700 (LWP 14336)]
[New Thread 0x7fffaf1ff700 (LWP 14339)]
[New Thread 0x7fffae67e700 (LWP 14340)]
AO: [pulse] 44100Hz stereo 2ch float
VO: [gpu] 1920x1080 yuv420p
Thread 12 "mpv/vo" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe2fe1700 (LWP 14312)]
0x00007fffd34cb16d in ?? () from /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
(gdb) bt full
#0 0x00007fffd34cb16d in ?? () from /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
No symbol table info available.
#1 0x00007fffd34cb320 in ?? () from /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
No symbol table info available.
#2 0x00007fffd34cb5ca in ?? () from /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
No symbol table info available.
#3 0x00007fffd3685ebe in ?? () from /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
No symbol table info available.
#4 0x00007fffd34a64c7 in ?? () from /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
No symbol table info available.
#5 0x00007fffd34a7af6 in ?? () from /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
No symbol table info available.
#6 0x00007fffd28bcb26 in ?? () from /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
No symbol table info available.
#7 0x00005555557ea591 in gl_clear (ra=<optimized out>, dst=<optimized out>, color=0x7fffe2fe0390, scissor=0x7fffe2fe0340) at ../video/out/opengl/ra_gl.c:684
gl = 0x7fffcc002ad0
__PRETTY_FUNCTION__ = "gl_clear"
dst_gl = <optimized out>
#8 0x00005555557e1654 in gl_video_render_frame (p=0x7fffcc319f50, frame=frame@entry=0x7fffcc3187c0, fbo=..., flags=flags@entry=3) at ../video/out/gpu/video.c:3256
target_rc = {x0 = 0, y0 = 0, x1 = 921, y1 = 1016}
has_frame = true
c = <optimized out>
clear_color = {0, 0, 0, 1}
#9 0x00005555557f1679 in draw_frame (vo=0x5555574016b0, frame=0x7fffcc3187c0) at ../video/out/vo_gpu.c:86
p = 0x5555574036b0
sw = 0x7fffcc2e8ab0
fbo = {tex = 0x7fffcc35ffe0, flip = true, color_space = {space = MP_CSP_AUTO, levels = MP_CSP_LEVELS_AUTO, primaries = MP_CSP_PRIM_AUTO, gamma = MP_CSP_TRC_AUTO, light = MP_CSP_LIGHT_AUTO,
sig_peak = 0}}
#10 0x00005555557ef41f in render_frame (vo=0x5555574016b0) at ../video/out/vo.c:960
prev_drop_count = 0
can_queue = <optimized out>
vsync = {last_queue_display_time = 0, vsync_duration = 0, skipped_vsyncs = 0}
use_vsync = <optimized out>
frame = 0x7fffcc3187c0
in = 0x55555740c050
more_frames = false
now = <optimized out>
pts = <optimized out>
duration = <optimized out>
end_time = <optimized out>
target = 10453064
in = <optimized out>
frame = <optimized out>
more_frames = <optimized out>
__PRETTY_FUNCTION__ = "render_frame"
now = <optimized out>
pts = <optimized out>
duration = <optimized out>
end_time = <optimized out>
target = <optimized out>
use_vsync = <optimized out>
prev_drop_count = <optimized out>
can_queue = <optimized out>
vsync = <optimized out>
--Type <RET> for more, q to quit, c to continue without paging--
#11 vo_thread (ptr=0x5555574016b0) at ../video/out/vo.c:1098
working = <optimized out>
wait_until = <optimized out>
send_reset = <optimized out>
now = <optimized out>
redraw = <optimized out>
send_pause = <optimized out>
vo = <optimized out>
in = 0x55555740c050
vo_paused = false
r = 0
#12 0x00007ffff72cb609 in start_thread (arg=<optimized out>) at pthread_create.c:477
ret = <optimized out>
pd = <optimized out>
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140737001690880, -349394877178513087, 140737488343758, 140737488343759, 140737488343760, 140737001688768, 349441055104366913, 349413167489415489},
mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
not_first_call = 0
#13 0x00007ffff71f2293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
No locals.
I just realized you didn't fill out the issue template properly. Please say what GPU and driver you're using. Obviously, some sort of intel with the mesa iris driver, but which one? This mostly looks like a driver bug, but I'm not an expert in openGL so I don't know what the gl_clear() function does.
Can you try MESA_LOADER_DRIVER_OVERRIDE=i965
and see if it still crashes? This may or may not work on your hardware since I don't know what it is.
I have a Nvidia GTX 1050 video card. And here is my driver:
❯ dpkg -l | grep nvidia-driver
ii nvidia-driver-495 495.44-0ubuntu0.20.04.1 amd64 NVIDIA driver metapackage
I don't think I am using nvidia drivers because they just don't work on my computer. This is the situation since I installed Linux so I think the problem is not about gpu.
Can you try MESA_LOADER_DRIVER_OVERRIDE=i965 and see if it still crashes?
I tried this and the problem is fixed. I still don't understand what the problem is. What should I change in my computer to fix this permanently?
[ 0.134][v][vo/gpu/opengl] GL_VERSION='4.6 (Core Profile) Mesa 21.0.3'
[ 0.134][v][vo/gpu/opengl] Detected desktop OpenGL 4.6.
[ 0.134][v][vo/gpu/opengl] GL_VENDOR='Intel'
[ 0.134][v][vo/gpu/opengl] GL_RENDERER='Mesa Intel(R) HD Graphics 630 (KBL GT2)'
I guess I didn't need your hardware info afterall. You may have nvidia in your machine but mpv is clearly choosing your intel GPU to play videos.
I'll try to explain what the issue (probably) is: there are multiple intel openGL drivers that you can use on linux, the default for your GPU is called iris
. However, there is another (older) one called i965
. What I had you do with MESA_LOADER_DRIVER_OVERRIDE
is force mpv to use i965
to see if the problem is with mpv or iris
. Since this works on i965
and there are only openGL calls in the mpv function where it crashes, I'm fairly confident this is a bug with iris
, so it has to be reported to mesa. I would first report this to Ubuntu though, with these exact reproduction steps and the information that the problem only exists on iris
, not i965
.
Thank you very much for detailed explanation! I will report this to places you mentioned. I guess we can close this issue :)
I can't tell how much I appreciate the help. You are very nice @LaserEyess ! Thank you again!
For now, you can create a custom script for mpv that will always use i965, something like this should work (untested, but should work on ubuntu):
#!/usr/bin/env bash
export MESA_LOADER_DRIVER_OVERRIDE=i965
/usr/bin/mpv "$@"
Put that on your path as mpv
and it will never crash from iris.
/usr/bin/mpv $@
this should be /usr/bin/mpv "$@"
(double-quoted "$@"
) or else file names or arguments with spaces will be passed incorrectly to mpv.
Yep, I was doing the same thing :)
Important Information
Reproduction steps
I was following Arch Wiki in order to fix a problem about my backlight issue link. Created this file in "/etc/X11/xorg.conf.d/20-intel.conf"
After reboot, mpv started crashing with a segfault.
Expected behavior
mpv should work because I don't think I am doing something bad for mpv by creating above file.
Actual behavior
mpv crashes with a segfault.
Log File