Ticket #9363 (closed Bug Report: Fixed)
Opened 2 years ago
Last modified 2 years ago
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.
Attachments
Change History
comment:2 Changed 2 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 2 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 2 years ago by gigem
- Status changed from assigned to closed
- Resolution set to Fixed
- Milestone changed from unknown to 0.24.1
Fixed in SHA: 966ad7d9.
comment:5 Changed 2 years ago by beirdo
My apologies, I misread.
