[mythtv-firehose] mythtv/master commit: a26612976 by Gavin Hurlbut (Beirdo)
noreply at mythtv.org
Thu Oct 13 07:19:26 UTC 2011
Author: Gavin Hurlbut <ghurlbut at mythtv.org>
Change Date: 2011-10-13T00:18:58-07:00
Push Date: 2011/10/13 00:19:10 -0700
New Revision: a266129767a624dc6e15014ee5f7996d5ff33c7e
Unlock the db queue mutex during InitCon in the startup
If the program is exiting quickly (before the database is ready), the db queue
is still locked, and then the messages bypass the queue. When it goes to
initialize the database connection, the code in mythdbcon logs a message, which
then tries to acquire the lock again, causing a deadlock.
To get around that, unlock the mutex around the call to InitCon(). I think it
would be better to re-re-think the waiting code so it's not using that mutex
so the mutex can get locked only after the connection is ready, removing this
and the previous unlock/relock.
Refs #10032. Hopefully this will fix the deadlocks.
More information about the mythtv-firehose