Opened 4 years ago

Closed 4 years ago

#2525 closed defect (fixed)

-vf deshake=opencl=1 Segmentation fault after: lavfi/unsharp: add opencl unsharp filter

Reported by: telperion Owned by:
Priority: important Component: undetermined
Version: git-master Keywords: regression opencl
Cc: highgod0401@gmail.com Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

after this commit
http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=cd134963e8fdaae14a25779799e4436f99e50557

mc@debian64:~/Scrivania/1111/ffmpeg-cd13496$ ./ffmpeg -i ../test.mkv -vf deshake=opencl=1 -b:v 1600k ../out.avi
ffmpeg version 1.1.git-cd13496 Copyright (c) 2000-2013 the FFmpeg developers
  built on May  1 2013 14:19:50 with gcc 4.7 (Debian 4.7.2-5)
  configuration: --extra-cflags='-Wall -g -O3 -march=core2 -mtune=core2' --prefix=/usr --enable-libmp3lame --enable-gpl --enable-nonfree --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-libvpx --enable-librtmp --enable-avfilter --enable-frei0r --enable-libopencv --enable-libfreetype --enable-libvo-aacenc --disable-decoder=amrnb --enable-libvo-amrwbenc --enable-libaacplus --enable-libdc1394 --disable-altivec --disable-armv5te --disable-armv6 --disable-vis --enable-filter=delogo --enable-filter=boxblur --enable-filter=frei0r --enable-filter=drawtext --enable-filter=gradfun --disable-ffserver --disable-shared --enable-static --enable-vdpau --enable-libfdk-aac --enable-libass --enable-libvidst --enable-opencl 
  libavutil      52. 27.101 / 52. 27.101
  libavcodec     55.  6.100 / 55.  6.100
  libavformat    55.  3.100 / 55.  3.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 60.102 /  3. 60.102
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
Input #0, matroska,webm, from '../test.mkv':
  Metadata:
    ENCODER         : Lavf55.3.100
  Duration: 00:01:00.14, start: 0.000000, bitrate: 883 kb/s
    Stream #0:0(eng): Video: h264 (High), yuv420p, 720x404 [SAR 1:1 DAR 180:101], 23.98 fps, 23.98 tbr, 1k tbn, 180k tbc (default)
    Stream #0:1: Audio: aac, 48000 Hz, stereo, fltp (default)
Segmentation fault
mc@debian64:~/Scrivania/1111/ffmpeg-cd13496$ gdb ffmpeg_g
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/mc/Scrivania/1111/ffmpeg-cd13496/ffmpeg_g...done.
(gdb) r -i ../test.mkv -vf deshake=opencl=1 -b:v 1600k ../out.avi
Starting program: /home/mc/Scrivania/1111/ffmpeg-cd13496/ffmpeg_g -i ../test.mkv -vf deshake=opencl=1 -b:v 1600 ../out.avi
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
ffmpeg version 1.1.git-cd13496 Copyright (c) 2000-2013 the FFmpeg developers
  built on May  1 2013 14:19:50 with gcc 4.7 (Debian 4.7.2-5)
  configuration: --extra-cflags='-Wall -g -O3 -march=core2 -mtune=core2' --prefix=/usr --enable-libmp3lame --enable-gpl --enable-nonfree --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-libvpx --enable-librtmp --enable-avfilter --enable-frei0r --enable-libopencv --enable-libfreetype --enable-libvo-aacenc --disable-decoder=amrnb --enable-libvo-amrwbenc --enable-libaacplus --enable-libdc1394 --disable-altivec --disable-armv5te --disable-armv6 --disable-vis --enable-filter=delogo --enable-filter=boxblur --enable-filter=frei0r --enable-filter=drawtext --enable-filter=gradfun --disable-ffserver --disable-shared --enable-static --enable-vdpau --enable-libfdk-aac --enable-libass --enable-libvidst --enable-opencl
  libavutil      52. 27.101 / 52. 27.101
  libavcodec     55.  6.100 / 55.  6.100
  libavformat    55.  3.100 / 55.  3.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 60.102 /  3. 60.102
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
Input #0, matroska,webm, from '../test.mkv':
  Metadata:
    ENCODER         : Lavf55.3.100
  Duration: 00:01:00.14, start: 0.000000, bitrate: 883 kb/s
    Stream #0:0(eng): Video: h264 (High), yuv420p, 720x404 [SAR 1:1 DAR 180:101], 23.98 fps, 23.98 tbr, 1k tbn, 180k tbc (default)
    Stream #0:1: Audio: aac, 48000 Hz, stereo, fltp (default)

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff1aa125a in ?? () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0  0x00007ffff1aa125a in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x0000000000bf0b8a in av_opt_find2 (obj=obj@entry=0x108e780, 
    name=0x65676e617220666f <Address 0x65676e617220666f out of bounds>, 
    search_flags=search_flags@entry=0, target_obj=target_obj@entry=0x7fffffff90a8, 
    opt_flags=0, unit=0x0) at libavutil/opt.c:1255
