<div dir="ltr">Stopped mythbackend and performed the repair steps<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">sudo mysqlcheck --repair mythconverg recordedseek<br>sudo mysqlcheck --optimize mythconverg recordedseek<br>sudo mysqlcheck --analyze mythconverg recordedseek<br></blockquote><div>No errors reported.  Did same for recordedmarkup, also no errors.</div><div><br></div><div>Then I tried (had to delete the final Z in the timestamp)<br></div><div>INSERT INTO recordedseek (chanid, starttime, type, mark, `offset`) VALUES (10501,'2023-04-08T04:59:00',9,0,376);</div><div>result:</div><div>MariaDB [mythconverg]> ERROR 1062 (23000): Duplicate entry '10501-2023-04-08 04:59:00-9-0' for key 'PRIMARY' <br></div><div>I verified that there was an existing entry already.  As with the duplicates in recordedmark, this doesn't actually seem to be a problem with the database, but a problem with the program or, in this case, me, for trying to insert a duplicate.</div><div><br></div><div>Further background info in response to previous points in this thread</div><div>====================================================</div><div><br></div><div>The logs from the initial shutdown show lots of systemd units stopping but *not* maria.  This supports the theory it did not shutdown clean.  The first occurrence of these errors was with a show that was recording before the shutdown and that finished recording after the recovery.</div><div><br></div><div>The semi-crash involves the video driver and Xorg using 100% of a CPU.  I was not watching myth at the time it happened.  That would seem to leave the non-graphic parts of the system functional.  But myth did lose a connection to an HDHomeRun tuner at the same time the video went crazy.  So some other systems were affected.</div><div><br></div><div>Should this situation recur (unfortunately it happens regularly) I should attempt to shutdown mythtv-backend and then mariadb separately, verify they have completed, and only then bring the system down.  Of course, maybe the database was already corrupt and a regular shutdown database shutdown will not be possible--almost certainly the shutdown procedure attempted to stop it.<br></div><div><br></div><div>Since something is clearly screwy, it does seem reasonable to assume the database was corrupted.</div><div><br></div><div>As packaged by Christian Marillat at <a href="http://deb-multimedia.org">deb-multimedia.org</a>, mythtv is backed up weekly with a cycle of 12.  So I have a last good backup on Mar 31, 7am.  That's ~4.5 days before the crash, and about 10 days old now.</div><div><br></div><div>Debian went with mariadb, not mysql, as a default, and that's what mythconverg is in for me.  All the recorded* tables (probably all tables) are using MyISAM as the engine.</div><div><br></div><div>Ross<br></div></div>