Opened 18 months ago

Last modified 18 months ago

#13156 new Bug Report - Hang/Deadlock

radio channels: mythfrontend hang (endless loop) when exiting 'LiveTV' and delays on switching channels

Reported by: Stephan Suerken <absurd@…> Owned by:
Priority: minor Milestone: needs_triage
Component: MythTV - General Version: v29-fixes
Severity: medium Keywords: radio audio dvb-s
Cc: Ticket locked: no

Description

Hi!

When entering 'LiveTV' on a preselected (DVB-S) audio-only channel, exiting 'LiveTV' consistently ends in an endless loop, hanging mythfrontend.

Note that when entering 'LiveTV' and then switching the channel to some audio-only channel, exiting 'LiveTV' suprisingly will work. I however always notice a huge delay (~10s) when switching from an audio-only to some other channel.

For the switching delay, the relevant code is in a loop in MythPlayer::PauseDecoder() and MythPlayer::UnpauseDecoder(); this has a 'max tries protector', so this eventually works.

For the hang, the relevant code is in a loop in MythPlayer::SetDecoder(); this one has no 'max tries protector', so it hangs mythfrontend (audio is happily playing on).

So afaiu, maybe PauseDecoder() can't actually pause (but this is ignored after some delay), and then later SetDecoder() can't get a lock, and that is not ignored (?).

Fwiw1, this is how I can reproduce this, always, on 29-fixes (ed4356116a), several frontend installations, various hardware (backend using DVB-S/Astra):

  1. start mythfrontend, enter 'LiveTV'.
  2. Switch to an audio-only (radio) channel.
  3. Leave and re-enter 'LiveTV' (will now play that preselected radio channel).
  4. Leave 'LiveTV' (Esc) => HANG. mythfrontend can only be killed to fix this.

Fwiw2, on hang, the log repeated forever is

2017-10-18 15:51:42.714971 I  Player(0): Waited 10ms for decoder lock

and strace shows the attempts on locking forever

futex(0x557461a1ec38, FUTEX_WAIT_PRIVATE, 3, {tv_sec=0, tv_nsec=10000000}) = -1 ETIMEDOUT (Connection timed out)

Fwiw3 ;), this not a new problem, I remember having similar problems at least with 0.28.

Thx!

S

Change History (1)

comment:1 Changed 18 months ago by Stephan Suerken <absurd@…>

Hi,

some additional notes:

  • In the mean time, I have updated to 29-fixes (83b32140f0) -- no changes.
  • The "hang" is actually not necessarily forever - at least on one occasion, it took ~30 Minutes until it finally got a lock and exited to the menu.
  • A workaround is to pause ("p") first, then exit ("ESC").

I really hope someone can produce this too, and shed some light on it ;).

Thx!

S

Note: See TracTickets for help on using tickets.