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 2 years ago

Closed 22 months ago

Last modified 22 months ago

#10647 closed Bug Report - Hang/Deadlock (fixed)

Scheduler deadlock during Live TV

Reported by: stichnot Owned by: gigem
Priority: minor Milestone: 0.25.2
Component: MythTV - Scheduling Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

While watching live TV, got the popup indicating that the backend wanted the tuner for a scheduled recording. I clicked "OK" to let the scheduled program record. This resulted in an apparent deadlock in the scheduler code. (To be precise, the scheduler wanted a different tuner but in the same input group as the Live TV tuner.) The deadlock manifested itself as mythfrontend and mythweb connection attempts hanging.

I attached gdb to the mythbackend process and got a stack trace.

Also including some backend logs with "-v most --loglevel debug". To make the size manageable, I filtered out lines containing "TFW" or "JobQueue?", and I removed lines prior to 1 minute before the recording. (But I kept the first 100 lines to show version and startup information.)

Attachments (2)

livetv_bt.txt (73.4 KB) - added by stichnot 2 years ago.
mythbackend.log.gz (341.8 KB) - added by stichnot 2 years ago.

Download all attachments as: .zip

Change History (7)

Changed 2 years ago by stichnot

Changed 2 years ago by stichnot

comment:1 Changed 22 months ago by stuartm

Can you test the following patch? http://pastebin.ca/2162527

comment:2 Changed 22 months ago by David Engel <dengel@…>

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

In ca273324961b95e300890ed40e833249b5460bd8/mythtv:

Hopefully remove more scheduler/recorder deadlocks.

Change the scheduler to unlock schedLock when calling the recorder
synchronously. If the recorder happens to be calling the scheduler at
the same time, this allows the recorder's call to grab the lock as
needed.

Fixes #10647, #10770 and #10771 .

comment:3 Changed 22 months ago by gigem

  • Milestone changed from unknown to 0.26

comment:4 Changed 22 months ago by David Engel <dengel@…>

In 4386e90e25ed40948bb208e8a325a8b072411e88/mythtv:

Hopefully remove more scheduler/recorder deadlocks.

Change the scheduler to unlock schedLock when calling the recorder
synchronously. If the recorder happens to be calling the scheduler at
the same time, this allows the recorder's call to grab the lock as
needed.

Refs #10647, #10770 and #10771 .
(cherry picked from commit ca273324961b95e300890ed40e833249b5460bd8)

Conflicts:

mythtv/programs/mythbackend/scheduler.cpp

comment:5 Changed 22 months ago by kenni

  • Milestone changed from 0.26 to 0.25.2

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.