Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 909759 - media-libs/libopenshot-0.3.2-r1 fails tests: 70 - FFmpegWriter:Gif (Failed)
Summary: media-libs/libopenshot-0.3.2-r1 fails tests: 70 - FFmpegWriter:Gif (Failed)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Stefan Strogin
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2023-07-06 08:19 UTC by Agostino Sarubbo
Modified: 2023-07-09 22:21 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,367.94 KB, text/plain)
2023-07-06 08:19 UTC, Agostino Sarubbo
Details
1-LastTest.log (1-LastTest.log,183.06 KB, text/plain)
2023-07-06 08:19 UTC, Agostino Sarubbo
Details
another_build.log (another_build.log,367.99 KB, text/plain)
2023-07-07 07:14 UTC, Agostino Sarubbo
Details
another_LastTest.log (another_LastTest.log,184.57 KB, text/plain)
2023-07-07 07:14 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2023-07-06 08:19:24 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: media-libs/libopenshot-0.3.2-r1 fails tests.
Discovered on: amd64 (internal ref: ci)
Comment 1 Agostino Sarubbo gentoo-dev 2023-07-06 08:19:27 UTC
Created attachment 865182 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2023-07-06 08:19:28 UTC
Created attachment 865183 [details]
1-LastTest.log

1-LastTest.log
Comment 3 Agostino Sarubbo gentoo-dev 2023-07-06 08:19:29 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


	 70 - FFmpegWriter:Gif (Failed)
--   Package 'libavresample', required by 'virtual:world', not found
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-07-06 08:20:57 UTC
/var/tmp/portage/media-libs/libopenshot-0.3.2-r1/work/libopenshot-0.3.2/tests/FFmpegWriter.cpp:188
...............................................................................

/var/tmp/portage/media-libs/libopenshot-0.3.2-r1/work/libopenshot-0.3.2/tests/FFmpegWriter.cpp:188: FAILED:
due to unexpected exception with message:
  File could not be opened.

===============================================================================
test cases: 1 | 1 failed
assertions: 1 | 1 failed

<end of output>
Test time =   1.48 sec
----------------------------------------------------------
Test Failed.
"FFmpegWriter:Gif" end time: Jul 06 10:10 CEST
"FFmpegWriter:Gif" time elapsed: 00:00:01
--------------------------------------------------------

libavresample is gone in bug 722274 if it does need that, but not sure.
Comment 5 Ninpo 2023-07-06 11:58:55 UTC
The test in question tries to open the file /var/tmp/portage/media-libs/libopenshot-0.3.2-r1/work/libopenshot-0.3.2/examples/sintel_trailer-720p.mp4 as well as an output test file /var/tmp/portage/media-libs/libopenshot-0.3.2-r1/work/libopenshot-0.3.2_build/tests/output1.gif

I cannot reproduce this test failure with either FFMpeg 6 on ~amd64 or FFMpeg 4.4.4 on amd64.

GCC used 12.3.1 for amd64 and 13.1.1 for ~amd64
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-07-07 00:31:21 UTC
I can't reproduce this.
Comment 7 Agostino Sarubbo gentoo-dev 2023-07-07 07:12:23 UTC
(In reply to Sam James from comment #6)
> I can't reproduce this.

I verified and it passes for me with -j1. So this is because of the high number of makeopts.

it also fails:
172 - Timeline:Multi-threaded Timeline GetFrame
Comment 8 Agostino Sarubbo gentoo-dev 2023-07-07 07:14:01 UTC
Created attachment 865229 [details]
another_build.log

another_build.log
Comment 9 Agostino Sarubbo gentoo-dev 2023-07-07 07:14:06 UTC
Created attachment 865230 [details]
another_LastTest.log

another_LastTest.log
Comment 10 Ninpo 2023-07-08 16:25:34 UTC
Easy to see why the Writer test can fail in a high concurrency build:

FFmpegWriter.cpp:    FFmpegWriter w("output1.gif");
FFmpegWriter.cpp:    FFmpegReader r1("output1.gif");
ImageWriter.cpp:        ImageWriter w("output1.gif");
ImageWriter.cpp:        ImageReader r1("output1.gif[4]");

So I'll put a patch together for those to ensure the file names can't collide.

After running some tests in loops with -j24 I was able to hit the other test fail which is a segfault:

Filters: "Multi-threaded Timeline GetFrame"
Randomness seeded to: 2452326515
ZmqLogger::Connection - Error binding to tcp://*:5556. Switching to an available port.
Caught signal 11 (SIGSEGV)
---- Unhandled Exception: Stack Trace ----
  /var/tmp/portage/media-libs/libopenshot-0.3.2-r1/work/libopenshot-0.3.2_build/src/libopenshot.so.25 ( openshot::Clip::GetFrame(std::shared_ptr<openshot::Frame>, long, openshot::TimelineInfoStruct*)  + 0x3d3 )  [0x7f49875d1503]
  /var/tmp/portage/media-libs/libopenshot-0.3.2-r1/work/libopenshot-0.3.2_build/src/libopenshot.so.25 ( openshot::Timeline::GetOrCreateFrame(std::shared_ptr<openshot::Frame>, openshot::Clip*, long, openshot::TimelineInfoStruct*)  + 0x3fc )  [0x7f498762a8bc]
  /var/tmp/portage/media-libs/libopenshot-0.3.2-r1/work/libopenshot-0.3.2_build/src/libopenshot.so.25 ( openshot::Timeline::add_layer(std::shared_ptr<openshot::Frame>, openshot::Clip*, long, bool, float)  + 0xa1  )  [0x7f498762aaa1]
  /var/tmp/portage/media-libs/libopenshot-0.3.2-r1/work/libopenshot-0.3.2_build/src/libopenshot.so.25 ( openshot::Timeline::GetFrame(long)        + 0x1584)  [0x7f4987630684]
  /var/tmp/portage/media-libs/libopenshot-0.3.2-r1/work/libopenshot-0.3.2_build/tests/openshot-Timeline-test (                                           + 0xad67)  [0x5622d29a6d67]
  /usr/lib/gcc/x86_64-pc-linux-gnu/13/libgomp.so.1 (                                           + 0x20360)  [0x7f49871a1360]
  /lib64/libc.so.6               (                                           + 0x85eb9)  [0x7f4986818eb9]
  /lib64/libc.so.6               (                                           + 0x10945c)  [0x7f498689c45c]
---- End of Stack Trace ----
Comment 11 Larry the Git Cow gentoo-dev 2023-07-09 22:21:28 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d97b4ecd2291523baf3caeb93d0b0f884a074031

commit d97b4ecd2291523baf3caeb93d0b0f884a074031
Author:     Ninpo <ninpo@qap.la>
AuthorDate: 2023-07-09 11:24:26 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-07-09 22:20:56 +0000

    media-libs/libopenshot: Two test fixes
    
    * Fix parallel test issues by renaming the output files
      to avoid clobbering (reported upstream at
      https://github.com/OpenShot/libopenshot/issues/933)
    
    * Skip flaky test (reported upstream at https://github.com/OpenShot/libopenshot/issues/934)
    
    Closes: https://bugs.gentoo.org/909759
    Signed-off-by: Ninpo <ninpo@qap.la>
    Closes: https://github.com/gentoo/gentoo/pull/31810
    Signed-off-by: Sam James <sam@gentoo.org>

 ...ibopenshot-0.3.2-fix-test-file-collisions.patch | 89 ++++++++++++++++++++++
 media-libs/libopenshot/libopenshot-0.3.2-r1.ebuild |  6 +-
 2 files changed, 94 insertions(+), 1 deletion(-)