Opened 6 years ago

Closed 6 years ago

#2767 closed defect (fixed)

utils: crash in low mem situation

Reported by: ami_stuff Owned by:
Priority: normal Component: avformat
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

I will send a possible patch soon.

http://www1.datafilehost.com/d/51ada4be

knoppix@Microknoppix:/media/sdb1$ ulimit -c unlimited -Sv 23500
knoppix@Microknoppix:/media/sdb1$ ./ffmpeg_g -i asamples/test.shn -f null -
ffmpeg version 1.1.git Copyright (c) 2000-2013 the FFmpeg developers
  built on Jul  9 2013 17:21:00 with gcc 4.7 (Debian 4.7.2-4)
  configuration: --disable-asm --enable-gpl --disable-ffprobe --disable-ffserver
  libavutil      52. 38.100 / 52. 38.100
  libavcodec     55. 18.102 / 55. 18.102
  libavformat    55. 11.101 / 55. 11.101
  libavdevice    55.  2.100 / 55.  2.100
  libavfilter     3. 79.100 /  3. 79.100
  libswscale      2.  3.100 /  2.  3.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
Segmentation fault (core dumped)
knoppix@Microknoppix:/media/sdb1$ ulimit -c unlimited -Sv 2350055555
knoppix@Microknoppix:/media/sdb1$ gdb -c core 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 "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /media/sdb1/ffmpeg_g...done.
[New LWP 12950]

warning: Can't read pathname for load map: Input/output error.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
Failed to read a valid object file image from memory.
Core was generated by `./ffmpeg_g -i asamples/test.shn -f null -'.
Program terminated with signal 11, Segmentation fault.
#0  av_dup_packet (pkt=0x0) at libavcodec/avpacket.c:237
237	    if (!pkt->buf && pkt->data
(gdb) bt
#0  av_dup_packet (pkt=0x0) at libavcodec/avpacket.c:237
#1  0x08235b56 in avformat_find_stream_info (ic=0x9077c50, options=0x90783b0)
    at libavformat/utils.c:2786
#2  0x080a3b85 in open_input_file (o=o@entry=0xbff2b5c0, 
    filename=<optimized out>) at ffmpeg_opt.c:815
#3  0x080a23e9 in open_files (inout=<optimized out>, 
    inout@entry=0x887d25b "input", 
    open_file=open_file@entry=0x80a37a0 <open_input_file>, 
    l=<error reading variable: Unhandled dwarf expression opcode 0xfa>, 
    l=<error reading variable: Unhandled dwarf expression opcode 0xfa>)
    at ffmpeg_opt.c:2495
#4  0x080aa5f9 in ffmpeg_parse_options (argc=argc@entry=6, 
    argv=argv@entry=0xbff2ba44) at ffmpeg_opt.c:2532
#5  0x0809faca in main (argc=6, argv=0xbff2ba44) at ffmpeg.c:3367
(gdb)

Change History (2)

comment:1 Changed 6 years ago by cehoyos

  • Component changed from undetermined to avformat
  • Reproduced by developer set
  • Status changed from new to open
  • Version changed from unspecified to git-master

The crash was fixed by you but ffmpeg now exits without any (error) message, please see my comment on ffmpeg-devel.

$ ulimit -Sv 55000
$ ffmpeg -i test.shn
ffmpeg version N-54614-g067c9c3 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jul 10 2013 13:54:59 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl --disable-indev=jack
  libavutil      52. 38.100 / 52. 38.100
  libavcodec     55. 18.102 / 55. 18.102
  libavformat    55. 12.100 / 55. 12.100
  libavdevice    55.  3.100 / 55.  3.100
  libavfilter     3. 79.101 /  3. 79.101
  libswscale      2.  3.100 /  2.  3.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100

comment:2 Changed 6 years ago by cehoyos

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

Thank you for taking care of the missing error message.

Note: See TracTickets for help on using tickets.