Ticket #10616 (closed Bug Report - Crash: Fixed)
Opened 13 months ago
Last modified 11 months ago
mythtranscode segfaults if called with --fifoinfo
| Reported by: | furti@… | Owned by: | beirdo |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.26 |
| Component: | MythTV - Mythtranscode | Version: | 0.25-fixes |
| Severity: | medium | Keywords: | |
| Cc: | Ticket locked: | no |
Description (last modified by beirdo) (diff)
please find the full backtrace attached.
/opt/dvb/mythtv/mythtv# gdb -c /var/crash/core_mythtranscode.14020 -se `which mythtranscode` GNU gdb (Ubuntu/Linaro 7.3-0ubuntu2) 7.3-2011.08 Copyright (C) 2011 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://bugs.launchpad.net/gdb-linaro/>... Reading symbols from /usr/local/bin/mythtranscode...done. [New LWP 14020] [New LWP 14028] [New LWP 14033] [New LWP 14034] [New LWP 14031] [New LWP 14032] [New LWP 14022] [New LWP 14026] [New LWP 14021] warning: Can't read pathname for load map: Input/output error. [Thread debugging using libthread_db enabled] Core was generated by `mythtranscode --fifoinfo --profile autodetect --chanid 29724 --starttime 200812'. Program terminated with signal 11, Segmentation fault. #0 0x00007f0a7ae760aa in PlayerContext::StopPlaying (this=0x23d6a20) at playercontext.cpp:483 483 player->StopPlaying(); (gdb) /opt/dvb/mythtv/mythtv# mythtranscode --version Please attach all output as a file in bug reports. MythTV Version : v0.25-23-g00a2d87 MythTV Branch : fixes/0.25 Network Protocol : 72 Library API : 0.25.20120408-1 QT Version : 4.7.4 Options compiled in: linux debug use_hidesyms using_alsa using_oss using_pulse using_pulseoutput using_backend using_bindings_perl using_bindings_php using_dvb using_frontend using_hdhomerun using_ceton using_hdpvr using_iptv using_ivtv using_joystick_menu using_libcrypto using_lirc using_mheg using_opengl_video using_qtwebkit using_qtscript using_qtdbus using_v4l2 using_x11 using_xv using_bindings_perl using_bindings_php using_mythtranscode using_opengl using_vdpau using_ffmpeg_threads using_live using_mheg
Attachments
Change History
comment:3 Changed 13 months ago by furti@…
I tried to dig further, this prevents segfaulting ... a small next step
diff --git a/mythtv/programs/mythtranscode/main.cpp b/mythtv/programs/mythtranscode/main.cpp
index 8036dfd..2287d88 100644
--- a/mythtv/programs/mythtranscode/main.cpp
+++ b/mythtv/programs/mythtranscode/main.cpp
@@ -596,7 +596,7 @@ int main(int argc, char *argv[])
if (fifo_info)
{
- delete transcode;
+// delete transcode;
return GENERIC_EXIT_OK;
}
comment:4 Changed 13 months ago by beirdo
Turns out that we have far too many things freeing player_ctx in the code that runs before that. I could either put in "player_ctx = NULL;" after each delete, or do it the simpler way. I went for the simpler way.
comment:5 Changed 13 months ago by Gavin Hurlbut <ghurlbut@…>
- Status changed from assigned to closed
- Resolution set to fixed
comment:8 Changed 13 months ago by Gavin Hurlbut <ghurlbut@…>
comment:9 Changed 13 months ago by danielk
- Status changed from closed to new
- Resolution fixed deleted
Gavin, when I saw the QPointer<> fix I suspected there was a deeper problem here and there is. A PlayerContext? takes ownership of the MythPlayer? and input RingBuffer?, but we're keeping pointers to them in Transcode which become invalid as soon as the PlayerContext? is deleted. I've attached a patch which both manages the PlayerContext? pointer and makes sure we don't keep any pointers to delete MythPlayer? and RingBuffer? instances around.
I haven't tested this patch at all. If you would like me to take ownership of this ticket let me know, otherwise I'm pretty sure you can use this as is.
comment:10 Changed 11 months ago by beirdo
That does look workable. I'll look at incorporating it tonight.
comment:11 Changed 11 months ago by Daniel Kristjansson <danielk@…>
comment:12 Changed 11 months ago by beirdo
- Status changed from new to closed
- Resolution set to Fixed
- Milestone changed from 0.25.1 to 0.26
Having heard no follow-up problems with Daniel's rework, I'm closing this.
