Hello!
I've got an 60GB iPod Video, and all music is added through the iTunes-database (with Amarok), and I'm sure I only have one copy of every song (with some exceptions, of course). I've tried different custom builds lately, but all of them gave me at least three or four duplicate entries of each track in my database. I thought this may come from a bug in the builds, which aren't updated for some months. Yesterday I tried to use the daily build of Rockbox, however, it gave me the same results. Then I entered the debug menu while the database was crawling my files, and found that it was adding a lot of songs in '/recordings'. I checked out the directory and found out that it was looping back to the root of my iPod, like a cyclic symlink. If I clicked 4 times on the directory, it was like nothing had happened, however, I had to go back four times before I could exit to the main menu again. I tried to open the directory when my iPod was mounted in my GNU/Linux system, but then the directory seemed normal, and empty, so I deleted it. Then I deleted all my database files, and initialized it again. It took only 20% as long to initialize the database compared to when the directory existed. Hurray! Now the database is working perfectly, with both Rockbox (vanilla) and other custom builds.
I hope some of you that have had a similar problem with the database find this interesting and helpful.
-Sirius