Skip to content

videoio: synchronize ffmpeg open() call#9006

Merged
opencv-pushbot merged 1 commit intoopencv:masterfrom
alalek:videoio_synchronize_ffmpeg_open
Jun 27, 2017
Merged

videoio: synchronize ffmpeg open() call#9006
opencv-pushbot merged 1 commit intoopencv:masterfrom
alalek:videoio_synchronize_ffmpeg_open

Conversation

@alalek
Copy link
Copy Markdown
Member

@alalek alalek commented Jun 27, 2017

resolves #8992

Workaround for crashed test:

[ RUN      ] Videoio_Video_parallel_writers_and_readers.accuracy
incorrect codes
*** Error in `/build/precommit_linux64/build/bin/opencv_test_videoio': free(): invalid pointer: 0x00007fc301fdf240 ***
Process returned: -11

or

[----------] 1 test from Videoio_Video_parallel_writers_and_readers
[ RUN      ] Videoio_Video_parallel_writers_and_readers.accuracy
Process returned: -11

Can be reproduced with Ubuntu 14.04 (libav 9.20).
Ubuntu 16.04 (ffmpeg) is fine.

GDB stacktrace:

#0  0x00007ffff5fbfc37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff5fc3028 in __GI_abort () at abort.c:89
#2  0x00007ffff50ed9ab in ?? () from /usr/lib/x86_64-linux-gnu/libavcodec.so.54
#3  0x00007ffff50ee0cc in ?? () from /usr/lib/x86_64-linux-gnu/libavcodec.so.54
#4  0x00007ffff52c029c in ?? () from /usr/lib/x86_64-linux-gnu/libavcodec.so.54
#5  0x00007ffff50774ec in ?? () from /usr/lib/x86_64-linux-gnu/libavcodec.so.54
#6  0x00007ffff530db95 in av_parser_init () from /usr/lib/x86_64-linux-gnu/libavcodec.so.54
#7  0x00007ffff4dd7612 in avformat_find_stream_info () from /usr/lib/x86_64-linux-gnu/libavformat.so.54
#8  0x00007ffff7bc3e72 in CvCapture_FFMPEG::open (this=0x7fffd8000e40, _filename=0x7fffd8006cf4 "/tmp/__opencv_temp.nH2ffi.1.avi")
    at /build/precommit_linux64_no_opt/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:785

Threads (3 dead with similar failure in open() call):

  Id   Target Id         Frame 
  5    Thread 0x7fffe0ef6700 (LWP 818) "opencv_test_vid" 0x00007ffff5fc425b in msort_with_tmp (p=0x7fffe0ef56e0, b=0x7fffcc00e958, n=3) at msort.c:161
* 4    Thread 0x7fffe16f7700 (LWP 817) "opencv_test_vid" 0x00007ffff5fbfc37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
  3    Thread 0x7fffe1ef8700 (LWP 816) "opencv_test_vid" 0x00007ffff5fbfc37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
  2    Thread 0x7fffe26f9700 (LWP 815) "opencv_test_vid" 0x00007ffff5fbfc37 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
  1    Thread 0x7ffff7f967c0 (LWP 811) "opencv_test_vid" pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185

@mshabunin
Copy link
Copy Markdown
Contributor

👍

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Random test_videoio crash (sporadic)

3 participants