Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Commits

Ticket #10616: mythtranscode segfaults if called with --fifoinfo

 

 

MythTV commits RSS feed   Index | Next | Previous | View Threaded


noreply at mythtv

Apr 16, 2012, 1:20 PM

Post #1 of 13 (276 views)
Permalink
Ticket #10616: mythtranscode segfaults if called with --fifoinfo

#10616: mythtranscode segfaults if called with --fifoinfo
------------------------+----------------------------------------
Reporter: furti@… | Type: Bug Report - Crash
Status: new | Priority: minor
Milestone: unknown | Component: MythTV - Mythtranscode
Version: 0.25-fixes | Severity: medium
Keywords: | Ticket locked: 0
------------------------+----------------------------------------
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

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10616>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Apr 16, 2012, 1:25 PM

Post #2 of 13 (269 views)
Permalink
Re: Ticket #10616: mythtranscode segfaults if called with --fifoinfo [In reply to]

#10616: mythtranscode segfaults if called with --fifoinfo
------------------------------------+----------------------------
Reporter: furti@… | Owner: beirdo
Type: Bug Report - Crash | Status: assigned
Priority: minor | Milestone: unknown
Component: MythTV - Mythtranscode | Version: 0.25-fixes
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
------------------------------------+----------------------------
Changes (by beirdo):

* owner: => beirdo
* status: new => assigned


--
Ticket URL: <http://code.mythtv.org/trac/ticket/10616#comment:1>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Apr 16, 2012, 1:26 PM

Post #3 of 13 (284 views)
Permalink
Re: Ticket #10616: mythtranscode segfaults if called with --fifoinfo [In reply to]

#10616: mythtranscode segfaults if called with --fifoinfo
------------------------------------+----------------------------
Reporter: furti@… | Owner: beirdo
Type: Bug Report - Crash | Status: assigned
Priority: minor | Milestone: unknown
Component: MythTV - Mythtranscode | Version: 0.25-fixes
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
------------------------------------+----------------------------
Description changed by beirdo:

Old description:

> 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

New description:

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
}}}

--

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10616#comment:2>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Apr 16, 2012, 2:44 PM

Post #4 of 13 (265 views)
Permalink
Re: Ticket #10616: mythtranscode segfaults if called with --fifoinfo [In reply to]

#10616: mythtranscode segfaults if called with --fifoinfo
------------------------------------+----------------------------
Reporter: furti@… | Owner: beirdo
Type: Bug Report - Crash | Status: assigned
Priority: minor | Milestone: unknown
Component: MythTV - Mythtranscode | Version: 0.25-fixes
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
------------------------------------+----------------------------

Comment (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;
}
}}}

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10616#comment:3>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Apr 17, 2012, 6:48 PM

Post #5 of 13 (261 views)
Permalink
Re: Ticket #10616: mythtranscode segfaults if called with --fifoinfo [In reply to]

#10616: mythtranscode segfaults if called with --fifoinfo
------------------------------------+----------------------------
Reporter: furti@… | Owner: beirdo
Type: Bug Report - Crash | Status: assigned
Priority: minor | Milestone: unknown
Component: MythTV - Mythtranscode | Version: 0.25-fixes
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
------------------------------------+----------------------------

