<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 8, 2018, at 8:30 PM, Stephen Worthington <<a href="mailto:stephen_agent@jsw.gen.nz" class="">stephen_agent@jsw.gen.nz</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On Thu, 8 Mar 2018 18:31:37 -0500, you wrote:<br class=""><br class=""><blockquote type="cite" class="">Ive setup my mythtv backend to daily optimize and backup the database. I have it email me with the results. So when I dont get the 2 emails at 7:35am each day, I go looking for problems. The system still records problems and the frontends work for viewing.<br class=""><br class="">What Ive seen lately is I cant ssh or login at the PC console of the backend, and I get errors on the console like:<br class="">Mar 7 12:11:47 mythbuntu kernel: [317584.873671] NMI watchdog: BUG: soft lockup - CPU#4 stuck for 22s! [TFWWrite:25774]<br class="">Mar 7 12:12:15 mythbuntu kernel: [317612.872998] NMI watchdog: BUG: soft lockup - CPU#4 stuck for 23s! [TFWWrite:25774]<br class="">Mar 7 12:12:55 mythbuntu kernel: [317652.872033] NMI watchdog: BUG: soft lockup - CPU#4 stuck for 23s! [TFWWrite:25774]<br class="">Mar 7 12:13:23 mythbuntu kernel: [317680.871359] NMI watchdog: BUG: soft lockup - CPU#4 stuck for 22s! [TFWWrite:25774]<br class=""><br class="">The Host name is mythbuntu. Its a Ubuntu 16.04 system<br class=""><br class="">Once I reboot, the system works fine and I get my optimize emails after a short time. But a day or so later I notice this problem again. I have not changed anything, but I have done some updating using: apt update and apt upgrade.<br class=""><br class="">Any ideas??<br class=""><br class="">Jim Abernathy<br class=""><a href="mailto:jfabernathy@gmail.com" class="">jfabernathy@gmail.com</a><br class=""></blockquote><br class="">Is there any more context in the logs? Googling suggests that<br class="">TFWWrite is in mythbackend in ThreadedFileWriter.cpp. I would have<br class="">hoped there might be a backtrace logged when the first error happened.<br class=""><br class="">You should also check to make sure you have plenty of free disk space<br class="">to optimize_db to use. You need to have enough free space for copies<br class="">of the files for the largest table in your database to be make. The<br class="">largest table is always recordedseek. What do these commands show:<br class=""><br class="">ll -h /var/lib/mysql/mythconverg/recordedseek.M*<br class="">df -h /var/lib/mysql/mythconverg<br class=""></div></div></blockquote><div><br class=""></div><div style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgba(0, 0, 0, 0.85098);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-rw-rw---- 1 mysql mysql 12M Mar 8 23:00 recordedseek.MYD</span></div><div style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgba(0, 0, 0, 0.85098);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-rw-rw---- 1 mysql mysql 16M Jan 20 13:49 recordedseek.MYD-180120142626.BAK</span></div><div style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgba(0, 0, 0, 0.85098);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-rw-rw---- 1 mysql mysql 14M Feb 5 08:48 recordedseek.MYD-180205085856.BAK</span></div><div style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgba(0, 0, 0, 0.85098);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">-rw-rw---- 1 mysql mysql 11M Mar 8 23:00 recordedseek.MYI</span></div><div style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgba(0, 0, 0, 0.85098);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #34bc26" class="">jim@mythbuntu</span><span style="font-variant-ligatures: no-common-ligatures" class="">:</span><span style="font-variant-ligatures: no-common-ligatures; color: #5230e1" class="">~</span><span style="font-variant-ligatures: no-common-ligatures" class="">$ sudo df -h /var/lib/mysql/mythconverg</span></div><div style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgba(0, 0, 0, 0.85098);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Filesystem Size Used Avail Use% Mounted on</span></div><div style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Monaco; color: rgb(244, 244, 244); background-color: rgba(0, 0, 0, 0.85098);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/dev/sda1 451G 4.2G 428G 1% /</span></div><div style="margin: 0px; font-stretch: normal; font-size: 10px; line-height: normal; font-family: Monaco; color: rgb(52, 188, 38); background-color: rgba(0, 0, 0, 0.85098);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">jim@mythbuntu</span><span style="font-variant-ligatures: no-common-ligatures; color: #f4f4f4" class="">:</span><span style="font-variant-ligatures: no-common-ligatures; color: #5230e1" class="">~</span><span style="font-variant-ligatures: no-common-ligatures; color: #f4f4f4" class="">$ </span></div><blockquote type="cite" class=""><div class=""><div class=""><br class="">Here are mine:<br class=""><br class="">root@mypvr:~# ll -h /var/lib/mysql/mythconverg/recordedseek.M*<br class="">-rw-rw---- 1 mysql mysql 5.8G Mar 9 14:14<br class="">/var/lib/mysql/mythconverg/recordedseek.MYD<br class="">-rw-rw---- 1 mysql mysql 5.3G Mar 9 14:14<br class="">/var/lib/mysql/mythconverg/recordedseek.MYI<br class="">root@mypvr:~# df -h /var/lib/mysql/mythconverg<br class="">Filesystem Size Used Avail Use% Mounted on<br class="">/dev/nvme0n1p4 100G 46G 50G 49% /<br class=""><br class="">So I need 11.1 Gibytes of free space available for optimize_db to<br class="">work, but I have lots more than that.<br class=""><br class="">If you have had a free disk space problem, you may now have old<br class="">temporary files in /var/lib/mysql/mythconverg that have been left<br class="">behind and need to be cleared up.<br class=""><br class="">The automated database backups are one obvious culprit if you are<br class="">running out of disk space. If you are in a situation where you are<br class="">accumulating more recordings, as your database grows, the backups also<br class="">grow, and if they are still in the default /var/lib/mythtv/db_backups<br class="">directory, their combined size will increase until there is<br class="">insufficient free space for other things to work. Rebooting then<br class="">cleans out the files in /tmp which have been left behind when the disk<br class="">filled up, and things can work for a few more days until space runs<br class="">out again. I have had this pattern happen a couple of times.<br class="">_______________________________________________<br class="">mythtv-users mailing list<br class=""><a href="mailto:mythtv-users@mythtv.org" class="">mythtv-users@mythtv.org</a><br class="">http://lists.mythtv.org/mailman/listinfo/mythtv-users<br class="">http://wiki.mythtv.org/Mailing_List_etiquette<br class="">MythTV Forums: https://forum.mythtv.org<br class=""></div></div></blockquote></div><br class=""></body></html>