Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#12213 closed Bug Report - General (fixed)

lossless transcode fails on master

Reported by: George Nassas <gnassas@…> Owned by: JYA
Priority: minor Milestone: 0.27.4
Component: MythTV - Mythtranscode Version: Unspecified
Severity: medium Keywords:
Cc: Ticket locked: no

Description

This started happening after the ffmpeg resyncs about a month ago. There were a lot of fixups around heap management so I held back hoping one of the would address the problem but still no luck.

I'm doing lossless transcode on OTA-captured ATSC mpeg2 videos which has worked reliably in the past. Now I get a:

#0  0x00007fffeac06545 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007fffeac097c0 in *__GI_abort () at abort.c:92
#2  0x00007fffeac415fb in __libc_message (do_abort=<optimized out>, fmt=<optimized out>) at ../sysdeps/unix/sysv/linux/libc_fatal.c:189
#3  0x00007fffeac4ae46 in malloc_printerr (action=3, str=0x7fffead2127d "corrupted double-linked list", ptr=<optimized out>) at malloc.c:6312
#4  0x00007fffeac4b2bd in malloc_consolidate (av=<optimized out>) at malloc.c:5198
#5  0x00007fffeac4c778 in _int_free (av=0x7fffeaf5ae80, p=0x32bf720) at malloc.c:5063
#6  0x00007fffeac4fbec in *__GI___libc_free (mem=<optimized out>) at malloc.c:3738
#7  0x00007ffff6132c80 in av_free (ptr=0x32bf760) at libavutil/mem.c:231
#8  0x00007ffff61235e1 in av_buffer_default_free (opaque=0x0, data=0x32bf760 "") at libavutil/buffer.c:62
#9  0x00007ffff6123b0e in buffer_pool_free (pool=0x20f3380) at libavutil/buffer.c:230
#10 0x00007ffff6123b8e in av_buffer_pool_uninit (ppool=0x78bd80) at libavutil/buffer.c:246
#11 0x00007ffff69be67a in avcodec_close (avctx=0x7a3aa0) at libavcodec/utils.c:2625
#12 0x0000000000430bbe in MPEG2fixup::BuildFrame (this=0x76c4f0, pkt=0x7fffffffc9b0, fname=...) at mpeg2fix.cpp:1250
#13 0x0000000000433a67 in MPEG2fixup::ConvertToI (this=0x76c4f0, orderedFrames=0x7fffffffce00, headPos=0) at mpeg2fix.cpp:1749
#14 0x0000000000438270 in MPEG2fixup::Start (this=0x76c4f0) at mpeg2fix.cpp:2234
#15 0x0000000000410a1e in main (argc=6, argv=0x7fffffffeb18) at main.cpp:676

or sometimes

#0  0x00007fffeac06545 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007fffeac097c0 in *__GI_abort () at abort.c:92
#2  0x00007fffeac415fb in __libc_message (do_abort=<optimized out>, fmt=<optimized out>) at ../sysdeps/unix/sysv/linux/libc_fatal.c:189
#3  0x00007fffeac4ae46 in malloc_printerr (action=3, str=0x7fffead2127d "corrupted double-linked list", ptr=<optimized out>) at malloc.c:6312
#4  0x00007fffeac4b2bd in malloc_consolidate (av=<optimized out>) at malloc.c:5198
#5  0x00007fffeac4c778 in _int_free (av=0x7fffeaf5ae80, p=0x32bf720) at malloc.c:5063
#6  0x00007fffeac4fbec in *__GI___libc_free (mem=<optimized out>) at malloc.c:3738
#7  0x00007ffff6132c80 in av_free (ptr=0x32bf760) at libavutil/mem.c:231
#8  0x00007ffff61235e1 in av_buffer_default_free (opaque=0x0, data=0x32bf760 "") at libavutil/buffer.c:62
#9  0x00007ffff6123b0e in buffer_pool_free (pool=0x20f3380) at libavutil/buffer.c:230
#10 0x00007ffff6123b8e in av_buffer_pool_uninit (ppool=0x78bd80) at libavutil/buffer.c:246
#11 0x00007ffff69be67a in avcodec_close (avctx=0x7a3aa0) at libavcodec/utils.c:2625
#12 0x0000000000430bbe in MPEG2fixup::BuildFrame (this=0x76c4f0, pkt=0x7fffffffc9b0, fname=...) at mpeg2fix.cpp:1250
#13 0x0000000000433a67 in MPEG2fixup::ConvertToI (this=0x76c4f0, orderedFrames=0x7fffffffce00, headPos=0) at mpeg2fix.cpp:1749
#14 0x0000000000438270 in MPEG2fixup::Start (this=0x76c4f0) at mpeg2fix.cpp:2234
#15 0x0000000000410a1e in main (argc=6, argv=0x7fffffffeb18) at main.cpp:676

Commenting out the offending lines just moves the problem somewhere else so I assume the heap has gotten corrupted earlier in the process and the crash just exposes that fact.

Happy to get in with gdb and figure this out but I'd need pointers on what to look for.

Change History (5)

comment:1 Changed 10 years ago by JYA

Status: newinfoneeded_new

does it do so with all your videos or only some? can it be consistently be reproduced with a particular file?

if so please provide a sample

comment:2 Changed 10 years ago by Jean-Yves Avenard <jyavenard@…>

Resolution: fixed
Status: infoneeded_newclosed

In b04e14b6a919578865a8771a64e8fadfd08f3fb0/mythtv:

mythtranscode: fix incorrect memory allocation

Fixes #12213

comment:3 Changed 10 years ago by Jean-Yves Avenard <jyavenard@…>

In 09ed2c69354f6870667880aee16257b9600b01d8/mythtv:

mythtranscode: fix incorrect memory allocation

Use proper FFmpeg API to allocate AVPacket
Fixes #12213

comment:4 Changed 10 years ago by Jean-Yves Avenard <jyavenard@…>

In 4630430b110dc173963c53d2bc0e7d15e6115d3e/mythtv:

mythtranscode: fix incorrect memory allocation

Use proper FFmpeg API to allocate AVPacket
Fixes #12213

(cherry picked from commit 09ed2c69354f6870667880aee16257b9600b01d8)

comment:5 Changed 9 years ago by paulh

Milestone: unknown0.27.4
Note: See TracTickets for help on using tickets.