On Thu, Jan 11, 2007 at 02:28:49PM -0500, Bob Copeland wrote:
> > > I think it's something of a WTF that it rewrites the database even when 
> > > you just do a query.
> > 
> > See attached rebuild_smalldb_only_when_needed.patch that fixes this,
> > although it doesn't solve the underlying problem...
> 
> This patch misses the case where you just copy the files on the command
> line [ if(optind < argc){ ... ].  It'd be even better to make the io_lock
> paths symmetrical.  I'll try to spin a patch for this tonight.

OK, I'm happy to test for you :)

> > See attached omfsck.out.  Don't know how useful this is given the below:
> 
> It says your block bitmap thinks that there are certain blocks in use, but
> when omfsck tries to visit all of the files, it can't reach these blocks.
> It's an inconsistency but shouldn't be a problem other than not having that
> extra space.  If you have your music files backed up I'd recommend letting
> omfsck fix it.  Still won't fix the problem though.

Hmm, no I don't believe I have it all backed up.  Nor do I have a spare
20GB to make a copy of the Karma...

> > > 3. Can you send the corrupt smalldb to the list? 
> > > (/media/karma/var/smalldb)
> > 
> > Um, it's 0 bytes.  See the typescript karma_debug.log attached.
> 
> Ah.  Well, that sucks :)  Use Troubleshooting->Rescan Music on the Karma to 
> rebuild it.

It did it automagically when I powered up after the paperclip reset.

> > > 4. Also try, perhaps (your line numbers may be different):
> 
> > This gave "write error: File exists". See attached karma_debug.log
> > typescript.  Don't know why this is an error...
> 
> Nor I.  Do you have write permission on /media/karma?  EEXISTS may just
> be garbage from fopen() trying an O_CREAT | O_EXCL on the open followed.  
> Might be worth using strace to see what the heck glibc is doing with
> smalldb.

I tend to agree with you there.

I applied the attached lk_karmaUsb_write_smalldb_perror.patch along with
the two patches you posted in the other mail.  It's now much better, see
attached karma_debug_take2.log; but riocp still seems to be messing with
smalldb in uncertain ways.  See especially the file sizes before/after
each query.

> > So it seems like riocp is truncating the smalldb and then erroring out.
> > Don't know why that would happen, and it frankly scares me quite a bit.
> > Any guesses as to why this is happening?
> 
> Nope.. the only error path I see which doesn't also spit out an error are
> two allocs, one in smalldb_init.  Strange.  Just to be sure, you are using
> the libkarma-0.0.6.tar.gz release?

Yes, with a few patches that have been posted here and in the hg repo.
See http://people.debian.org/~jello/libkarma_0.0.6-1.diff.gz for all the
details.

> > PS - I'm usually on IRC if you'd like to help debug in real-time.
> 
> Okay, what channel/server/nick?  I irc a lot less than I once did but I can
> try to jump on tonight.

I'm jello on irc.debian.org (OFTC) or irc.freenode.net.  Just /msg jello
and I should reply.


Thanks again for all your efforts and hard work!

--Joe
Script started on Thu 11 Jan 2007 08:17:42 PM EST
[EMAIL PROTECTED]:/usr/local/src/Debian/karma$ ls -l /media/karma/var/smalldb
-rw-rw-rw- 1 root root 359422 2007-01-11 20:17 /media/karma/var/smalldb
[EMAIL PROTECTED]:/usr/local/src/Debian/karma$ libkarma-0.0.6/tools/riocp -a 
/media/karm a/ -s genre=Musical,artist=Chicago -u %s-%n-%t.%c
* Using UTF-8 codeset.
Using UTF-8 codeset.
lk_karma_authenticate: 0
lk_karma_request_io_lock: ok
Downloading Rio database...  please wait... Done!
Searching FIDs with "genre=Musical                 ":  172 selected
   ANDing FIDs with "artist=Chicago                ":   22 selected
  320 Chicago-19-Class.mp3
  800 Chicago-11-I Can't Do It Alone (reprise).mp3
 1584 Chicago-18-Razzle Dazzle.mp3
 1728 Chicago-5-When You're Good to Mama.mp3
 2096 Chicago-10-I Can't Do It Alone.mp3
 2736 Chicago-2-All That Jazz.mp3
 2752 Chicago-4-Cell Block Tango.mp3
 2976 Chicago-15-Me and My Baby.mp3
 3280 Chicago-7-A Little Bit of Good.mp3
 3952 Chicago-17-When Velma Takes the Stand.mp3
 4976 Chicago-14-I Know a Girl.mp3
 7472 Chicago-21-Hot Honey Rag.mp3
 7552 Chicago-9-Roxie.mp3
 7712 Chicago-12-My Own Best Friend.mp3
 8016 Chicago-8-We Both Reached for the Gun.mp3
 8448 Chicago-16-Mister Cellophane.mp3
 8656 Chicago-20-Nowadays.mp3
 9264 Chicago-1-Chicago the Musical / Overture.mp3
