TV Shows Library Disappears during/after Library Update
#1
I'm running OpenELEC v4 (Gotham) on an RPi and have this issues now with two different RPi's with the same setup.

First of all, the initial library scan doesn't even pickup close to 25% of the shows that I have in my library (SMB Share via NAS).

So I attempt to go and manually update the library, and/or manually 'Check for New Content' on any other given show, and it'll update for a while, only to abruptly stop. When it stops, my TV Shows library is missing. It seems the main issue is that when it "fails," it resets the scanner of my library back to 'None' (From 'TV Shows' - TVDB). The source of the library is still there (The SMB Share) and I can navigate it via the 'Files' menu, but the library itself is gone, as well as the scanner.

I've spent a fair amount of time this morning watching logs for any errors to show up when this occurs, but it seems that it stops logging right around the same time that the scraping stops, example:

Code:
17:21:42 T:2913629264   DEBUG: GetEpisodeId (smb://10.101.101.20/TV.Shows/Scrubs/Season 01/S01E05 - My Two Dads.avi), query = select idEpisode from episode where idFile=537
17:21:42 T:2913629264   DEBUG: GetEpisodeId (smb://10.101.101.20/TV.Shows/Scrubs/Season 01/Scrubs - S01E01 - My First Day.avi), query = select idEpisode from episode where idFile=538

Are the last couple lines in my log.old. It doesn't show me restarting the RPi (Or any actions after things "fail").

Here's a link to the full log from startup to "failure": http://pastebin.com/hpgRuf6W

I can provide more logs if needed, but from what I've seen, the majority of them end the same way, and I don't see any obvious ERROR's that would indicate why this all is happening.

Appreciate any help, google hasn't been much :/

Couple other things worth noting:

- Had to rebuild NAS about two weeks ago after power outage.

- Both of my RPi's crashed recently (One about a month ago, one about a week ago) which prompted me updating everything. One was related to a bad SD card adapter, the other was (likely) a result of too much unplugging and overclocking.

- Library was working fine as of a week ago on a Windows based XBMC environment, as well as on a RaspBMC instance.

- Removing source/cleaning library doesn't seem to work.

- Deleting video db doesn't seem to work.
Reply
#2
Just an update: Reinstalled RaspBMC on one of my RPi's, and it seems to be experiencing the same issues, so (likely) not related to OpenELEC.

My best guess is a permissions issue, maybe? It's strange, because certain TV shows can be scraped if I do so manually (Scan for New Content), but often times they'll fail, it'll require a reboot, and then the issue will be "fixed" for the remainder of that show, only to show up on the next one.

I don't know that I mentioned it in the OP, but the issue does temporarily fix itself upon reboot, only for it to arise again at the first chance of doing a Lib Scan.
Reply
#3
Oddly enough, I think I have solved my issues simply by restarting my NAS. In it's defense, it's been about three months since the last time it got a good power cycle Sad

Post restart, the initial scan pulled in about half of my shows, I'm now going through them to get the ones it missed and I'm at about 75% of the total shows, and have only had the issue occur once, and I'm fairly certain there was a permissions issue with that show's folder.

Don't mean to bump my own post (yet again), just wanted to keep this updated on the off chance someone else has the issue.

Thanks for reading!
Reply
#4
Actually, I'm not convinced it has anything to do with your NAS drive at all. I'm experiencing this now on my rPi (since upgrading to Openelec 4.0.4 / XBMC 14.1), and I'm not using a NAS. My source drive is set to a share on my Windows home pc, and It seems to be specifically an issue with TV Shows.

I'm using Gotham 14.1, openelec 4.0.4 (about to upgrade to 4.0.6), and although I doubt it's an openelec issue I'm fairly convinced it has something to do with Gotham since I never had this issue using Frodo.

Anyone else experience this?

Any ideas?
Reply
#5
I'm also convinced that it might be a Gotham issue.

I have recently updated my openELEC version on my RPi and since, I've found its been having issues with updating the library. Unfortunately, when I initially tried to update, it failed and caused Gotham to go into a boot loop. I re-flashed the latest version (4.0.7) on to the SD card and it all seems to work fine except I'm finding I'm having to update each TV show manually. If I try and leave it to do an entire folder it gets part way through then gives up, and as dnalloheoj said I've found that the 'TV shows' tab has gone.

Sorry I don't really have any info on a fix but I just wanted to keep this thread alive and see if anyone else has experienced this or, with any joy, found a fix.
Reply
#6
(2014-07-19, 18:57)FatherRemington Wrote: If I try and leave it to do an entire folder it gets part way through then gives up, and as dnalloheoj said I've found that the 'TV shows' tab has gone.

A debug log (wiki) might help identify what is going wrong.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#7
(2014-07-19, 23:36)Milhouse Wrote: A debug log (wiki) might help identify what is going wrong.

With pleasure! Sequence of Events: Enabled logging & rebooted. Then went to Videos -> Files -> TV Shows SAMBA source -> Scan for New Content. Library started scanning my "Criminal Minds". Got about 3/4 of the way through Criminal Minds when it suddenly stopped and the "TV Shows" menu item disappeared. Uploaded xmbc.log, which you can find here: http://xbmclogs.com/show.php?id=259094

There's a large number of TV Shows it didn't even get to, so rebooted, and sequence starts again: a number of episodes get added to DB, then above behaviour occurs, then reboot and so on.

Once again, log file is here: http://xbmclogs.com/show.php?id=259094

Look forward to any insights!
Reply
#8
(2014-08-02, 18:58)Ruggerosb Wrote: With pleasure! Sequence of Events: Enabled logging & rebooted. Then went to Videos -> Files -> TV Shows SAMBA source -> Scan for New Content. Library started scanning my "Criminal Minds". Got about 3/4 of the way through Criminal Minds when it suddenly stopped and the "TV Shows" menu item disappeared. Uploaded xmbc.log, which you can find here: http://xbmclogs.com/show.php?id=259094

Your Textures13.db SQLite database is corrupt:
Code:
18:27:40 T:2886931536   ERROR: SQL: The database disk image is malformed
                                            Query: INSERT INTO sizes (idtexture, size, usecount, lastusetime, width, height) VALUES(5154, 1, 1, CURRENT_TIMESTAMP, 0, 0)
18:27:45 T:2815718480   ERROR: AddCachedTexture failed on url 'http://thetvdb.com/banners/actors/40750.jpg'

Check you haven't simply run out of space on the /storage partition (df -h) which has prevented the database from expanding. If you need to resize your /storage partition so that it uses all available space, run the following command and reboot:
Code:
touch /storage/.please_resize_me

Assuming you have sufficient free space on /storage, you need to delete your corrupt Textures13.db and re-cache your artwork:
Code:
systemctl stop xbmc
rm /storage/.xbmc/userdata/Database/Textures13.db
rm -fr /storage/.xbmc/userdata/Thumbnails
sync
reboot
To recache your artwork, simply browse around the GUI and it will happen automatically, or run the script in my signature.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#9
Milhouse - Thanks for the quick reply...

Plenty of free space on /storage, and while I could delete the db file, the Thumbnails files appear to be corrupted - I get an input/output error when I try to delete these. What's worse is it seems impossible to fsck the /storage partition since it's mounted and in use, and fsck doesn't appear to be running on startup either, nor can I force it to run on startup since / is read only.

So basically, since I don't have a separate linux machine to mount the SD card and run fsck, I have to dump and reload my entire install. That seriously sucks, especially since rPi by its very nature is prone to file issues due to its low voltage system and lack of power button (if the Pi hangs, your only option is to pull the plug, which means the system gets no warning and if it's in the middle of an i/o event... well let's just say it's the perfect way to cause corruption). For the record, I've used the default openelec install and clock settings - I haven't done any overclocking etc.

So, what now? Do I seriously have to ditch my entire install and reinstall from scratch, knowing full well it's going to happen again, and again, and again? Or is there a super secret way to run fsck on startup in openelec that I'm not aware of?
Reply
#10
Well, I took a huge risk and ran
Code:
fsck -fy /dev/mmcblk0p2

Rebooted, and so far so good. Openelec booted find, and XBMC actually came up, so that's a good start. Fsck definitely sorted out the corrupted files, and I was able to complete the instructions from Milhouse thereafter. Now we'll see if that problem's resolved! I'll let you know ...

For those of you with similar issues, USE THE ABOVE COMMAND AT YOUR OWN RISK and don't say I didn't warn you: it's a gamble to do what I did - you can seriously corrupt the data by forcing fsck to run on a mounted disk! Since I had nothing to lose anyway, I took a chance. It would be nice if Openelec ran fsck -y on startup automatically, or at least gave us the option to check for disk errors on reboot. It's certainly a must-have in my opinion, and definitely better and safer if Openelec does this before mounting the partitions.
Reply
#11
You could try upgrading to OpenELEC 4.2, which is a beta, but includes fsck on boot. You'll need to complete the upgrade manually though (copying the firmware and target files from the tar to the FAT partition).

You could also try a LiveCD on whatever machine it is you're posting from.

Although IMHO, reformatting the /storage partition would seem like the best option since it sounds like it's pretty well hosed.

Edit: OK so you got fsck to run, hope it works.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#12
Ok, so it didn't fix the problem. Updating the Library still stops prematurely, and TV Shows and Movies still disappear when it does. Rebooting solves the problem temporarily, as always. Want another log, Milhouse?
Reply
#13
I guess...
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#14
Here it is: http://xbmclogs.com/show.php?id=259379

Just prior to this log, the rPi had frozen so badly that I couldn't navigate from within XBMC and I couldn't ssh in either, so I was forced to power cycle it. So it's no surprise then that I noticed SQL errors once again in the log (see lines#640,#807,#809#820,#822 and more in the log - not sure which db files are at fault, but it doesn't look good), and this time I can't get into TV Shows from within XBMC at all (my attempts should hopefully show up in the logs). Plus, My remote's built-in keyboard has decided to stop working now, I can't access the video files from sources for TV Shows at all (movies work fine), and the TV Shows Library is completely broken.

Earlier today I had deleted the MyVideos78.db file thinking it was corrupt, so everything you're seeing now is a result of brand new sources and library creation.

Think I got lucky the last time I ran fsck, since I have no idea how I got it right! For the life of me I can't get /storage to unmount or mount as read only to get it to work this time. Lucky sequence of events the last time which I can't seem to replicate again. Annoying. Do you know the specific steps to get fsck to run?

Before you ask, I got this SD card with the rPi from Raspberry Pi themselves as part of their "startup kit". It's even branded with the raspberry logo, so it should be 100% the right SD card.

I'll format the SD and reinstall from scratch if you think it'll help, but I'm dubious. Let me know what you think.
Reply
#15
I'd just reformat and start from scratch. If the Pi continues to crash, then maybe your power supply is a bit on the weak side (or your USB cable of poor quality) resulting in voltage sags that lead to crashing and filesystem corruption.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply

Logout Mark Read Team Forum Stats Members Help
TV Shows Library Disappears during/after Library Update0