#2  0x0000000000bf42af in set_number (search_flags=0, intnum=8461244959899871316, 
    den=1, num=1, name=<optimized out>, obj=0x108e780) at libavutil/opt.c:359
#3  av_opt_set_int (search_flags=0, val=8461244959899871316, name=<optimized out>, 
    obj=0x108e780) at libavutil/opt.c:396
#4  av_opt_set_defaults2 (s=s@entry=0x108e780, mask=mask@entry=0, flags=flags@entry=0)
    at libavutil/opt.c:966
#5  0x0000000000bf43d9 in av_opt_set_defaults (s=s@entry=0x108e780)
    at libavutil/opt.c:945
#6  0x0000000000bef3f2 in av_opencl_init (ext_opencl_env=ext_opencl_env@entry=0x0)
    at libavutil/opencl.c:593
#7  0x00000000004cf331 in ff_opencl_deshake_init (ctx=ctx@entry=0x168b820)
    at libavfilter/deshake_opencl.c:101
#8  0x0000000000412397 in init (ctx=0x168b820) at libavfilter/vf_deshake.c:377
#9  0x00000000004833f6 in avfilter_init_dict (options=0x7fffffff91b0, ctx=0x168b820)
    at libavfilter/avfilter.c:781
#10 avfilter_init_str (filter=filter@entry=0x168b820, args=<optimized out>, 
    args@entry=0x1686fa0 "opencl=1") at libavfilter/avfilter.c:894
#11 0x000000000048ea05 in create_filter (filt_ctx=filt_ctx@entry=0x7fffffff9398, 
    ctx=ctx@entry=0x1677fc0, index=index@entry=0, filt_name=<optimized out>, 
    args=args@entry=0x1686fa0 "opencl=1", log_ctx=log_ctx@entry=0x1677fc0)
    at libavfilter/graphparser.c:126
#12 0x000000000048f3ea in parse_filter (log_ctx=0x1677fc0, index=0, graph=0x1677fc0, 
    buf=0x7fffffff9378, filt_ctx=0x7fffffff9398) at libavfilter/graphparser.c:164
#13 avfilter_graph_parse2 (graph=0x1677fc0, filters=0x1687b50 "", 
    filters@entry=0x1687b40 "deshake=opencl=1", inputs=inputs@entry=0x7fffffff9468, 
    outputs=outputs@entry=0x7fffffff9470) at libavfilter/graphparser.c:399
#14 0x0000000000468278 in configure_filtergraph (fg=0x168b640) at ffmpeg_filter.c:758
#15 0x00000000004714f4 in transcode_init () at ffmpeg.c:2273
#16 0x000000000045d9e6 in transcode () at ffmpeg.c:3155
#17 main (argc=8, argv=0x7fffffffe1e8) at ffmpeg.c:3361
(gdb) disass $pc-32,$pc+32
Dump of assembler code from 0x7ffff1aa123a to 0x7ffff1aa127a:
   0x00007ffff1aa123a:  test   %al,(%rax)
   0x00007ffff1aa123c:  add    %al,(%rax)
   0x00007ffff1aa123e:  add    %al,(%rax)
   0x00007ffff1aa1240:  mov    %esi,%ecx
   0x00007ffff1aa1242:  mov    %edi,%eax
   0x00007ffff1aa1244:  and    $0x3f,%rcx
   0x00007ffff1aa1248:  and    $0x3f,%rax
   0x00007ffff1aa124c:  cmp    $0x30,%ecx
   0x00007ffff1aa124f:  ja     0x7ffff1aa1290
   0x00007ffff1aa1251:  cmp    $0x30,%eax
   0x00007ffff1aa1254:  ja     0x7ffff1aa1290
   0x00007ffff1aa1256:  movlpd (%rdi),%xmm1