10016 Chicago-22-Finale.mp3
10112 Chicago-6-All I Care About.mp3
10560 Chicago-3-Funny Honey.mp3
10976 Chicago-13-Entr' Acte.mp3
#---- -------------------------------------
lk_karmaUsb_write_smalldb(): Success
lk_karma_release_io_lock: ok
lk_karma_hangup: ok
[EMAIL PROTECTED]:/usr/local/src/Debian/karma$ ls -l /media/karma/var/smalldb
-rw-rw-rw- 1 root root 357911 2007-01-11 20:17 /media/karma/var/smalldb
[EMAIL PROTECTED]:/usr/local/src/Debian/karma$ libkarma-0.0.6/tools/riocp -a 
/media/karm a/ -s genre=Musical,artist=Chicago -u %s-%n-%t.%c
* Using UTF-8 codeset.
Using UTF-8 codeset.
lk_karma_authenticate: 0
lk_karma_request_io_lock: ok
Downloading Rio database...  please wait... Done!
Searching FIDs with "genre=Musical                 ":  172 selected
   ANDing FIDs with "artist=Chicago                ":   22 selected
  320 Chicago-19-Class.mp3
  800 Chicago-11-I Can't Do It Alone (reprise).mp3
 1584 Chicago-18-Razzle Dazzle.mp3
 1728 Chicago-5-When You're Good to Mama.mp3
 2096 Chicago-10-I Can't Do It Alone.mp3
 2736 Chicago-2-All That Jazz.mp3
 2752 Chicago-4-Cell Block Tango.mp3
 2976 Chicago-15-Me and My Baby.mp3
 3280 Chicago-7-A Little Bit of Good.mp3
 3952 Chicago-17-When Velma Takes the Stand.mp3
 4976 Chicago-14-I Know a Girl.mp3
 7472 Chicago-21-Hot Honey Rag.mp3
 7552 Chicago-9-Roxie.mp3
 7712 Chicago-12-My Own Best Friend.mp3
 8016 Chicago-8-We Both Reached for the Gun.mp3
 8448 Chicago-16-Mister Cellophane.mp3
 8656 Chicago-20-Nowadays.mp3
 9264 Chicago-1-Chicago the Musical / Overture.mp3
10016 Chicago-22-Finale.mp3
10112 Chicago-6-All I Care About.mp3
10560 Chicago-3-Funny Honey.mp3
10976 Chicago-13-Entr' Acte.mp3
#---- -------------------------------------
lk_karmaUsb_write_smalldb(): Success
lk_karma_release_io_lock: ok
lk_karma_hangup: ok
[EMAIL PROTECTED]:/usr/local/src/Debian/karma$ ls -l /media/karma/var/smalldb
-rw-rw-rw- 1 root root 357733 2007-01-11 20:18 /media/karma/var/smalldb
[EMAIL PROTECTED]:/usr/local/src/Debian/karma$ exit

Script done on Thu 11 Jan 2007 08:18:12 PM EST
--- libkarma-0.0.6.orig/src/karmaUsb.c
+++ libkarma-0.0.6/src/karmaUsb.c
@@ -933,7 +933,12 @@
 /* -------------------------------------------------------------------------- *
/
 int lk_karmaUsb_write_smalldb(void)
 {
-    return lk_properties_write_smalldb(usbMountPoint, db);
+    int val = 0;
+
+    errno = 0;
+    val = lk_properties_write_smalldb(usbMountPoint, db);
+    perror("lk_karmaUsb_write_smalldb()");
+    return val;
 }

 /* -------------------------------------------------------------------------- *
/
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-karma-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-karma-devel

Reply via email to