Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#9747 closed Bug Report - Crash (fixed)

Segfault in libavformat in trunk

Reported by: David Johnson <dj@…> Owned by: beirdo
Priority: minor Milestone: 0.25
Component: MythTV - Video Playback Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Running MythTV from GIT (commit 6d8542f612abac2fa2ad) I'm getting segfaults in mythfrontend when trying to playback recordings and watch live TV. A few channels (and recordings from them) don't cause the segfault, but most do.

Mythpreviewgen is experiencing the same segfault on my backend.

I'm running clean builds. I attach a backtrace (and configure output, since I enable proc-opt).

I thought this might be related to the ffmpeg merge but the issue remained when I reverted to a prior commit.

Attachments (4)

gdb.txt (67.6 KB) - added by David Johnson <dj@…> 9 years ago.
Backtrace
configure.txt (1.7 KB) - added by David Johnson <dj@…> 9 years ago.
Configure output
frontend-log.txt (15.0 KB) - added by David Johnson <dj@…> 9 years ago.
Frontend log
backend-log.txt (1.5 KB) - added by David Johnson <dj@…> 9 years ago.
Backend log during client connect & crash

Download all attachments as: .zip

Change History (8)

Changed 9 years ago by David Johnson <dj@…>

Attachment: gdb.txt added

Backtrace

Changed 9 years ago by David Johnson <dj@…>

Attachment: configure.txt added

Configure output

comment:1 Changed 9 years ago by beirdo

Owner: changed from Janne Grunau to beirdo
Status: newassigned

Please add backend and frontend logs for this crash as well.

Changed 9 years ago by David Johnson <dj@…>

Attachment: frontend-log.txt added

Frontend log

Changed 9 years ago by David Johnson <dj@…>

Attachment: backend-log.txt added

Backend log during client connect & crash

comment:2 Changed 9 years ago by beirdo

Does your video include an MHEG stream? If so, could you possibly cut out a 100MB section from the beginning of one that causes the crash so I can test possible fixes here? I think I have a fix ready, but would like to test it before posting it.

If not, I can attach the patch here and you could try it.

Thanks.

comment:3 Changed 9 years ago by Github

Milestone: unknown0.25
Resolution: fixed
Status: assignedclosed

Fix MHEG-related crash post ffmpeg-sync

Two changes in here:

One: don't try to dereference ->info if it is NULL

Two: use av_new_stream instead of av_add_stream. The contents are nearly identical, but the former actually allocates the ->info.

I don't think the ->info part is actually used by MHEG itself, but enough of the generic code for mpeg2ts seems to use it that this seemed to be the best way to fix this crash.

Fixes #9747

Changeset: cec7c2bbd7702eb40f30fe0deb308a80af50f0bc

(edited formatting only)

Last edited 9 years ago by beirdo (previous) (diff)

comment:4 Changed 9 years ago by David Johnson <dj@…>

Can confirm that this has fixed the issue, many thanks.

Note: See TracTickets for help on using tickets.