Summary: | media-video/ffmpeg-4.4.2: fails tests when built with >=sys-devel/clang-14 (seek-acodec-flac crashes, related to ff_seek_frame_binary bug) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Herbert <herbert> |
Component: | Current packages | Assignee: | Gentoo Media-video project <media-video> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | herrtimson, sam |
Priority: | Normal | Keywords: | TESTFAILURE |
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 408963 | ||
Attachments: | build.log |
Description
Herbert
2022-07-18 14:14:50 UTC
Please include the full build.log. How to do? It is huge. Created attachment 792161 [details]
build.log
(In reply to Sam James from comment #1) > Please include the full build.log. attached it (In reply to Herbert from comment #4) > (In reply to Sam James from comment #1) > > Please include the full build.log. > > attached it I need to change the wording: It is a clang-test-issue. I switched ffmpeg to gcc compiler, and test does not fail. /var/tmp/portage/media-video/ffmpeg-4.4.2/work/ffmpeg-4.4.2-abi_x86_64.amd64/libavformat/tests/seek /var/tmp/portage/media-video/ffmpeg-4.4.2/work/ffmpeg-4.4.2-abi_x86_64.amd64/tests/data/fate/acodec-pcm-s8.mov Test seek-acodec-flac failed. Look at tests/data/fate/seek-acodec-flac.err for details. /var/tmp/portage/media-video/ffmpeg-4.4.2/work/ffmpeg-4.4.2-abi_x86_64.amd64/libavformat/tests/seek /var/tmp/portage/media-video/ffmpeg-4.4.2/work/ffmpeg-4.4.2-abi_x86_64.amd64/tests/data/fate/acodec-pcm-u8.wav /var/tmp/portage/media-video/ffmpeg-4.4.2/work/ffmpeg-4.4.2/tests/fate-run.sh: line 78: 14576 Segmentation fault $target_exec $target_path/"$@" TEST seek-acodec-pcm-s16be /var/tmp/portage/media-video/ffmpeg-4.4.2/work/ffmpeg-4.4.2/tests/fate-run.sh fate-seek-acodec-pcm-s16be "" "" "/var/tmp/portage/media-video/ffmpeg-4.4.2/work/ffmpeg-4.4.2-abi_x86_64.amd64" 'run libavformat/tests/seek /var/tmp/portage/media-video/ffmpeg-4.4.2/work/ffmpeg-4.4.2-abi_x86_64.amd64/tests/data/fate/acodec-pcm-s16be.mov' '' '/var/tmp/portage/media-video/ffmpeg-4.4.2/work/ffmpeg-4.4.2/tests/ref/seek/acodec-pcm-s16be' '' '1' '' '' '' '' '' '' '' '' '' '' make: *** [/var/tmp/portage/media-video/ffmpeg-4.4.2/work/ffmpeg-4.4.2/tests/Makefile:256: fate-seek-acodec-flac] Error 139 make: *** Waiting for unfinished jobs.... /var/tmp/portage/media-video/ffmpeg-4.4.2/work/ffmpeg-4.4.2-abi_x86_64.amd64/libavformat/tests/seek /var/tmp/portage/media-video/ffmpeg-4.4.2/work/ffmpeg-4.4.2-abi_x86_64.amd64/tests/data/fate/acodec-pcm-s16be.mov /var/tmp/portage/media-video/ffmpeg-4.4.2/work/ffmpeg-4.4.2-abi_x86_64.amd64/ffmpeg -nostdin -nostats -noauto_conversion_filters -y -cpuflags all -auto_conversion_filters -flags +bitexact -idct simple -sws_flags +accurate_rnd+bitexact -fflags +bitexact -threads 1 -i /var/tmp/portage/media-video/ffmpeg-4.4.2/work/ffmpeg-4.4.2-abi_x86_64.amd64/tests/data/lavf/lavf.apng -pix_fmt rgb24 -f crc /var/tmp/portage/media-video/ffmpeg-4.4.2/work/ffmpeg-4.4.2-abi_x86_64.amd64/tests/data/lavf-apng.lavf.crc ---- Two things: 1. Share tests/data/fate/seek-acodec-flac.err 2. Try get a backtrace from the segfaulting test? (In reply to Sam James from comment #6) > /var/tmp/portage/media-video/ffmpeg-4.4.2/work/ffmpeg-4.4.2-abi_x86_64. > amd64/libavformat/tests/seek > /var/tmp/portage/media-video/ffmpeg-4.4.2/work/ffmpeg-4.4.2-abi_x86_64.amd64/ > tests/data/fate/acodec-pcm-s8.mov > Test seek-acodec-flac failed. Look at tests/data/fate/seek-acodec-flac.err > for details. > /var/tmp/portage/media-video/ffmpeg-4.4.2/work/ffmpeg-4.4.2-abi_x86_64. > amd64/libavformat/tests/seek > /var/tmp/portage/media-video/ffmpeg-4.4.2/work/ffmpeg-4.4.2-abi_x86_64.amd64/ > tests/data/fate/acodec-pcm-u8.wav > /var/tmp/portage/media-video/ffmpeg-4.4.2/work/ffmpeg-4.4.2/tests/fate-run. > sh: line 78: 14576 Segmentation fault $target_exec $target_path/"$@" > TEST seek-acodec-pcm-s16be > /var/tmp/portage/media-video/ffmpeg-4.4.2/work/ffmpeg-4.4.2/tests/fate-run. > sh fate-seek-acodec-pcm-s16be "" "" > "/var/tmp/portage/media-video/ffmpeg-4.4.2/work/ffmpeg-4.4.2-abi_x86_64. > amd64" 'run libavformat/tests/seek > /var/tmp/portage/media-video/ffmpeg-4.4.2/work/ffmpeg-4.4.2-abi_x86_64.amd64/ > tests/data/fate/acodec-pcm-s16be.mov' '' > '/var/tmp/portage/media-video/ffmpeg-4.4.2/work/ffmpeg-4.4.2/tests/ref/seek/ > acodec-pcm-s16be' '' '1' '' '' '' '' '' '' '' '' '' '' > make: *** > [/var/tmp/portage/media-video/ffmpeg-4.4.2/work/ffmpeg-4.4.2/tests/Makefile: > 256: fate-seek-acodec-flac] Error 139 > make: *** Waiting for unfinished jobs.... > /var/tmp/portage/media-video/ffmpeg-4.4.2/work/ffmpeg-4.4.2-abi_x86_64. > amd64/libavformat/tests/seek > /var/tmp/portage/media-video/ffmpeg-4.4.2/work/ffmpeg-4.4.2-abi_x86_64.amd64/ > tests/data/fate/acodec-pcm-s16be.mov > /var/tmp/portage/media-video/ffmpeg-4.4.2/work/ffmpeg-4.4.2-abi_x86_64.amd64/ > ffmpeg -nostdin -nostats -noauto_conversion_filters -y -cpuflags all > -auto_conversion_filters -flags +bitexact -idct simple -sws_flags > +accurate_rnd+bitexact -fflags +bitexact -threads 1 -i > /var/tmp/portage/media-video/ffmpeg-4.4.2/work/ffmpeg-4.4.2-abi_x86_64.amd64/ > tests/data/lavf/lavf.apng -pix_fmt rgb24 -f crc > /var/tmp/portage/media-video/ffmpeg-4.4.2/work/ffmpeg-4.4.2-abi_x86_64.amd64/ > tests/data/lavf-apng.lavf.crc > > ---- > Two things: > 1. Share tests/data/fate/seek-acodec-flac.err > 2. Try get a backtrace from the segfaulting test? /tests/data/fate/seek-acodec-flac.err: /var/tmp/portage/media-video/ffmpeg-4.4.2/work/ffmpeg-4.4.2/tests/fate-run.sh: line 78: 14590 Segmentation fault $target_exec $target_path/"$@" This is line 78: run(){ test "${V:-0}" -gt 0 && echo "$target_exec" $target_path/"$@" >&3 $target_exec $target_path/"$@" I do not know how to get a backtrace in the running emerge process. If you help me I can do it. Sorry, I'd missed your reply. I'm not sure how to make ffmpeg's test suite run under gdb because it uses a wrapper. However... I came across this bug when adding a patch for a Clang 14 issue reported in #gentoo. Looking into the test you mentioned which fails, I get https://reviews.llvm.org/D105169?id=368033#3069158 (which is linked in the patch I've added) which mentions ff_seek_frame_binary. I suspect it's the same bug :) So, please retest with 4.4.3, but I think it should be fine now. Thanks for the report and I'm sorry we didn't get to the bottom of it sooner. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f499582f7119a0485f60e1f2cd741eacc58c0fba commit f499582f7119a0485f60e1f2cd741eacc58c0fba Author: Sam James <sam@gentoo.org> AuthorDate: 2022-10-09 23:04:21 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-10-09 23:10:34 +0000 media-video/ffmpeg: add 4.4.3 * Drop -latomic workaround added for bug 782811, bug 790590. Fixed upstream in https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/78062c6d71324fa89708211213b4267d2a57b806. * Fix UB in ff_seek_frame_binary-crash causing a crash with >= Clang 14. Might be the issue hit in bug 858806 (seems very likely). Bug: https://bugs.gentoo.org/782811 Bug: https://bugs.gentoo.org/790590 Closes: https://bugs.gentoo.org/858806 Signed-off-by: Sam James <sam@gentoo.org> media-video/ffmpeg/Manifest | 2 + media-video/ffmpeg/ffmpeg-4.4.3.ebuild | 598 +++++++++++++++++++++ ...4.4.3-clang-14-ff_seek_frame_binary-crash.patch | 46 ++ 3 files changed, 646 insertions(+) |