Opened 13 years ago
Closed 13 years ago
#10264 closed Bug Report - Hang/Deadlock (fixed)
deadlock in backend
Reported by: | Owned by: | danielk | |
---|---|---|---|
Priority: | major | Milestone: | 0.25 |
Component: | MythTV - General | Version: | Master Head |
Severity: | high | Keywords: | |
Cc: | Ticket locked: | no |
Description
I seem to have discovered a new deadlock in master (v0.25pre-3930-g074d3e2). I will attach two stack traces of the backend while deadlocked. The symptoms are that clients cannot seem to get information from the backend. A mythtv client spins for a while and then shows no recordings at all. A mythweb client reports:
Warning at /usr/share/mythtv/mythweb/modules/tv/upcoming.php, line 91: !!NoTrans: Invalid argument supplied for foreach()!!
Attachments (3)
Change History (6)
Changed 13 years ago by
Attachment: | ThreadStacktrace.txt.old added |
---|
comment:1 Changed 13 years ago by
Milestone: | unknown → 0.25 |
---|---|
Owner: | set to danielk |
Priority: | minor → major |
Severity: | medium → high |
Status: | new → assigned |
Looking at ThreadStacktrace?.txt I see:
Threads 13,12,11,10,9,8,7,6 are all waiting for the schedLock in Scheduler::GetAllPending?() Threads 5,3 are both waiting for the schedLock in Scheduler::GetRecording?() Thread 26 is holding the schedLock and blocking on TVRec::StartRecording?()
I suspect what is holding up the TVRec::StartRecording?() is the RecorderBase::GetRecordingQuality?() call in Thread 39.
comment:2 Changed 13 years ago by
I've attached a patch. It looks like I made a copy-n-paste error, but if someone could do a quick code review I'd appreciate it.
comment:3 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixes #10264. Removes infinite loop.
There were two copy-n-paste errors, one on the bounds check and we were also deleting elements from the wrong end of the deque. The bounds check caused the infinite loop under certain starting conditions.
Branch: master Changeset: 6b227f42bbd03e351a757d2077bcc3f40116b5c6
stack trace of deadlocked threads