Opened 6 years ago

Closed 5 years ago

#1802 closed defect (needs_more_info)

Segmentation fault with ffserver

Reported by: burek Owned by:
Priority: important Component: undetermined
Version: unspecified Keywords: crash
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

I've tried:

# ffmpeg -f v4l2 -s 320x240 -r 30 -i /dev/video0 -f alsa -ac 2 -i hw:0 http://localhost:8090/feed1.ffm

Using ffserver.conf:

Port 8090
BindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 1000
CustomLog -
#NoDaemon

<Feed feed1.ffm>
	File /tmp/feed1.ffm
	FileMaxSize 200K
	ACL allow 127.0.0.1
</Feed>

<Stream live.flv>
	Format flv
	Feed feed1.ffm

	VideoCodec libx264
	VideoFrameRate 30
	VideoBitRate 512
	VideoSize 320x240
	AVOptionVideo crf 23
	AVOptionVideo preset medium
	AVPresetVideo default
	AVPresetVideo baseline
	AVOptionVideo flags +global_header

	AudioCodec aac
	Strict -2
	AudioBitRate 32
	AudioChannels 2
	AudioSampleRate 44100
	AVOptionAudio flags +global_header
</Stream>

##################################################################
# Special streams
##################################################################
<Stream stat.html>
	Format status
	# Only allow local people to get the status
	ACL allow localhost
	ACL allow 192.168.0.0 192.168.255.255
</Stream>

# Redirect index.html to the appropriate site
<Redirect index.html>
	URL http://www.ffmpeg.org/
</Redirect>
##################################################################

Here is gdb output:

# 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 /root/tmp/ffmpeg/ffmpeg_g...done.
(gdb) r -f v4l2 -s 320x240 -r 30 -i /dev/video0 -f alsa -ac 2 -i hw:0 http://localhost:8090/feed1.ffm
Starting program: /root/tmp/ffmpeg/ffmpeg_g -f v4l2 -s 320x240 -r 30 -i /dev/video0 -f alsa -ac 2 -i hw:0 http://localhost:8090/feed1.ffm
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
ffmpeg version N-37621-g9586db6 Copyright (c) 2000-2012 the FFmpeg developers
  built on Oct 10 2012 21:48:39 with gcc 4.6 (Debian 4.6.3-1)
  configuration: --enable-static --enable-shared --enable-gpl --enable-nonfree --enable-postproc --enable-libx264 --enable-libaacplus
  libavutil      51. 74.100 / 51. 74.100
  libavcodec     54. 65.100 / 54. 65.100
  libavformat    54. 31.100 / 54. 31.100
  libavdevice    54.  3.100 / 54.  3.100
  libavfilter     3. 19.102 /  3. 19.102
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 16.100 /  0. 16.100
  libpostproc    52.  1.100 / 52.  1.100
[video4linux2,v4l2 @ 0x632420] Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 152978.579464, bitrate: 36864 kb/s
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 320x240, 36864 kb/s, 30 tbr, 1000k tbn, 30 tbc
[alsa @ 0x633440] Estimating duration from bitrate, this may be inaccurate
Guessed Channel Layout for  Input Stream #1.0 : stereo
Input #1, alsa, from 'hw:0':
  Duration: N/A, start: 1349923095.063673, bitrate: 1536 kb/s
    Stream #1:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Output #0, ffm, to 'http://localhost:8090/feed1.ffm':
  Metadata:
    creation_time   : now
    encoder         : Lavf54.31.100
    Stream #0:0: Audio: mp2, 44100 Hz, mono, s16, 32 kb/s
    Stream #0:1: Video: mpeg1video, yuv420p, 160x128, q=2-31, 64 kb/s, 1000k tbn, 30 tbc
    Stream #0:2: Audio: wmav2, 22050 Hz, mono, fltp, 64 kb/s
    Stream #0:3: Video: msmpeg4v3, yuv420p, 352x240, q=2-31, 256 kb/s, 1000k tbn, 30 tbc
Stream mapping:
  Stream #1:0 -> #0:0 (pcm_s16le -> mp2)
  Stream #0:0 -> #0:1 (rawvideo -> mpeg1video)
  Stream #1:0 -> #0:2 (pcm_s16le -> wmav2)
  Stream #0:0 -> #0:3 (rawvideo -> msmpeg4)