Comment (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.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10616#comment:4>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Apr 17, 2012, 6:51 PM

Post #6 of 13 (260 views)
Permalink
Re: Ticket #10616: mythtranscode segfaults if called with --fifoinfo [In reply to]

#10616: mythtranscode segfaults if called with --fifoinfo
------------------------------------+----------------------------
Reporter: furti@… | Owner: beirdo
Type: Bug Report - Crash | Status: closed
Priority: minor | Milestone: unknown
Component: MythTV - Mythtranscode | Version: 0.25-fixes
Severity: medium | Resolution: fixed
Keywords: | Ticket locked: 0
------------------------------------+----------------------------
Changes (by Gavin Hurlbut <ghurlbut@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:c5a9262355a51b2d2b0465234d79b527c3907e84/mythtv]:
{{{
#!CommitTicketReference repository="mythtv"
revision="c5a9262355a51b2d2b0465234d79b527c3907e84"
Convert the use of player_ctx in mythtranscode to QPointer<>

We have far too many places in the transcode code path that delete
player_ctx
and return. Unfortunately, freeing "transcode" also will try to delee
player_ctx, but it's already deleted, and not nulled out. Rather than
putting
many instances of "player_ctx = NULL", I opted to make PlayerContext a
QObject, and then just use QPointer<PlayerContext> as this will clear
itself
to NULL as soon as it is destroyed.

Fixes #10616
}}}

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10616#comment:5>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Apr 17, 2012, 7:20 PM

Post #7 of 13 (262 views)
Permalink
Re: Ticket #10616: mythtranscode segfaults if called with --fifoinfo [In reply to]

#10616: mythtranscode segfaults if called with --fifoinfo
------------------------------------+----------------------------
Reporter: furti@… | Owner: beirdo
Type: Bug Report - Crash | Status: closed
Priority: minor | Milestone: 0.26
Component: MythTV - Mythtranscode | Version: 0.25-fixes
Severity: medium | Resolution: fixed
Keywords: | Ticket locked: 0
------------------------------------+----------------------------
Changes (by beirdo):

* milestone: unknown => 0.26


--
Ticket URL: <http://code.mythtv.org/trac/ticket/10616#comment:6>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Apr 17, 2012, 7:20 PM

Post #8 of 13 (258 views)
Permalink
Re: Ticket #10616: mythtranscode segfaults if called with --fifoinfo [In reply to]

#10616: mythtranscode segfaults if called with --fifoinfo
------------------------------------+----------------------------
Reporter: furti@… | Owner: beirdo
Type: Bug Report - Crash | Status: closed
Priority: minor | Milestone: 0.25.1
Component: MythTV - Mythtranscode | Version: 0.25-fixes
Severity: medium | Resolution: fixed
Keywords: | Ticket locked: 0
------------------------------------+----------------------------
Changes (by beirdo):

* milestone: 0.26 => 0.25.1


--
Ticket URL: <http://code.mythtv.org/trac/ticket/10616#comment:7>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Apr 17, 2012, 7:21 PM

Post #9 of 13 (260 views)
Permalink
Re: Ticket #10616: mythtranscode segfaults if called with --fifoinfo [In reply to]

#10616: mythtranscode segfaults if called with --fifoinfo
------------------------------------+----------------------------
Reporter: furti@… | Owner: beirdo
Type: Bug Report - Crash | Status: closed
Priority: minor | Milestone: 0.25.1
Component: MythTV - Mythtranscode | Version: 0.25-fixes
Severity: medium | Resolution: fixed
Keywords: | Ticket locked: 0
------------------------------------+----------------------------

Comment (by Gavin Hurlbut <ghurlbut@…>):

In [changeset:9cb904e9b9998ea94eadba4db54c0af10dc893f0/mythtv]:
{{{
#!CommitTicketReference repository="mythtv"
revision="9cb904e9b9998ea94eadba4db54c0af10dc893f0"
Convert the use of player_ctx in mythtranscode to QPointer<>

We have far too many places in the transcode code path that delete
player_ctx
and return. Unfortunately, freeing "transcode" also will try to delee
player_ctx, but it's already deleted, and not nulled out. Rather than
putting
many instances of "player_ctx = NULL", I opted to make PlayerContext a
QObject, and then just use QPointer<PlayerContext> as this will clear
itself
to NULL as soon as it is destroyed.

Fixes #10616
(cherry picked from commit c5a9262355a51b2d2b0465234d79b527c3907e84)
}}}

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10616#comment:8>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Apr 25, 2012, 12:16 PM

Post #10 of 13 (241 views)
Permalink
Re: Ticket #10616: mythtranscode segfaults if called with --fifoinfo [In reply to]

#10616: mythtranscode segfaults if called with --fifoinfo
------------------------------------+----------------------------
Reporter: furti@… | Owner: beirdo
Type: Bug Report - Crash | Status: new
Priority: minor | Milestone: 0.25.1
Component: MythTV - Mythtranscode | Version: 0.25-fixes
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
------------------------------------+----------------------------
Changes (by danielk):

* status: closed => new
* resolution: fixed =>


Comment:

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.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10616#comment:9>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Jun 13, 2012, 5:01 PM

Post #11 of 13 (190 views)
Permalink
Re: Ticket #10616: mythtranscode segfaults if called with --fifoinfo [In reply to]

#10616: mythtranscode segfaults if called with --fifoinfo
------------------------------------+----------------------------
Reporter: furti@… | Owner: beirdo
Type: Bug Report - Crash | Status: new
Priority: minor | Milestone: 0.25.1
Component: MythTV - Mythtranscode | Version: 0.25-fixes
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
------------------------------------+----------------------------

Comment (by beirdo):

That does look workable. I'll look at incorporating it tonight.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10616#comment:10>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Jun 14, 2012, 11:37 AM

Post #12 of 13 (185 views)
Permalink
Re: Ticket #10616: mythtranscode segfaults if called with --fifoinfo [In reply to]

#10616: mythtranscode segfaults if called with --fifoinfo
------------------------------------+----------------------------
Reporter: furti@… | Owner: beirdo
Type: Bug Report - Crash | Status: new
Priority: minor | Milestone: 0.25.1
Component: MythTV - Mythtranscode | Version: 0.25-fixes
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
------------------------------------+----------------------------

Comment (by Daniel Kristjansson <danielk@…>):

In [changeset:4a3581db9acf059142143426caf46e91cbe96153/mythtv]:
{{{
#!CommitTicketReference repository="mythtv"
revision="4a3581db9acf059142143426caf46e91cbe96153"
Rework ownership of RingBuffer and MythPlayer in transcode

Refs #10616

Signed-off-by: Gavin Hurlbut <ghurlbut [at] mythtv>
}}}

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10616#comment:11>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits


noreply at mythtv

Jul 4, 2012, 9:47 PM

Post #13 of 13 (146 views)
Permalink
Re: Ticket #10616: mythtranscode segfaults if called with --fifoinfo [In reply to]

#10616: mythtranscode segfaults if called with --fifoinfo
------------------------------------+----------------------------
Reporter: furti@… | Owner: beirdo
Type: Bug Report - Crash | Status: closed
Priority: minor | Milestone: 0.26
Component: MythTV - Mythtranscode | Version: 0.25-fixes
Severity: medium | Resolution: Fixed
Keywords: | Ticket locked: 0
------------------------------------+----------------------------
Changes (by beirdo):

* status: new => closed
* resolution: => Fixed
* milestone: 0.25.1 => 0.26


Comment:

Having heard no follow-up problems with Daniel's rework, I'm closing this.

--
Ticket URL: <http://code.mythtv.org/trac/ticket/10616#comment:12>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
_______________________________________________
mythtv-commits mailing list
mythtv-commits [at] mythtv
http://www.mythtv.org/mailman/listinfo/mythtv-commits

MythTV commits RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.