[FFmpeg-trac] #10555(undetermined:new): magicyuv enc crash

FFmpeg trac at avcodec.org
Sat Sep 9 00:49:47 EEST 2023


#10555: magicyuv enc crash
-------------------------------------+-------------------------------------
             Reporter:  ami_stuff    |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:
  undetermined                       |  unspecified
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 {{{
 (gdb) r -i h.png -vcodec magicyuv -s 999x200 -y out.avi
 Starting program: ffmpeg_g -i h.png -vcodec magicyuv -s 999x200 -y out.avi
 [Thread debugging using libthread_db enabled]
 Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
 ffmpeg version N-111992-ga234e5cd80 Copyright (c) 2000-2023 the FFmpeg
 developers
   built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
   configuration:
   libavutil      58. 19.100 / 58. 19.100
   libavcodec     60. 26.100 / 60. 26.100
   libavformat    60. 11.100 / 60. 11.100
   libavdevice    60.  2.101 / 60.  2.101
   libavfilter     9. 11.100 /  9. 11.100
   libswscale      7.  3.100 /  7.  3.100
   libswresample   4. 11.100 /  4. 11.100
 Input #0, png_pipe, from 'h.png':
   Duration: N/A, bitrate: N/A
   Stream #0:0: Video: png, pal8(pc, gbr/bt709/bt470m), 800x800, 25 fps, 25
 tbr, 25 tbn
 [New Thread 0x7ffff6fdc640 (LWP 51961)]
 [New Thread 0x7ffff67db640 (LWP 51962)]
 [New Thread 0x7ffff5fda640 (LWP 51963)]
 [New Thread 0x7ffff57d9640 (LWP 51964)]
 [New Thread 0x7ffff4fd8640 (LWP 51965)]
 [New Thread 0x7ffff47d7640 (LWP 51966)]
 [New Thread 0x7ffff3fd6640 (LWP 51967)]
 [New Thread 0x7ffff37d5640 (LWP 51968)]
 [New Thread 0x7ffff2fd4640 (LWP 51969)]
 [New Thread 0x7ffff27d3640 (LWP 51970)]
 [New Thread 0x7ffff1fd2640 (LWP 51971)]
 [New Thread 0x7ffff17d1640 (LWP 51972)]
 [New Thread 0x7ffff0fd0640 (LWP 51973)]
 [New Thread 0x7ffff07cf640 (LWP 51974)]
 [New Thread 0x7fffeffce640 (LWP 51975)]
 [New Thread 0x7fffef7cd640 (LWP 51976)]
 [New Thread 0x7fffeefcc640 (LWP 51977)]
 Stream mapping:
   Stream #0:0 -> #0:0 (png (native) -> magicyuv (native))
 Press [q] to stop, [?] for help
 [New Thread 0x7fffee7cb640 (LWP 51978)]
 [Thread 0x7fffee7cb640 (LWP 51978) exited]
 [Thread 0x7fffeefcc640 (LWP 51977) exited]
 [New Thread 0x7fffedfca640 (LWP 51979)]
 [New Thread 0x7fffed7c9640 (LWP 51980)]
 [New Thread 0x7fffecfc8640 (LWP 51981)]
 [New Thread 0x7fffe7fff640 (LWP 51982)]
 [New Thread 0x7fffe77fe640 (LWP 51983)]
 [New Thread 0x7fffe6ffd640 (LWP 51984)]
 [New Thread 0x7fffe67fc640 (LWP 51985)]
 [New Thread 0x7fffe5ffb640 (LWP 51986)]
 [New Thread 0x7fffe57fa640 (LWP 51987)]
 [New Thread 0x7fffe4ff9640 (LWP 51988)]
 [New Thread 0x7fffdffff640 (LWP 51989)]
 [New Thread 0x7fffdf7fe640 (LWP 51990)]
 [New Thread 0x7fffdeffd640 (LWP 51991)]
 [New Thread 0x7fffde7fc640 (LWP 51992)]
 [New Thread 0x7fffddffb640 (LWP 51993)]
 [New Thread 0x7fffdd7fa640 (LWP 51994)]
 [New Thread 0x7fffdcff9640 (LWP 51995)]
 [New Thread 0x7fffdc7f8640 (LWP 51996)]
 [New Thread 0x7fffdbff7640 (LWP 51997)]
 [New Thread 0x7fffdb7f6640 (LWP 51998)]
 [New Thread 0x7fffdaff5640 (LWP 51999)]
 [New Thread 0x7fffda7f4640 (LWP 52000)]
 [New Thread 0x7fffd9ff3640 (LWP 52001)]
 [New Thread 0x7fffd97f2640 (LWP 52002)]
 [New Thread 0x7fffd8ff1640 (LWP 52003)]
 [New Thread 0x7fffd87f0640 (LWP 52004)]
 [New Thread 0x7fffd7fef640 (LWP 52005)]
 [New Thread 0x7fffd77ee640 (LWP 52006)]
 [New Thread 0x7fffd6fed640 (LWP 52007)]
 [New Thread 0x7fffd67ec640 (LWP 52008)]
 [Thread 0x7fffdcff9640 (LWP 51995) exited]
 [Thread 0x7fffd9ff3640 (LWP 52001) exited]
 [Thread 0x7fffdbff7640 (LWP 51997) exited]
 [Thread 0x7fffd6fed640 (LWP 52007) exited]
 [Thread 0x7fffd7fef640 (LWP 52005) exited]
 [Thread 0x7fffd87f0640 (LWP 52004) exited]
 [Thread 0x7fffd8ff1640 (LWP 52003) exited]
 [Thread 0x7fffdaff5640 (LWP 51999) exited]
 [Thread 0x7fffd67ec640 (LWP 52008) exited]
 [Thread 0x7fffd77ee640 (LWP 52006) exited]
 [Thread 0x7fffd97f2640 (LWP 52002) exited]
 [Thread 0x7fffda7f4640 (LWP 52000) exited]
 [Thread 0x7fffdb7f6640 (LWP 51998) exited]
 [Thread 0x7fffdc7f8640 (LWP 51996) exited]
 [Thread 0x7fffdd7fa640 (LWP 51994) exited]
 [New Thread 0x7fffd67ec640 (LWP 52009)]
 [New Thread 0x7fffd6fed640 (LWP 52010)]
 [New Thread 0x7fffd77ee640 (LWP 52011)]
 [New Thread 0x7fffd7fef640 (LWP 52012)]
 [New Thread 0x7fffdd7fa640 (LWP 52013)]
 [New Thread 0x7fffdcff9640 (LWP 52014)]
 [New Thread 0x7fffdc7f8640 (LWP 52015)]
 [New Thread 0x7fffdbff7640 (LWP 52016)]
 [New Thread 0x7fffdb7f6640 (LWP 52017)]
 [New Thread 0x7fffdaff5640 (LWP 52018)]
 [New Thread 0x7fffda7f4640 (LWP 52019)]
 [New Thread 0x7fffd9ff3640 (LWP 52020)]
 [New Thread 0x7fffd97f2640 (LWP 52021)]
 [New Thread 0x7fffd8ff1640 (LWP 52022)]
 [New Thread 0x7fffd87f0640 (LWP 52023)]
 [Thread 0x7fffd87f0640 (LWP 52023) exited]
 [Thread 0x7fffd8ff1640 (LWP 52022) exited]
 [Thread 0x7fffd97f2640 (LWP 52021) exited]
 [Thread 0x7fffd9ff3640 (LWP 52020) exited]
 [Thread 0x7fffda7f4640 (LWP 52019) exited]
 [Thread 0x7fffdaff5640 (LWP 52018) exited]
 [Thread 0x7fffdb7f6640 (LWP 52017) exited]
 [Thread 0x7fffdbff7640 (LWP 52016) exited]
 [Thread 0x7fffdc7f8640 (LWP 52015) exited]
 [Thread 0x7fffdcff9640 (LWP 52014) exited]
 [Thread 0x7fffdd7fa640 (LWP 52013) exited]
 [Thread 0x7fffd7fef640 (LWP 52012) exited]
 [Thread 0x7fffd77ee640 (LWP 52011) exited]
 [New Thread 0x7fffd87f0640 (LWP 52024)]
 [Thread 0x7fffd6fed640 (LWP 52010) exited]
 [Thread 0x7fffd67ec640 (LWP 52009) exited]
 [New Thread 0x7fffd8ff1640 (LWP 52025)]
 [New Thread 0x7fffd97f2640 (LWP 52026)]
 [New Thread 0x7fffd9ff3640 (LWP 52027)]
 [New Thread 0x7fffdd7fa640 (LWP 52028)]
 [New Thread 0x7fffdcff9640 (LWP 52029)]
 [New Thread 0x7fffdc7f8640 (LWP 52030)]
 [New Thread 0x7fffdbff7640 (LWP 52031)]
 [New Thread 0x7fffdb7f6640 (LWP 52032)]
 [New Thread 0x7fffdaff5640 (LWP 52033)]
 [New Thread 0x7fffda7f4640 (LWP 52034)]
 [New Thread 0x7fffd7fef640 (LWP 52035)]
 [New Thread 0x7fffd77ee640 (LWP 52036)]
 [New Thread 0x7fffd6fed640 (LWP 52037)]
 [New Thread 0x7fffd67ec640 (LWP 52038)]
 [Thread 0x7fffd67ec640 (LWP 52038) exited]
 [Thread 0x7fffd6fed640 (LWP 52037) exited]
 [Thread 0x7fffd77ee640 (LWP 52036) exited]
 [Thread 0x7fffd7fef640 (LWP 52035) exited]
 [Thread 0x7fffda7f4640 (LWP 52034) exited]
 [Thread 0x7fffdaff5640 (LWP 52033) exited]
 [Thread 0x7fffdb7f6640 (LWP 52032) exited]
 [Thread 0x7fffdbff7640 (LWP 52031) exited]
 [Thread 0x7fffdc7f8640 (LWP 52030) exited]
 [Thread 0x7fffdcff9640 (LWP 52029) exited]
 [Thread 0x7fffdd7fa640 (LWP 52028) exited]
 [Thread 0x7fffd9ff3640 (LWP 52027) exited]
 [Thread 0x7fffd97f2640 (LWP 52026) exited]
 [New Thread 0x7fffd67ec640 (LWP 52039)]
 [Thread 0x7fffd8ff1640 (LWP 52025) exited]
 [Thread 0x7fffd87f0640 (LWP 52024) exited]
 [New Thread 0x7fffd6fed640 (LWP 52040)]
 [New Thread 0x7fffd77ee640 (LWP 52041)]
 [New Thread 0x7fffd7fef640 (LWP 52042)]
 [New Thread 0x7fffdd7fa640 (LWP 52043)]
 [New Thread 0x7fffdcff9640 (LWP 52044)]
 [New Thread 0x7fffdc7f8640 (LWP 52045)]
 [New Thread 0x7fffdbff7640 (LWP 52046)]
 [New Thread 0x7fffdb7f6640 (LWP 52047)]
 [New Thread 0x7fffdaff5640 (LWP 52048)]
 [New Thread 0x7fffda7f4640 (LWP 52049)]
 [New Thread 0x7fffd9ff3640 (LWP 52050)]
 [New Thread 0x7fffd97f2640 (LWP 52051)]
 [New Thread 0x7fffd8ff1640 (LWP 52052)]
 [New Thread 0x7fffd87f0640 (LWP 52053)]
 [New Thread 0x7fffeefcc640 (LWP 52054)]
 [New Thread 0x7fffd5feb640 (LWP 52055)]
 [New Thread 0x7fffd57ea640 (LWP 52056)]
 [New Thread 0x7fffd4fe9640 (LWP 52057)]
 [New Thread 0x7fffd47e8640 (LWP 52058)]
 [New Thread 0x7fffd3fe7640 (LWP 52059)]
 [New Thread 0x7fffd37e6640 (LWP 52060)]
 [New Thread 0x7fffd2fe5640 (LWP 52061)]
 [New Thread 0x7fffd27e4640 (LWP 52062)]
 [New Thread 0x7fffd1fe3640 (LWP 52063)]
 [New Thread 0x7fffd17e2640 (LWP 52064)]
 [New Thread 0x7fffd0fe1640 (LWP 52065)]
 [New Thread 0x7fffd07e0640 (LWP 52066)]
 [New Thread 0x7fffcffdf640 (LWP 52067)]
 [New Thread 0x7fffcf7de640 (LWP 52068)]
 [New Thread 0x7fffcefdd640 (LWP 52069)]
 Output #0, avi, to 'out.avi':
   Metadata:
     ISFT            : Lavf60.11.100
   Stream #0:0: Video: magicyuv (M8RG / 0x4752384D), gbrp(pc,
 gbr/bt709/bt470m, progressive), 999x200, q=2-31, 200 kb/s, 25 fps, 25 tbn
     Metadata:
       encoder         : Lavc60.26.100 magicyuv
 [New Thread 0x7fffce7dc640 (LWP 52070)]
 frame=    0 fps=0.0 q=0.0 size=       0kB time=N/A bitrate=N/A speed=N/A
 Thread 95 "ffmpeg_g" received signal SIGSEGV, Segmentation fault.
 [Switching to Thread 0x7fffeefcc640 (LWP 52054)]
 0x0000555555d8c2d6 in left_predict (s=<optimized out>, src=0x555558968e50
 "", dst=0x0, stride=1008, width=999, height=5) at
 libavcodec/magicyuvenc.c:89
 89              dst[i] = src[i] - prev;
 (gdb) bt
 #0  0x0000555555d8c2d6 in left_predict (s=<optimized out>,
     src=0x555558968e50 "", dst=0x0, stride=1008, width=999, height=5)
     at libavcodec/magicyuvenc.c:89
 #1  0x0000555555d8cd9d in predict_slice (avctx=<optimized out>,
     tdata=<optimized out>, n=15, threadnr=<optimized out>)
     at libavcodec/magicyuvenc.c:507
 #2  0x0000555555b6205d in avcodec_default_execute2 (c=0x555558936280,
     func=0x555555d8ca40 <predict_slice>, arg=0x55555889b900,
     ret=<optimized out>, count=16) at libavcodec/avcodec.c:74
 #3  0x0000555555d8d45d in magy_encode_frame (avctx=0x555558936280,
     pkt=0x555558932a80, frame=0x55555889b900, got_packet=0x555558931fc0)
     at libavcodec/magicyuvenc.c:572
 #4  0x0000555555c4c998 in ff_encode_encode_cb (avctx=0x555558936280,
     avpkt=0x555558932a80, frame=0x55555889b900,
     got_packet=got_packet at entry=0x555558931fc0) at libavcodec/encode.c:263
 #5  0x0000555555c91b2b in worker (v=<optimized out>)
     at libavcodec/frame_thread_encoder.c:105
 #6  0x00007ffff788eb43 in start_thread (arg=<optimized out>)
     at ./nptl/pthread_create.c:442
 #7  0x00007ffff7920a00 in clone3 ()
     at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
 }}}


 {{{
 ==52151== Invalid read of size 32
 ==52151==    at 0xFEE77C: ??? (in /ffmpeg_g)
 ==52151==    by 0x940D14: predict_slice (magicyuvenc.c:498)
 ==52151==    by 0x71605C: avcodec_default_execute2 (avcodec.c:74)
 ==52151==    by 0x94145C: magy_encode_frame (magicyuvenc.c:572)
 ==52151==    by 0x800997: ff_encode_encode_cb (encode.c:263)
 ==52151==    by 0x845B2A: worker (frame_thread_encoder.c:105)
 ==52151==    by 0x4E88B42: start_thread (pthread_create.c:442)
 ==52151==    by 0x4F19BB3: clone (clone.S:100)
 ==52151==  Address 0x1f4c5e20 is 0 bytes after a block of size 204,832
 alloc'd
 ==52151==    at 0x484DE30: memalign (in /usr/libexec/valgrind
 /vgpreload_memcheck-amd64-linux.so)
 ==52151==    by 0x484DF92: posix_memalign (in /usr/libexec/valgrind
 /vgpreload_memcheck-amd64-linux.so)
 ==52151==    by 0x10DF6C4: av_malloc (mem.c:105)
 ==52151==    by 0x10C7709: av_buffer_alloc (buffer.c:82)
 ==52151==    by 0x10C7783: av_buffer_allocz (buffer.c:95)
 ==52151==    by 0x10C7F35: pool_alloc_buffer (buffer.c:363)
 ==52151==    by 0x10C7F35: av_buffer_pool_get (buffer.c:401)
 ==52151==    by 0x324C08: ff_frame_pool_get (framepool.c:217)
 ==52151==    by 0x4AF3AA: ff_default_get_video_buffer2 (video.c:94)
 ==52151==    by 0x4AF4A0: ff_get_video_buffer (video.c:115)
 ==52151==    by 0x4392CC: scale_frame (vf_scale.c:813)
 ==52151==    by 0x439D49: filter_frame (vf_scale.c:909)
 ==52151==    by 0x311C95: ff_filter_frame_framed (avfilter.c:969)
 ==52151==    by 0x311C95: ff_filter_frame_to_filter (avfilter.c:1123)
 ==52151==    by 0x311C95: ff_filter_activate_default (avfilter.c:1172)
 ==52151==    by 0x311C95: ff_filter_activate (avfilter.c:1331)
 ==52151==
 ==52151== Invalid write of size 8
 ==52151==    at 0xFEE783: ??? (in /ffmpeg_g)
 ==52151==    by 0x940D14: predict_slice (magicyuvenc.c:498)
 ==52151==    by 0x71605C: avcodec_default_execute2 (avcodec.c:74)
 ==52151==    by 0x94145C: magy_encode_frame (magicyuvenc.c:572)
 ==52151==    by 0x800997: ff_encode_encode_cb (encode.c:263)
 ==52151==    by 0x845B2A: worker (frame_thread_encoder.c:105)
 ==52151==    by 0x4E88B42: start_thread (pthread_create.c:442)
 ==52151==    by 0x4F19BB3: clone (clone.S:100)
 ==52151==  Address 0x1fb71d40 is 0 bytes after a block of size 403,200
 alloc'd
 ==52151==    at 0x484DE30: memalign (in /usr/libexec/valgrind
 /vgpreload_memcheck-amd64-linux.so)
 ==52151==    by 0x484DF92: posix_memalign (in /usr/libexec/valgrind
 /vgpreload_memcheck-amd64-linux.so)
 ==52151==    by 0x10DF6C4: av_malloc (mem.c:105)
 ==52151==    by 0x10DF88D: av_mallocz (mem.c:256)
 ==52151==    by 0x25DF33: magy_encode_init (magicyuvenc.c:198)
 ==52151==    by 0x716F3C: avcodec_open2 (avcodec.c:335)
 ==52151==    by 0x255612: ff_frame_thread_encoder_init
 (frame_thread_encoder.c:219)
 ==52151==    by 0x8012FD: ff_encode_preinit (encode.c:799)
 ==52151==    by 0x716EF7: avcodec_open2 (avcodec.c:313)
 ==52151==    by 0x2C4192: enc_open (ffmpeg_enc.c:426)
 ==52151==    by 0x2C61D9: enc_frame (ffmpeg_enc.c:1192)
 ==52151==    by 0x2CAA48: fg_output_step (ffmpeg_filter.c:1824)
 ==52151==    by 0x2CAA48: reap_filters (ffmpeg_filter.c:1845)
 ==52151==    by 0x2CAA48: reap_filters (ffmpeg_filter.c:1834)
 ==52151==
 ==52151== Invalid write of size 8
 ==52151==    at 0xFEE789: ??? (in /ffmpeg_g)
 ==52151==    by 0x940D14: predict_slice (magicyuvenc.c:498)
 ==52151==    by 0x71605C: avcodec_default_execute2 (avcodec.c:74)
 ==52151==    by 0x94145C: magy_encode_frame (magicyuvenc.c:572)
 ==52151==    by 0x800997: ff_encode_encode_cb (encode.c:263)
 ==52151==    by 0x845B2A: worker (frame_thread_encoder.c:105)
 ==52151==    by 0x4E88B42: start_thread (pthread_create.c:442)
 ==52151==    by 0x4F19BB3: clone (clone.S:100)
 ==52151==  Address 0x1fb71d60 is 0 bytes after a block of size 403,232 in
 arena "client"
 ==52151==
 ==52151== Invalid read of size 32
 ==52151==    at 0xFEE794: ??? (in /ffmpeg_g)
 ==52151==    by 0x940D14: predict_slice (magicyuvenc.c:498)
 ==52151==    by 0x71605C: avcodec_default_execute2 (avcodec.c:74)
 ==52151==    by 0x94145C: magy_encode_frame (magicyuvenc.c:572)
 ==52151==    by 0x800997: ff_encode_encode_cb (encode.c:263)
 ==52151==    by 0x845B2A: worker (frame_thread_encoder.c:105)
 ==52151==    by 0x4E88B42: start_thread (pthread_create.c:442)
 ==52151==    by 0x4F19BB3: clone (clone.S:100)
 ==52151==  Address 0x1f52a000 is 16 bytes after a block of size 204,848 in
 arena "client"
 }}}
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/10555>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list