Library broken, again

Since I started using Roon in my main music system a problem with the library keeps coming back: after restarting the library is missing a third of the tracks, when scanning of files is finished, the missing tracks are added again. As I have a large library (ca. 250000 tracks) this takes a couple of hours. I’ve tried several things, including a fresh windows installation. That seemed to work: Roon was flawless for 2 weeks. But now it’s back, and even worse: adding music is stuck.

When I look in the logs I see things I’ve seen before:

“Corruption: bad block type” is a message from the database that Roon uses to store collection information. It means that the database library wrote data out to the disk, and then read it later and found that it had become inconsistent.

The database package that we use (LevelDb) is extremely robust. It was developed at Google and is used in most of their desktop and mobile apps–for the most part, if it complains about corruption, it’s a signal that something has gone wrong at a lower level than Roon.

The most common cause for this particular message is when the hard drive holding the database is failing.

Other causes we’ve run into for this sort of corruption: backup software that manipulates files in Roon’s data directory, Antivirus software that interferes with the operation of LevelDb, and bad/failing RAM/CPU/Motherboard.

I would check the disk first. 95% of the time, that’s where the problem is.

I have this same issue on a mac mini running MacOS 10.10.

For no reason the library suddenly reduces from approx 225000 tracks last night and this morning is showing 88000 and is slowly adding back all the tracks. This happens about once per week on latest version of Roon.

I have no antivirus running on the Mac mini, and the library is remote on a Synology NAS.

The most annoying thing about the rescan is that the latest added music is no longer the latest music after the rescan.

I had reinstalled the OS a few months back. Previously I had bootcamp and Windows on the same mc mini and do not believe that the windows version of Roon ever that this drop the library and rescan issue.

Looking at the fact that that my library has a similar number of tracks to the person above, maybe this is an app/db issue.

But as support state I will run some disk checks on the internal mac had to confirm.

I will also install the latest boot camp and Windows 10 again and see if I can confirm this issue is limited to mac os.

Ah forgot to add in my case I do not need to restart the library for the tracks to disappear.

Was playing music last night with the full library present went to roon this morning from my tablet and the library was at 88000 tracks and rescanning.

@demondes, you might not have the same issue. I was responding specifically to the trace that @Lpa extracted from his log files–since we haven’t seen your log files, it’s hard to say whether you are experiencing the same problem.

The fact that you don’t need to restart the library also suggests that you are experiencing a distinct issue. Your problem sounds like a bug related to NAS storage that has recently been fixed. We have that fix in alpha testing right now.

Still problems here…

First all seemed well: after a restart, the library loaded without a problem. I checked hard disk and ram after I did a fresh install of windows and found no problemens. Checked hd again last weekend, still nog problem. Libary loaded during last 5 days without a problem (checked logs, no bad blocks).

But now I lost a third of the library again and the bad blocks reappeared in the logs…

It all started this afternoon with connection problems with Tidal. I restarted the PC but then login Tidal failed. All the Tidal albums were gone from the library. After restarting my modem/router I could login to Tidal successfully, but now most of the Tidal albums are gone from the libarary and in the settings tab services Tidal says it’s synchronizing but seems stuck to me. Roon is finished scanning the audio files on the NAS, but a third of thems is missing…

Hello @Lpa, I want reconfirm what kind of corruption you’ve got this time and I need your logs. I’ll PM you shortly with further instructions.

This really sounds like a failing disk to me. What you’re describing is exactly how they behave–it works fine for a few days, and eventually it corrupts some data and you have a problem. The particular error you’re experiencing is virtually always associated with a failing drive–it basically means “something other than Roon changed Roon’s data on disk”.

It’s very difficult to “check” a disk to see if it’s bad. Sometimes you get messages in Event Viewer on windows or Console on mac, sometimes not (depends on the type of failure). Sometimes you just get data corruption.

The best way is to swap in a drive that has never exhibited problems and see if the issues go away–I’m not aware of a piece of software that can reliably determine that a drive is not in the early stages of failure.

@vova, he’s getting low-level db errors.