Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AV1 film grain with gpu-next causes SIGABRT #14027

Open
Harazi opened this issue Apr 30, 2024 · 5 comments
Open

AV1 film grain with gpu-next causes SIGABRT #14027

Harazi opened this issue Apr 30, 2024 · 5 comments

Comments

@Harazi
Copy link

Harazi commented Apr 30, 2024

Important Information

Provide following Information:

  • mpv version: b68c742
  • Linux Distribution and Version: Archlinux 6.8.9
  • Source of the mpv binary: built from master
  • Window Manager and version: tested on both Hyprland and River
  • GPU model, driver and version: Nvidia GeForce GTX 970, Nouveau

Reproduction steps

$ ~/Repos/mpv/build/mpv --config=no --vo=gpu-next shot1_p4-crf18-10bit-t2-fg20.avif --log-file=/tmp/mpv.log -v -v

Expected behavior

No issue

Actual behavior

mpv crashes with a SIGABRT before displaying the image. Sometimes it will flash a distorted green image for a millisecond before aborting.

The issue is restricted to --vo=gpu-next and an AV1 image/video with synthetic film grain. Images with no film grain will play fine.

Command for creating AV1 images:

$ ffmpeg -ss 00:01:13.417 -i A.Matter.of.Loaf.and.Death.Remux.mkv -frames:v 1 -c:v libsvtav1 -preset 4 -crf 18 -pix_fmt yuv420p10le -svtav1-params tune=2:film-grain=20:film-grain-denoise=0 shot1_p4-crf18-10bit-t2-fg20.avif

mpv.log
shot1_p4-crf18-10bit-t2-fg20.avif.zip

Also, this was printed on stderr:

nouveau: kernel rejected pushbuf: No such device
nouveau: ch6: krec 0 pushes 1 bufs 12 relocs 0
nouveau: ch6: buf 00000000 0000000b 00000004 00000004 00000000 0x77b590180000 0x3ba0000 0x80000
nouveau: ch6: buf 00000001 00000008 00000002 00000002 00000000 (nil) 0x620000 0xe0000
nouveau: ch6: buf 00000002 0000000a 00000002 00000002 00000000 (nil) 0x3b80000 0x20000
nouveau: ch6: buf 00000003 00000009 00000002 00000002 00000002 (nil) 0x700000 0x3480000
nouveau: ch6: buf 00000004 00000006 00000004 00000000 00000004 0x77b59b28c000 0x224000 0x1000
nouveau: ch6: buf 00000005 0000001c 00000002 00000002 00000000 (nil) 0x5655000 0x4000
nouveau: ch6: buf 00000006 0000001e 00000002 00000002 00000000 (nil) 0x59e000 0x2000
nouveau: ch6: buf 00000007 00000011 00000002 00000002 00000000 (nil) 0x4620000 0x440000
nouveau: ch6: buf 00000008 00000028 00000002 00000002 00000000 (nil) 0x6660000 0x880000
nouveau: ch6: buf 00000009 0000002b 00000002 00000002 00000000 (nil) 0x4a60000 0x20000
nouveau: ch6: buf 0000000a 0000002d 00000002 00000002 00000002 (nil) 0x6ee0000 0x21c0000
nouveau: ch6: buf 0000000b 0000002e 00000004 00000004 00000004 (nil) 0x5f6c000 0x1000
nouveau: ch6: psh 00000000 0000015cd0 0000015ce4
nouveau: 	0x200406c0
nouveau: 	0x00000000
nouveau: 	0x00224000
nouveau: 	0x00000005
nouveau: 	0x1000f010
mpv: ../libdrm-2.4.120/nouveau/pushbuf.c:730: nouveau_pushbuf_data: Assertion `kref' failed.
@llyyr
Copy link
Contributor

llyyr commented Apr 30, 2024

Can't reproduce here, can you post the stack trace?

@Harazi
Copy link
Author

Harazi commented Apr 30, 2024

How? with strace?

@llyyr
Copy link
Contributor

llyyr commented Apr 30, 2024

How? with strace?

See https://wiki.archlinux.org/title/Debugging/Getting_traces

You can see available coredumps with coredumpctl then open them in gdb with coredumpctl gdb [pid] and follow the wiki. Though it looks like the crash is in nouveau so hard to think how it could be a mpv issue

@Harazi
Copy link
Author

Harazi commented Apr 30, 2024

I recompiled mpv with meson flag --buildtype debug, but there are still some <optimized out> values. Not sure if I did everything correctly.
gdb.txt

@kasper93
Copy link
Contributor

kasper93 commented May 1, 2024

It crashes deep in Nouveau, try updating you graphic driver stack and report issue upstream.

mpv: ../libdrm-2.4.120/nouveau/pushbuf.c:730: nouveau_pushbuf_data: Assertion `kref' failed.

I doubt there is anything we can do in mpv to workaround this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants