Opened 9 years ago

Closed 9 years ago

#9656 closed Bug Report - General (fixed)

Mythbackend hangs on futex

Reported by: km@… Owned by: beirdo
Priority: minor Milestone: 0.25
Component: MythTV - General Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

I'm running the trunk, most lately v0.25pre-1388-g3513758. About a week ago mythbackend began to hang a few hours after starting.

strace shows

futex(0x849008c, FUTEX_WAIT_PRIVATE, 4, NULL)

where it waits forever. The log shows nothing relevant.

Any suggestions on how to trace what the futex is protecting or waiting for?

Attachments (2)

gdb.txt (81.5 KB) - added by km@… 9 years ago.
gdb output
myth.log (199.6 KB) - added by km@… 9 years ago.
myth log

Download all attachments as: .zip

Change History (6)

comment:1 Changed 9 years ago by beirdo

Version: UnspecifiedTrunk Head

To do any debugging on this, we will need a full backtrace of all running threads from gdb. Also, we will need to see the logs around where this hangs. There are far too many threads to blindly find any deadlocks, sorry.

Changed 9 years ago by km@…

Attachment: gdb.txt added

gdb output

Changed 9 years ago by km@…

Attachment: myth.log added

myth log

comment:2 Changed 9 years ago by km@…

I've attached the gdb output including backtrace and the log of the whole myth session. The backend hung before the mythcommflag you will see in the log completed. I don't know how much earlier. I waited for the comm flag to finish before inducing the backend backtrace.

comment:3 Changed 9 years ago by beirdo

Owner: set to beirdo
Status: newassigned

comment:4 Changed 9 years ago by Gavin Hurlbut

Milestone: unknown0.25
Resolution: fixed
Status: assignedclosed

Fix deadlock in Linux firewire threads.

Fixes #9656

The deadlock was caused by a shared synchronization lock which was being held by the main thread while waiting for the child thread to die, but the child thread also uses that lock. I put back in the lock looping code that seemed unnecessary, but obviously was.

Changeset: b402a5460a3b8a90251c44c3f1fa6616a698bb3b

Note: See TracTickets for help on using tickets.