Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#8606 closed defect (invalid)

Backend deadlocked after database error when updating program listings from EIT

Reported by: malcolm.parsons@… Owned by: Isaac Richards
Priority: minor Milestone: unknown
Component: MythTV - General Version: 0.23-fixes
Severity: high Keywords:
Cc: Ticket locked: no

Description

I'm using MythTV 0.23.0+fixes25119-0ubuntu0+mythbuntu2

I've been seeing random backend deadlocks, where the frontend lists no recorded programmes, the backend doesn't record anything, and the "Upcoming Recordings" and "Backend Status" pages in MythWeb don't load.

Looking at the logs, there is a database error in the hour before the deadlock is noticed:

2010-06-25 12:55:04.036 DB Error (change_program): Query was: UPDATE program SET starttime = ?, endtime = ? WHERE chanid = ? AND starttime = ? Bindings were: :CHANID=3003, :NEWEND=2010-06-29T02:45:00, :NEWSTART=2010-06-29T01:08:00, :OLDSTART=2010-06-29T00:35:00 Driver error was [2/1062]: QMYSQL3: Unable to execute statement Database error was: Duplicate entry '3003-2010-06-29 01:08:00-0' for key 'PRIMARY'

Is the EIT collection thread leaving a mutex locked when this error happens?

Attachments (3)

mythbackend.gdb (37.3 KB) - added by malcolm.parsons@… 14 years ago.
Thread backtraces
mythbackend2.gdb (35.7 KB) - added by malcolm.parsons@… 14 years ago.
Backtraces from another deadlock
mythbackend.log (11.9 KB) - added by malcolm.parsons@… 14 years ago.
Backend log

Download all attachments as: .zip

Change History (9)

Changed 14 years ago by malcolm.parsons@…

Attachment: mythbackend.gdb added

Thread backtraces

comment:1 Changed 14 years ago by koeb@…

I've got a similar symptoms the only difference is the log output.

2010-06-23 14:58:34.144 DB Error (Looking up chanID): Query was: SELECT chanid, useonairguide FROM channel, dtv_multiplex WHERE serviceid = :SERVICEID AND networkid = :NETWORKID AND transportid = :TRANSPORTID AND channel.mplexid = dtv_multiplex.mplexid AND channel.sourceid = :SOURCEID Bindings were: :NETWORKID=65024, :SERVICEID=2960, :SOURCEID=1, :TRANSPORTID=1020 Driver error was [2/2006]: QMYSQL: Unable to execute query Database error was: MySQL server has gone away

Changed 14 years ago by malcolm.parsons@…

Attachment: mythbackend2.gdb added

Backtraces from another deadlock

comment:2 Changed 14 years ago by malcolm.parsons@…

In today's hang:

Thread 27 holds eventMapLock and is blocked on a query prepare. Thread 2 holds _listener_lock and is trying to get eventMapLock. Thread 28 is trying to get _listener_lock.

Changed 14 years ago by malcolm.parsons@…

Attachment: mythbackend.log added

Backend log

comment:3 Changed 14 years ago by malcolm.parsons@…

#mythtv-users asked for the mysql processlist when the backend is deadlocked.

mysql> show processlist;
+------+--------+-----------+-------------+---------+-------+-------+------------------+
| Id   | User   | Host      | db          | Command | Time  | State | Info             |
+------+--------+-----------+-------------+---------+-------+-------+------------------+
|    9 | mythtv | localhost | mythconverg | Sleep   | 13537 |       | NULL             |
|   13 | mythtv | localhost | mythconverg | Sleep   |    69 |       | NULL             |
|   15 | mythtv | localhost | mythconverg | Sleep   |     9 |       | NULL             |
|  124 | mythtv | localhost | mythconverg | Sleep   |  2401 |       | NULL             |
|  201 | mythtv | localhost | mythconverg | Sleep   |   129 |       | NULL             |
|  852 | mythtv | localhost | mythconverg | Sleep   | 13060 |       | NULL             |
| 2155 | mythtv | localhost | mythconverg | Sleep   |  3058 |       | NULL             |
| 2156 | mythtv | localhost | mythconverg | Sleep   |    59 |       | NULL             |
| 2185 | mythtv | localhost | NULL        | Query   |     0 | NULL  | show processlist |
+------+--------+-----------+-------------+---------+-------+-------+------------------+
9 rows in set (0.00 sec)

comment:4 Changed 14 years ago by malcolm.parsons@…

My backend computer has died, so I can't provide any more debugging information.

comment:5 Changed 14 years ago by danielk

Resolution: invalid
Status: newclosed

invalid -- hardware failure.

comment:6 in reply to:  description Changed 13 years ago by spidersddd@…

I am having very similar problems as this my mythweb stops responding and I have had several hard locks on my frontend that require a reboot. If there is anything I can do to help get this resolved am more then happy to do it.

Troy K. email: spidersddd@…

Replying to malcolm.parsons@…:

I'm using MythTV 0.23.0+fixes25119-0ubuntu0+mythbuntu2

I've been seeing random backend deadlocks, where the frontend lists no recorded programmes, the backend doesn't record anything, and the "Upcoming Recordings" and "Backend Status" pages in MythWeb don't load.

Looking at the logs, there is a database error in the hour before the deadlock is noticed:

2010-06-25 12:55:04.036 DB Error (change_program): Query was: UPDATE program SET starttime = ?, endtime = ? WHERE chanid = ? AND starttime = ? Bindings were: :CHANID=3003, :NEWEND=2010-06-29T02:45:00, :NEWSTART=2010-06-29T01:08:00, :OLDSTART=2010-06-29T00:35:00 Driver error was [2/1062]: QMYSQL3: Unable to execute statement Database error was: Duplicate entry '3003-2010-06-29 01:08:00-0' for key 'PRIMARY'

Is the EIT collection thread leaving a mutex locked when this error happens?

Note: See TracTickets for help on using tickets.