[FFmpeg-trac] #6463(undetermined:new): av_interleaved_write_frame(): Cannot allocate memory

FFmpeg trac at avcodec.org
Fri Mar 15 08:58:54 EET 2019


#6463: av_interleaved_write_frame(): Cannot allocate memory
-------------------------------------+-------------------------------------
             Reporter:  epollia      |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:
                                     |  undetermined
              Version:  git-master   |               Resolution:
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by scanlime):

 The results seem to be the same (error message and segfault) on a default
 configuration and with massif running. Here's what ms_print says. I'll dig
 further but so far i have no evidence there was a malloc failure. Maybe
 someone's using ENOMEM to indicate a 32-bit data structure is running out
 of space in the atom table?

 {{{
 --------------------------------------------------------------------------------
 Command:            /home/micah/ffmpeg_sources_alt/ffmpeg/ffmpeg -i
 /mnt/podcaster/2019-02-28_15-04-50.mkv -c:v copy -c:a copy
 /filebox/shares/vidbox/lapser/auto/temp-mnt-
 podcaster-2019-02-28_15-04-50-remux.mp4
 Massif arguments:   (none)
 ms_print arguments: massif.out.17523
 --------------------------------------------------------------------------------


     GB
 3.002^
 :
      |
 #::::::::::::::@
      |                                                        #: : : : :
 :: :@
      |                                                        #: : : : :
 :: :@
      |                                                        #: : : : :
 :: :@
      |                                    ::  ::::::::::@:: ::#: : : : :
 :: :@
      |                                    ::::::: :::: :@: :: #: : : : :
 :: :@
      |                                    ::: ::: :::: :@: :: #: : : : :
 :: :@
      |                                    ::: ::: :::: :@: :: #: : : : :
 :: :@
      |                                    ::: ::: :::: :@: :: #: : : : :
 :: :@
      |                            :::@@@@:::: ::: :::: :@: :: #: : : : :
 :: :@
      |                            : :@ @ :::: ::: :::: :@: :: #: : : : :
 :: :@
      |                            : :@ @ :::: ::: :::: :@: :: #: : : : :
 :: :@
      |                  :::::::@::: :@ @ :::: ::: :::: :@: :: #: : : : :
 :: :@
      |                  : :: : @::: :@ @ :::: ::: :::: :@: :: #: : : : :
 :: :@
      |              ::::: :: : @::: :@ @ :::: ::: :::: :@: :: #: : : : :
 :: :@
      |              :: :: :: : @::: :@ @ :::: ::: :::: :@: :: #: : : : :
 :: :@
      |        @@:::::: :: :: : @::: :@ @ :::: ::: :::: :@: :: #: : : : :
 :: :@
      |       :@ :: ::: :: :: : @::: :@ @ :::: ::: :::: :@: :: #: : : : :
 :: :@
      |   :::::@ :: ::: :: :: : @::: :@ @ :::: ::: :::: :@: :: #: : : : :
 :: :@
    0
 +----------------------------------------------------------------------->Gi
      0
 845.6

 Number of snapshots: 59
  Detailed snapshots: [7, 18, 23, 24, 37, 41 (peak), 58]

 --------------------------------------------------------------------------------
   n        time(i)         total(B)   useful-heap(B) extra-heap(B)
 stacks(B)
 --------------------------------------------------------------------------------
   0              0                0                0             0
 0
   1 16,053,034,096       76,496,040       76,473,253        22,787
 0
   2 29,536,767,934      152,306,280      152,278,890        27,390
 0
   3 45,994,253,464      202,990,752      202,960,055        30,697
 0
   4 61,735,334,680      303,235,408      303,217,708        17,700
 0
   5 73,633,252,645      303,747,152      303,720,490        26,662
 0
   6 92,641,335,924      404,812,832      404,781,684        31,148
 0
   7 113,249,490,128      605,905,064      605,881,526        23,538
 0
 100.00% (605,881,526B) (heap allocation functions) malloc/new/new[],
 --alloc-fns, etc.
 ->99.66% (603,815,936B) 0xF02636: av_realloc_f (mem.c:157)
 | ->99.65% (603,783,168B) 0xF02673: av_reallocp_array (mem.c:210)
 | | ->99.65% (603,783,168B) 0x4BC98E: ff_mov_write_packet (movenc.c:5423)
 | |   ->99.65% (603,783,168B) 0x4BDF43: mov_write_single_packet
 (movenc.c:5632)
 | |     ->99.65% (603,783,168B) 0x4BE2D7: mov_write_packet (movenc.c:5752)
 | |       ->99.65% (603,783,168B) 0x4DC5FB: av_interleaved_write_frame
 (mux.c:747)
 | |         ->99.65% (603,783,168B) 0x28C2ED: write_packet.isra.14
 (ffmpeg.c:815)
 | |           ->99.65% (603,783,168B) 0x28CCF3: output_packet.constprop.24
 (ffmpeg.c:886)
 | |             ->99.65% (603,783,168B) 0x29461D: process_input_packet
 (ffmpeg.c:2075)
 | |               ->99.65% (603,783,168B) 0x2969D8: transcode
 (ffmpeg.c:4515)
 | |                 ->99.65% (603,783,168B) 0x273D43: main (ffmpeg.c:4891)
 | |
 | ->00.01% (32,768B) in 1+ places, all below ms_print's threshold (01.00%)
 |
 ->00.34% (2,065,590B) in 1+ places, all below ms_print's threshold
 (01.00%)

 --------------------------------------------------------------------------------
   n        time(i)         total(B)   useful-heap(B) extra-heap(B)
 stacks(B)
 --------------------------------------------------------------------------------
   8 127,523,130,817      605,860,168      605,844,758        15,410
 0
   9 149,582,357,875      606,232,432      606,201,377        31,055
 0
  10 167,748,774,769      606,085,536      606,057,989        27,547
 0
  11 182,852,101,013      807,415,400      807,387,707        27,693
 0
  12 200,068,969,757      807,631,576      807,599,132        32,444
 0
  13 221,111,806,662      807,078,560      807,058,790        19,770
 0
  14 238,416,245,369    1,210,011,800    1,209,985,534        26,266
 0
  15 261,372,066,443    1,210,367,640    1,210,333,362        34,278
 0
  16 276,943,414,814    1,209,772,664    1,209,753,232        19,432
 0
  17 300,300,436,315    1,209,561,680    1,209,546,165        15,515
 0
  18 318,466,996,551    1,210,018,472    1,209,992,232        26,240
 0
 100.00% (1,209,992,232B) (heap allocation functions) malloc/new/new[],
 --alloc-fns, etc.
 ->99.82% (1,207,795,712B) 0xF02636: av_realloc_f (mem.c:157)
 | ->99.81% (1,207,762,944B) 0xF02673: av_reallocp_array (mem.c:210)
 | | ->99.81% (1,207,762,944B) 0x4BC98E: ff_mov_write_packet
 (movenc.c:5423)
 | |   ->99.81% (1,207,762,944B) 0x4BDF43: mov_write_single_packet
 (movenc.c:5632)
 | |     ->99.81% (1,207,762,944B) 0x4BE2D7: mov_write_packet
 (movenc.c:5752)
 | |       ->99.81% (1,207,762,944B) 0x4DC5FB: av_interleaved_write_frame
 (mux.c:747)
 | |         ->99.81% (1,207,762,944B) 0x28C2ED: write_packet.isra.14
 (ffmpeg.c:815)
 | |           ->99.81% (1,207,762,944B) 0x28CCF3:
 output_packet.constprop.24 (ffmpeg.c:886)
 | |             ->99.81% (1,207,762,944B) 0x29461D: process_input_packet
 (ffmpeg.c:2075)
 | |               ->99.81% (1,207,762,944B) 0x2969D8: transcode
 (ffmpeg.c:4515)
 | |                 ->99.81% (1,207,762,944B) 0x273D43: main
 (ffmpeg.c:4891)
 | |
 | ->00.00% (32,768B) in 1+ places, all below ms_print's threshold (01.00%)
 |
 ->00.18% (2,196,520B) in 1+ places, all below ms_print's threshold
 (01.00%)

 --------------------------------------------------------------------------------
   n        time(i)         total(B)   useful-heap(B) extra-heap(B)
 stacks(B)
 --------------------------------------------------------------------------------
  19 334,038,340,461    1,209,662,736    1,209,643,814        18,922
 0
  20 347,014,453,978    1,210,369,160    1,210,334,991        34,169
 0
  21 365,331,571,821    1,612,808,864    1,612,779,173        29,691
 0
  22 388,688,595,961    1,612,724,424    1,612,696,932        27,492
 0
  23 402,359,050,491    1,612,995,904    1,612,963,006        32,898
 0
 100.00% (1,612,963,006B) (heap allocation functions) malloc/new/new[],
 --alloc-fns, etc.
 ->99.84% (1,610,448,896B) 0xF02636: av_realloc_f (mem.c:157)
 | ->99.84% (1,610,416,128B) 0xF02673: av_reallocp_array (mem.c:210)
 | | ->99.84% (1,610,416,128B) 0x4BC98E: ff_mov_write_packet
 (movenc.c:5423)
 | |   ->99.84% (1,610,416,128B) 0x4BDF43: mov_write_single_packet
 (movenc.c:5632)
 | |     ->99.84% (1,610,416,128B) 0x4BE2D7: mov_write_packet
 (movenc.c:5752)
 | |       ->99.84% (1,610,416,128B) 0x4DC5FB: av_interleaved_write_frame
 (mux.c:747)
 | |         ->99.84% (1,610,416,128B) 0x28C2ED: write_packet.isra.14
 (ffmpeg.c:815)
 | |           ->99.84% (1,610,416,128B) 0x28CCF3:
 output_packet.constprop.24 (ffmpeg.c:886)
 | |             ->99.84% (1,610,416,128B) 0x29461D: process_input_packet
 (ffmpeg.c:2075)
 | |               ->99.84% (1,610,416,128B) 0x2969D8: transcode
 (ffmpeg.c:4515)
 | |                 ->99.84% (1,610,416,128B) 0x273D43: main
 (ffmpeg.c:4891)
 | |
 | ->00.00% (32,768B) in 1+ places, all below ms_print's threshold (01.00%)
 |
 ->00.16% (2,514,110B) in 1+ places, all below ms_print's threshold
 (01.00%)

 --------------------------------------------------------------------------------
   n        time(i)         total(B)   useful-heap(B) extra-heap(B)
 stacks(B)
 --------------------------------------------------------------------------------
  24 418,441,924,302    1,612,401,608    1,612,380,500        21,108
 0
 100.00% (1,612,380,500B) (heap allocation functions) malloc/new/new[],
 --alloc-fns, etc.
 ->99.88% (1,610,448,896B) 0xF02636: av_realloc_f (mem.c:157)
 | ->99.88% (1,610,416,128B) 0xF02673: av_reallocp_array (mem.c:210)
 | | ->99.88% (1,610,416,128B) 0x4BC98E: ff_mov_write_packet
 (movenc.c:5423)
 | |   ->99.88% (1,610,416,128B) 0x4BDF43: mov_write_single_packet
 (movenc.c:5632)
 | |     ->99.88% (1,610,416,128B) 0x4BE2D7: mov_write_packet
 (movenc.c:5752)
 | |       ->99.88% (1,610,416,128B) 0x4DC5FB: av_interleaved_write_frame
 (mux.c:747)
 | |         ->99.88% (1,610,416,128B) 0x28C2ED: write_packet.isra.14
 (ffmpeg.c:815)
 | |           ->99.88% (1,610,416,128B) 0x28CCF3:
 output_packet.constprop.24 (ffmpeg.c:886)
 | |             ->99.88% (1,610,416,128B) 0x29461D: process_input_packet
 (ffmpeg.c:2075)
 | |               ->99.88% (1,610,416,128B) 0x2969D8: transcode
 (ffmpeg.c:4515)
 | |                 ->99.88% (1,610,416,128B) 0x273D43: main
 (ffmpeg.c:4891)
 | |
 | ->00.00% (32,768B) in 1+ places, all below ms_print's threshold (01.00%)
 |
 ->00.12% (1,931,604B) in 1+ places, all below ms_print's threshold
 (01.00%)

 --------------------------------------------------------------------------------
   n        time(i)         total(B)   useful-heap(B) extra-heap(B)
 stacks(B)
 --------------------------------------------------------------------------------
  25 442,328,055,072    1,612,994,088    1,612,960,099        33,989
 0
  26 462,587,021,533    2,417,730,880    2,417,710,272        20,608
 0
  27 478,705,728,040    2,417,933,568    2,417,908,133        25,435
 0
  28 489,451,536,699    2,417,593,200    2,417,577,677        15,523
 0
  29 505,570,238,980    2,417,691,824    2,417,671,370        20,454
 0
  30 518,107,016,669    2,418,362,288    2,418,327,603        34,685
 0
  31 535,354,150,542    2,418,124,040    2,418,094,266        29,774
 0
  32 557,991,060,002    2,418,063,976    2,418,035,535        28,441
 0
  33 572,004,357,528    2,417,807,912    2,417,784,687        23,225
 0
  34 588,851,577,343    2,417,806,912    2,417,784,549        22,363
 0
  35 602,635,661,873    2,417,851,568    2,417,828,459        23,109
 0
  36 619,482,866,935    2,417,800,992    2,417,778,546        22,446
 0
  37 631,735,377,645    2,418,329,832    2,418,295,503        34,329
 0
 100.00% (2,418,295,503B) (heap allocation functions) malloc/new/new[],
 --alloc-fns, etc.
 ->99.89% (2,415,755,264B) 0xF02636: av_realloc_f (mem.c:157)
 | ->99.89% (2,415,722,496B) 0xF02673: av_reallocp_array (mem.c:210)
 | | ->99.89% (2,415,722,496B) 0x4BC98E: ff_mov_write_packet
 (movenc.c:5423)
 | |   ->99.89% (2,415,722,496B) 0x4BDF43: mov_write_single_packet
 (movenc.c:5632)
 | |     ->99.89% (2,415,722,496B) 0x4BE2D7: mov_write_packet
 (movenc.c:5752)
 | |       ->99.89% (2,415,722,496B) 0x4DC5FB: av_interleaved_write_frame
 (mux.c:747)
 | |         ->99.89% (2,415,722,496B) 0x28C2ED: write_packet.isra.14
 (ffmpeg.c:815)
 | |           ->99.89% (2,415,722,496B) 0x28CCF3:
 output_packet.constprop.24 (ffmpeg.c:886)
 | |             ->99.89% (2,415,722,496B) 0x29461D: process_input_packet
 (ffmpeg.c:2075)
 | |               ->99.89% (2,415,722,496B) 0x2969D8: transcode
 (ffmpeg.c:4515)
 | |                 ->99.89% (2,415,722,496B) 0x273D43: main
 (ffmpeg.c:4891)
 | |
 | ->00.00% (32,768B) in 1+ places, all below ms_print's threshold (01.00%)
 |
 ->00.11% (2,540,239B) in 1+ places, all below ms_print's threshold
 (01.00%)

 --------------------------------------------------------------------------------
   n        time(i)         total(B)   useful-heap(B) extra-heap(B)
 stacks(B)
 --------------------------------------------------------------------------------
  38 648,582,578,163    2,417,945,864    2,417,920,385        25,479
 0
  39 668,724,419,901    2,417,650,824    2,417,632,141        18,683
 0
  40 688,866,271,475    2,418,176,200    2,418,142,793        33,407
 0
  41 710,408,986,250    3,222,923,080    3,222,905,071        18,009
 0
 100.00% (3,222,905,071B) (heap allocation functions) malloc/new/new[],
 --alloc-fns, etc.
 ->99.94% (3,221,061,632B) 0xF02636: av_realloc_f (mem.c:157)
 | ->99.94% (3,221,028,864B) 0xF02673: av_reallocp_array (mem.c:210)
 | | ->99.94% (3,221,028,864B) 0x4BC98E: ff_mov_write_packet
 (movenc.c:5423)
 | |   ->99.94% (3,221,028,864B) 0x4BDF43: mov_write_single_packet
 (movenc.c:5632)
 | |     ->99.94% (3,221,028,864B) 0x4BE2D7: mov_write_packet
 (movenc.c:5752)
 | |       ->99.94% (3,221,028,864B) 0x4DC5FB: av_interleaved_write_frame
 (mux.c:747)
 | |         ->99.94% (3,221,028,864B) 0x28C2ED: write_packet.isra.14
 (ffmpeg.c:815)
 | |           ->99.94% (3,221,028,864B) 0x28CCF3:
 output_packet.constprop.24 (ffmpeg.c:886)
 | |             ->99.94% (3,221,028,864B) 0x29461D: process_input_packet
 (ffmpeg.c:2075)
 | |               ->99.94% (3,221,028,864B) 0x2969D8: transcode
 (ffmpeg.c:4515)
 | |                 ->99.94% (3,221,028,864B) 0x273D43: main
 (ffmpeg.c:4891)
 | |
 | ->00.00% (32,768B) in 1+ places, all below ms_print's threshold (01.00%)
 |
 ->00.06% (1,843,439B) in 1+ places, all below ms_print's threshold
 (01.00%)

 --------------------------------------------------------------------------------
   n        time(i)         total(B)   useful-heap(B) extra-heap(B)
 stacks(B)
 --------------------------------------------------------------------------------
  42 727,193,849,439    3,222,727,632    3,222,711,778        15,854
 0
  43 754,049,632,606    3,223,555,208    3,223,523,007        32,201
 0
  44 780,905,413,380    3,222,799,120    3,222,783,689        15,431
 0
  45 801,047,255,214    3,222,674,408    3,222,659,198        15,210
 0
  46 824,842,090,069    3,222,831,904    3,222,816,156        15,748
 0
  47 845,575,987,941    3,223,100,584    3,223,085,203        15,381
 0
  48 864,828,886,803    3,223,042,816    3,223,021,786        21,030
 0
  49 888,524,759,011    3,223,582,376    3,223,548,460        33,916
 0
  50 890,680,633,213    3,222,839,040    3,222,822,645        16,395
 0
  51 892,836,511,018    3,222,992,384    3,222,972,199        20,185
 0
  52 894,992,386,302    3,223,322,296    3,223,294,214        28,082
 0
  53 897,148,263,120    3,223,562,224    3,223,529,283        32,941
 0
  54 899,304,138,894    3,222,914,088    3,222,896,274        17,814
 0
  55 901,460,013,106    3,223,032,040    3,223,010,671        21,369
 0
  56 903,615,887,753    3,223,121,680    3,223,098,506        23,174
 0
  57 905,771,767,923    3,222,884,048    3,222,867,016        17,032
 0
  58 907,927,652,959    3,222,797,384    3,222,782,066        15,318
 0
 100.00% (3,222,782,066B) (heap allocation functions) malloc/new/new[],
 --alloc-fns, etc.
 ->99.95% (3,221,061,632B) 0xF02636: av_realloc_f (mem.c:157)
 | ->99.95% (3,221,028,864B) 0xF02673: av_reallocp_array (mem.c:210)
 | | ->99.95% (3,221,028,864B) 0x4BC98E: ff_mov_write_packet
 (movenc.c:5423)
 | |   ->99.95% (3,221,028,864B) 0x4BDF43: mov_write_single_packet
 (movenc.c:5632)
 | |     ->99.95% (3,221,028,864B) 0x4BE2D7: mov_write_packet
 (movenc.c:5752)
 | |       ->99.95% (3,221,028,864B) 0x4DC5FB: av_interleaved_write_frame
 (mux.c:747)
 | |         ->99.95% (3,221,028,864B) 0x28C2ED: write_packet.isra.14
 (ffmpeg.c:815)
 | |           ->99.95% (3,221,028,864B) 0x28CCF3:
 output_packet.constprop.24 (ffmpeg.c:886)
 | |             ->99.95% (3,221,028,864B) 0x29461D: process_input_packet
 (ffmpeg.c:2075)
 | |               ->99.95% (3,221,028,864B) 0x2969D8: transcode
 (ffmpeg.c:4515)
 | |                 ->99.95% (3,221,028,864B) 0x273D43: main
 (ffmpeg.c:4891)
 | |
 | ->00.00% (32,768B) in 1+ places, all below ms_print's threshold (01.00%)
 |
 ->00.05% (1,720,434B) in 1+ places, all below ms_print's threshold
 (01.00%)
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/6463#comment:24>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list