Modify
Warning Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.

Opened 5 years ago

Closed 5 years ago

#4734 closed defect (duplicate)

MythTV gets stuck tuning going from IVTV -> DVB

Reported by: Mark Buechler <Mark.Buechler@…> Owned by: ijr
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@…> 5 years ago.
Backend log
backend.log (13.2 KB) - added by Mark Buechler <Mark.Buechler@…> 5 years ago.
Backend log
frontend.log (33.9 KB) - added by Mark Buechler <Mark.Buechler@…> 5 years ago.
Frontend log
TFW_chk_no_writes.diff (432 bytes) - added by Shane Shrybman <gnome42@…> 5 years ago.
bt.txt (222.7 KB) - added by Mark Buechler <Mark.Buechler@…> 5 years ago.
Several backtraces..

Download all attachments as: .zip

Change History (12)

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

Backend log

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

Backend log

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

Frontend log

comment:1 Changed 5 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 5 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 5 years ago by Shane Shrybman <gnome42@…>

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

Several backtraces..

comment:3 Changed 5 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 5 years ago by laga

Mark,

did you ever get around to looking into this?

comment:5 Changed 5 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 5 years ago by gnome42

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 5 years ago by Dibblah

  • Resolution set to duplicate
  • Status changed from new to closed

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.