Press [q] to stop, [?] for help
[New Thread 0x7ffff4036700 (LWP 10221)]
[New Thread 0x7ffff3835700 (LWP 10222)]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff794a85d in avfilter_copy_buffer_ref_props () from /usr/local/lib/libavfilter.so.3
(gdb) bt
#0  0x00007ffff794a85d in avfilter_copy_buffer_ref_props () from /usr/local/lib/libavfilter.so.3
#1  0x00007ffff793e9f6 in ?? () from /usr/local/lib/libavfilter.so.3
#2  0x00007ffff794523b in ?? () from /usr/local/lib/libavfilter.so.3
#3  0x00007ffff794523b in ?? () from /usr/local/lib/libavfilter.so.3
#4  0x00007ffff794ae3d in ?? () from /usr/local/lib/libavfilter.so.3
#5  0x00007ffff794b066 in av_buffersrc_add_ref () from /usr/local/lib/libavfilter.so.3
#6  0x00007ffff794b1c8 in av_buffersrc_add_frame () from /usr/local/lib/libavfilter.so.3
#7  0x00000000004188f6 in decode_audio (got_output=0x7fffffffde8c, pkt=0x7fffffffdce0, ist=0x634aa0) at ffmpeg.c:1539
#8  output_packet (ist=<optimized out>, pkt=<optimized out>) at ffmpeg.c:1760
#9  0x0000000000419369 in process_input (file_index=<optimized out>) at ffmpeg.c:2828
#10 0x0000000000408034 in transcode_step () at ffmpeg.c:2924
#11 transcode () at ffmpeg.c:2976
#12 main (argc=<optimized out>, argv=<optimized out>) at ffmpeg.c:3160
(gdb) disass $pc-32,$pc+32
Dump of assembler code from 0x7ffff794a83d to 0x7ffff794a87d:
   0x00007ffff794a83d:  add    %al,(%rax)
   0x00007ffff794a83f:  add    %cl,-0x77(%rax)
   0x00007ffff794a842 <avfilter_copy_buffer_ref_props+2>:       pop    %rsp
   0x00007ffff794a843 <avfilter_copy_buffer_ref_props+3>:       and    $0xe8,%al
   0x00007ffff794a845 <avfilter_copy_buffer_ref_props+5>:       mov    %rbp,-0x10(%rsp)
   0x00007ffff794a84a <avfilter_copy_buffer_ref_props+10>:      mov    %rdi,%rbx
   0x00007ffff794a84d <avfilter_copy_buffer_ref_props+13>:      mov    %r12,-0x8(%rsp)
   0x00007ffff794a852 <avfilter_copy_buffer_ref_props+18>:      sub    $0x28,%rsp
   0x00007ffff794a856 <avfilter_copy_buffer_ref_props+22>:      mov    0x80(%rsi),%rax
=> 0x00007ffff794a85d <avfilter_copy_buffer_ref_props+29>:      mov    %rax,0x80(%rdi)
   0x00007ffff794a864 <avfilter_copy_buffer_ref_props+36>:      mov    0x88(%rsi),%rax
   0x00007ffff794a86b <avfilter_copy_buffer_ref_props+43>:      mov    %rax,0x88(%rdi)
   0x00007ffff794a872 <avfilter_copy_buffer_ref_props+50>:      mov    0x98(%rsi),%eax
   0x00007ffff794a878 <avfilter_copy_buffer_ref_props+56>:      test   %eax,%eax
   0x00007ffff794a87a <avfilter_copy_buffer_ref_props+58>:      jne    0x7ffff794a910 <avfilter_copy_buffer_ref_props+208>
End of assembler dump.
(gdb)

Change History (5)

comment:1 Changed 6 years ago by cehoyos

  • Priority changed from normal to important

comment:2 Changed 6 years ago by cehoyos

I failed to reproduce this problem, but I unfortunately cannot test the identical options, for example my video4linux driver does not accept setting the frame rate.

Is this reproducible with current git head?

Is a feed and a stream required to reproduce the crash?
If a feed is required, is video4linux input required to reproduce the crash, or does it also crash with file input?
Is audio required to reproduce the crash or does it also crash with video-only?
Is libx264 required to reproduce the crash, or is it also reproducible with an internal encoder?

comment:3 Changed 5 years ago by burek

Same thing here :( I don't have a free machine to test this now. We'll have to wait until we get a new machine, which I can setup for testing, to be able to check this with the latest git version..

comment:4 Changed 5 years ago by michael

  • Keywords crash added

comment:5 Changed 5 years ago by michael

  • Resolution set to needs_more_info
  • Status changed from new to closed

The gdb output lacks line numbers. Also it seems noone succeeded reproducing this issue in 6 month and noone was willing to retest with latest git. Please reopen if any of the above change

Note: See TracTickets for help on using tickets.