Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#9363 closed Bug Report (Fixed)

Startup command causes deadlock of Scheduler schedLock mutex

Reported by: Andy@… Owned by: gigem
Priority: minor Milestone: 0.24.1
Component: MythTV - Scheduling Version: 0.24
Severity: high Keywords:
Cc: Ticket locked: no

Description

I have a startupCommand script that reads the mythweb status web page to get some information. The thread running mythweb attempts to grab the schedLock mutex in Scheduler::getAllPending, this is already being held by the thread running RunScheduler?() where the startup command is called.

The solution may be to release the schedLock mutex while calling myth_system(startupCommand)

Also this has happened when calling the shutdown script as well. I have got around the problem by removing the mythweb reads in the scripts.

Change History (5)

comment:1 Changed 7 years ago by gigem

Status: newassigned

comment:2 Changed 7 years ago by beirdo

The proposed mutex playing in myth_system is not acceptable as it would potentially adversely affect FAR too much of the system. My suggestion would be just to not do that, but we'll see if gigem has a better idea there.

comment:3 Changed 7 years ago by gigem

There won't be any mutex playing within myth_system. The mutex unlocking and locking goes around the call to myth_system. I don't see a problem with this as long as the code handles the unlikely case that another thread acquired the mutex and changed something while myth_system was running. I already have a patch to do this for the startup command. I still need to look at the shutdown command.

comment:4 Changed 7 years ago by gigem

Milestone: unknown0.24.1
Resolution: Fixed
Status: assignedclosed

Fixed in SHA: 966ad7d9.

comment:5 Changed 7 years ago by beirdo

My apologies, I misread.

Note: See TracTickets for help on using tickets.