Opened 14 years ago
Closed 14 years ago
Last modified 14 years ago
#9363 closed Bug Report (Fixed)
Startup command causes deadlock of Scheduler schedLock mutex
Reported by: | 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 14 years ago by
Status: | new → assigned |
---|
comment:2 Changed 14 years ago by
comment:3 Changed 14 years ago by
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 14 years ago by
Milestone: | unknown → 0.24.1 |
---|---|
Resolution: | → Fixed |
Status: | assigned → closed |
Fixed in SHA: 966ad7d9.
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.