Opened 7 years ago

Closed 5 years ago

#11323 closed Bug Report - Hang/Deadlock (Fixed)

Deadlock in mythfrontend if LiveTV recording is zero length

Reported by: Chris Elston <cdelston@…> Owned by:
Priority: minor Milestone: unknown
Component: MythTV - General Version: 0.26-fixes
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Issue seen on 0.26.0 and also confirmed on 0.26-fixes at git rev 28846f87db59efa28ce20c9309089a49520227bb

I suspect I have an issue on my backend which is causing zero length LiveTV buffers, in turn this causes mythfrontend to deadlock on returning to the EPG. I'm ignoring the backend issue for now, and this ticket concerns the frontend deadlock only.

Looking at the end of the attached log, the endless "(SetDecoder?) Player(1): Waited 10ms for decoder lock" messages from Thread 1 suggest that it's spinning trying to acquire decoder_change_lock in MythPlayer::SetDecoder?

From the attached backtrace I think that decoder_change_lock is being held by Thread 5 which has passed through MythPlayer::DecoderGetFrame?.

I believe that thread 1 is holding osdLock, vidExitLock, and videofiltersLock (since it's executing the MythPlayer::~MythPlayer? destructor) but Thread 5 is waiting for these same locks to complete the ReinitVideo? call.

Unfortunately I don't really grok this enough to produce a patch.

Attachments (3)

mythfrontend_hang_backtrace.txt (78.8 KB) - added by Chris Elston <cdelston@…> 7 years ago.
Compressed log showing mythfrontend deadlock.
mythfrontend_hang.log.gz (154.0 KB) - added by Chris Elston <cdelston@…> 7 years ago.
mythfrontend_hang_backtrace.2.txt (78.8 KB) - added by Chris Elston <cdelston@…> 7 years ago.

Download all attachments as: .zip

Change History (5)

Changed 7 years ago by Chris Elston <cdelston@…>

Compressed log showing mythfrontend deadlock.

Changed 7 years ago by Chris Elston <cdelston@…>

Attachment: mythfrontend_hang.log.gz added

Changed 7 years ago by Chris Elston <cdelston@…>

comment:1 Changed 5 years ago by JYA

it actually only hang for about 16s

the issue is fixed in master

it was fixed in 0.27.2, but this caused issue with xbmc client so was reverted

comment:2 Changed 5 years ago by JYA

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