Opened 12 years ago

Closed 11 years ago

#4734 closed defect (duplicate)

MythTV gets stuck tuning going from IVTV -> DVB

Reported by: Mark Buechler <Mark.Buechler@…> Owned by: Isaac Richards
Priority: minor Milestone: unknown
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

MythTV gets stuck when changing from an IVTV channel to a DVB channel. The frontend times out on socket communications and will not work until the backend is kicked.

Backtrace, frontend and backend logs attached. The backtrace log has a couple backtraces in it as well as some stepping.

Attachments (5)

bt.log (99.4 KB) - added by Mark Buechler <Mark.Buechler@…> 12 years ago.
Backend log
backend.log (13.2 KB) - added by Mark Buechler <Mark.Buechler@…> 12 years ago.
Backend log
frontend.log (33.9 KB) - added by Mark Buechler <Mark.Buechler@…> 12 years ago.
Frontend log
TFW_chk_no_writes.diff (432 bytes) - added by Shane Shrybman <gnome42@…> 12 years ago.
bt.txt (222.7 KB) - added by Mark Buechler <Mark.Buechler@…> 12 years ago.
Several backtraces..

Download all attachments as: .zip

Change History (12)

Changed 12 years ago by Mark Buechler <Mark.Buechler@…>

Attachment: bt.log added

Backend log

Changed 12 years ago by Mark Buechler <Mark.Buechler@…>

Attachment: backend.log added

Backend log

Changed 12 years ago by Mark Buechler <Mark.Buechler@…>

Attachment: frontend.log added

Frontend log

comment:1 Changed 12 years ago by Mark Buechler <Mark.Buechler@…>

I believe thread 8 is the culprit here. It looks to be spinning on ThreadedFileWriter::Write() on "while (count > BufFree?())"

Could tearing down the RingBuffer? cause a scenario where count will always be > BufFree?()?

  • Mark.

comment:2 Changed 12 years ago by Shane Shrybman <gnome42@…>

Hi Mark,

I can't reproduce the problem and I haven't analyzed the actual cause of this too closely but it doesn't seem inconceivable that you could get stuck in that loop.

Patch attached to safeguard against that.

Changed 12 years ago by Shane Shrybman <gnome42@…>

Attachment: TFW_chk_no_writes.diff added

Changed 12 years ago by Mark Buechler <Mark.Buechler@…>

Attachment: bt.txt added

Several backtraces..

comment:3 Changed 12 years ago by Mark Buechler <Mark.Buechler@…>

It seems there's a few things going on here. Attached a log of several backtraces. I'll analyze it tomorrow when I'm more awake.

  • Mark.

comment:4 Changed 11 years ago by laga

Mark,

did you ever get around to looking into this?

comment:5 Changed 11 years ago by Mark Buechler <Mark.Buechler@…>

Yes, I believe it's due to reclist_lock getting locked in the scheduler and never getting released. In trying to narrow it down, I added a bunch of debug printf's, but they changing the timing of events ever so slightly as to nearly prevent the issue altogether.

  • Mark.

comment:6 Changed 11 years ago by Shane Shrybman

From the bt of thread 8

RingBuffer::Write (this=0xa715b058, buf=0xa205e008, count=2211632) at RingBuffer?.cpp:1182

ThreadedFileWriter::TFW_DEF_BUF_SIZE = 2*1024*1024 => 2097152

2211632 > 2097152 so the (count > BufFree?()) condition will never clear.

This is a duplicate of #5591 fixed in trunk by [18105]

comment:7 Changed 11 years ago by Dibblah

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.