=> 0x00007ffff1aa125a:  movlpd (%rsi),%xmm2
   0x00007ffff1aa125e:  movhpd 0x8(%rdi),%xmm1
   0x00007ffff1aa1263:  movhpd 0x8(%rsi),%xmm2
   0x00007ffff1aa1268:  pxor   %xmm0,%xmm0
   0x00007ffff1aa126c:  pcmpeqb %xmm1,%xmm0
   0x00007ffff1aa1270:  pcmpeqb %xmm2,%xmm1
   0x00007ffff1aa1274:  psubb  %xmm0,%xmm1
   0x00007ffff1aa1278:  pmovmskb %xmm1,%edx
End of assembler dump.

Segmentation fault also with -vf unsharp=5:5.0.5:opencl=1 previously unavailable.

Before that commit it worked,
build from snapshot
http://git.videolan.org/?p=ffmpeg.git;a=commit;h=f31247cf47dcb7f3d986c67f1abbc0b50f1beefe

mc@debian64:~/Scrivania/1111/ffmpeg-f31247c$ ./ffmpeg -i ../test.mkv -vf deshake=opencl=1 -b:v 1600k ../out.avi
ffmpeg version 1.1.git-f31247c Copyright (c) 2000-2013 the FFmpeg developers
  built on May  1 2013 14:13:52 with gcc 4.7 (Debian 4.7.2-5)
  configuration: --extra-cflags='-Wall -g -O3 -march=core2 -mtune=core2' --prefix=/usr --enable-libmp3lame --enable-gpl --enable-nonfree --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-libvpx --enable-librtmp --enable-avfilter --enable-frei0r --enable-libopencv --enable-libfreetype --enable-libvo-aacenc --disable-decoder=amrnb --enable-libvo-amrwbenc --enable-libaacplus --enable-libdc1394 --disable-altivec --disable-armv5te --disable-armv6 --disable-vis --enable-filter=delogo --enable-filter=boxblur --enable-filter=frei0r --enable-filter=drawtext --enable-filter=gradfun --disable-ffserver --disable-shared --enable-static --enable-vdpau --enable-libfdk-aac --enable-libass --enable-libvidst --enable-opencl 
  libavutil      52. 27.101 / 52. 27.101
  libavcodec     55.  6.100 / 55.  6.100
  libavformat    55.  3.100 / 55.  3.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 60.101 /  3. 60.101
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
Input #0, matroska,webm, from '../test.mkv':
  Metadata:
    ENCODER         : Lavf55.3.100
  Duration: 00:01:00.14, start: 0.000000, bitrate: 883 kb/s
    Stream #0:0(eng): Video: h264 (High), yuv420p, 720x404 [SAR 1:1 DAR 180:101], 23.98 fps, 23.98 tbr, 1k tbn, 180k tbc (default)
    Stream #0:1: Audio: aac, 48000 Hz, stereo, fltp (default)
Output #0, avi, to '../out.avi':
  Metadata:
    ISFT            : Lavf55.3.100
    Stream #0:0(eng): Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 720x404 [SAR 1:1 DAR 180:101], q=2-31, 1600 kb/s, 23.98 tbn, 23.98 tbc (default)
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp (default)
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> mpeg4)
  Stream #0:1 -> #0:1 (aac -> libmp3lame)
Press [q] to stop, [?] for help
frame= 1441 fps= 73 q=9.0 Lsize=   13034kB time=00:01:00.18 bitrate=1774.2kbits/s    
video:11994kB audio:938kB subtitle:0 global headers:0kB muxing overhead 0.796354%

Debian sid 64 bit, nvidia 440GT.

Change History (5)

comment:1 Changed 4 years ago by cehoyos

  • Component changed from FFmpeg to undetermined
  • Keywords regression opencl added
  • Priority changed from normal to important
  • Status changed from new to open

Am I correct that no particular sample is needed to reproduce the problem?

comment:2 Changed 4 years ago by telperion

Correction:
Segmentation fault also with -vf unsharp=5:5:0.5:opencl=1 previously unavailable.

comment:3 Changed 4 years ago by telperion

Am I correct that no particular sample is needed to reproduce the problem?

yes Segmentation fault with with any video.

Version 0, edited 4 years ago by telperion (next)

comment:4 Changed 4 years ago by telperion

http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=6354a6ce5271a32857238a8ccb2107286984feb5

fix the problem,
now -vf deshake=opencl=1 work again.

Remain the --enable-opencl ffmpeg build problem on my system,
see:
https://ffmpeg.org/trac/ffmpeg/ticket/2519

comment:5 Changed 4 years ago by cehoyos

  • Resolution set to fixed
  • Status changed from open to closed

Thank you for testing again!

Note: See TracTickets for help on using tickets.