mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
27.74k stars 2.86k forks source link

malloc(): unsorted double linked list corrupted when using rife #12668

Open JustSimplyKyle opened 10 months ago

JustSimplyKyle commented 10 months ago

Important Information

Provide following Information:

Reproduction steps

mpv some_video.webm --no-config --vf=vapoursynth="/home/kyle/.config/mpv/vs/rife.vpy" where rife.vpy is https://0x0.st/HJcS.vpy these dependencies have to be installed https://vsdb.top/plugins/misc (vapoursynth-plugin-misc-git) https://vsdb.top/plugins/mv (vapoursynth-plugin-mvtools) https://vsdb.top/plugins/vmaf (vapoursynth-plugin-vmaf-git) https://aur.archlinux.org/packages/vapoursynth-plugin-rife-ncnn-vulkan-git (this can be installed by modifying the upstream url to this https://github.com/styler00dollar/VapourSynth-RIFE-ncnn-Vulkan)

and put https://github.com/hooke007/MPV_lazy/blob/main/k7sfunc.py somewhere in PYTHONPATH

Then try to fast-forward, you will achieve the malloc(): unsorted double linked list corrupted error

Expected behavior

To not have such error when dragging forwards and backwards in time.

Actual behavior

 (+) Video --vid=1 (*) (vp9 1280x720 29.970fps)
 (+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
[vapoursynth] Frame requested during init! This is unsupported.
[vapoursynth] Returning black dummy frame with 0 duration.
[0 AMD Radeon RX 7900 XT]  queueC=1[4]  queueG=0[1]  queueT=2[2]
[0 AMD Radeon RX 7900 XT]  bugsbn1=0  bugbilz=0  bugcopc=0  bugihfa=0
[0 AMD Radeon RX 7900 XT]  fp16-p/s/a=1/1/1  int8-p/s/a=1/1/1
[0 AMD Radeon RX 7900 XT]  subgroup=64  basic=1  vote=1  ballot=1  shuffle=1
[1 AMD Radeon RX 7900 XT]  queueC=1[4]  queueG=0[1]  queueT=2[2]
[1 AMD Radeon RX 7900 XT]  bugsbn1=0  bugbilz=0  bugcopc=0  bugihfa=0
[1 AMD Radeon RX 7900 XT]  fp16-p/s/a=1/1/1  int8-p/s/a=1/1/1
[1 AMD Radeon RX 7900 XT]  subgroup=64  basic=1  vote=1  ballot=1  shuffle=1
AO: [pipewire] 48000Hz stereo 2ch floatp
VO: [gpu] 1280x720 yuv420p
corrupted double-linked list A-V:  0.001
[1]    1637702 IOT instruction (core dumped)

ORR

 (+) Video --vid=1 (*) (vp9 1280x720 29.970fps)
 (+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
[vapoursynth] Frame requested during init! This is unsupported.
[vapoursynth] Returning black dummy frame with 0 duration.
[0 AMD Radeon RX 7900 XT]  queueC=1[4]  queueG=0[1]  queueT=2[2]
[0 AMD Radeon RX 7900 XT]  bugsbn1=0  bugbilz=0  bugcopc=0  bugihfa=0
[0 AMD Radeon RX 7900 XT]  fp16-p/s/a=1/1/1  int8-p/s/a=1/1/1
[0 AMD Radeon RX 7900 XT]  subgroup=64  basic=1  vote=1  ballot=1  shuffle=1
[1 AMD Radeon RX 7900 XT]  queueC=1[4]  queueG=0[1]  queueT=2[2]
[1 AMD Radeon RX 7900 XT]  bugsbn1=0  bugbilz=0  bugcopc=0  bugihfa=0
[1 AMD Radeon RX 7900 XT]  fp16-p/s/a=1/1/1  int8-p/s/a=1/1/1
[1 AMD Radeon RX 7900 XT]  subgroup=64  basic=1  vote=1  ballot=1  shuffle=1
AO: [pipewire] 48000Hz stereo 2ch floatp
VO: [gpu] 1280x720 yuv420p
malloc(): unsorted double linked list corrupted
[1]    1724832 IOT instruction (core dumped)

Log file

https://0x0.st/HJcu.txt

Sample files

I believe this can be reproduced quite easily by any file.

Additional Information

This could also be the fault of VapourSynth-RIFE-ncnn-Vulkan, since when doing other frame interpretation technology, such as MVT-STD, works fine.

llyyr commented 10 months ago

The log is complete, so mpv hasn't crashed which means the error isn't coming from it. This is probably a bug report for VapourSynth-RIFE-ncnn-Vulkan

JustSimplyKyle commented 10 months ago

Got it! I'll transfer the issue over

llyyr commented 10 months ago

Out of curiosity, does --vd-lavc-dr=no fix this?

JustSimplyKyle commented 10 months ago

nope! still crashes with the same error

N-R-K commented 10 months ago

@JustSimplyKyle Recompile with ASan (See this comment for instruction) and attach the backtrace here.

so mpv hasn't crashed which means the error isn't coming from it

I wouldn't be so sure, the corruption could've happened anywhere.

JustSimplyKyle commented 10 months ago

Is it this? https://0x0.st/HJc4.txt

N-R-K commented 10 months ago

Is it this? https://0x0.st/HJc4.txt

I don't see any corruption in there, it's only reporting leaks. (Which isn't really great either, but it's no where near as bad as memory corruption).

JustSimplyKyle commented 10 months ago

I wouldn't be so sure, the corruption could've happened anywhere.

I'll keep it opened for now then

hmm, when I tried again, a different error occurs. Now it's erroring with corrupted double-linked list rather then malloc(): unsorted double linked list corrupted and I literally changed nothing

N-R-K commented 10 months ago

when I tried again

Did you not try with ASan enabled? Or are you not able to reproduce the crash with ASan enabled? If it's the latter, then the corruption is likely happening on code that wasn't built with ASan (ie. code outside of mpv).

JustSimplyKyle commented 10 months ago

That is with ASAN disabled, if with it enabled, it will produce the ASAN trace I sent earlier

Dudemanguy commented 7 months ago

Is this still a problem today?

JustSimplyKyle commented 7 months ago

Yes, the said behaviour stills happens