Coda File System

Re: pdbtool Assertion failure?

From: Jan Harkes <jaharkes_at_cs.cmu.edu>
Date: Thu, 19 Aug 1999 18:52:09 -0400
On Thu, Aug 19, 1999 at 03:35:45PM -0700, Coda wrote:
> 
> Here I go again, asking more questions...
> 
> After adding and deleting a bunch of users and groups via pdbtool (testing
> scripts and such)  I seem to have broken it.
> 
> now, if I try to add a new user or group I get the following:
> 
>   pdbtool> nui testu 570
>   Assertion failed: uid >= 0 && gid <= 0, file "pdbdb.c", line 181
>   VENUS IS EXITTING! Bye!
> 
>   pdbtool> ng testg 500
>   Assertion failed: uid >= 0 && gid <= 0, file "pdbdb.c", line 181
>   VENUS IS EXITTING! Bye!

This is due to a bug related to updating the maxids entry in the
database. It was fixed in the development tree. I'll attach the diff
of coda-src/al/* between 5.2.7 and the current version. If you compiled
from source you can apply this to get a correctly working pdbtool.

> Below I've included a pdbtool> list in case it helps illuminate something.
> 
> I seee that USER jrs belongs to group -255 (one that has been deleted).
> I've tried:

Great, you found a new bug. When a group is deleted, the id was not
removed correctly from group members. The fix for that is also in the
attached patch (the one-liner in pdb.c).

>   pdbtool> rg -255 500
>   Assertion failed: r.id != 0, file "pdb.c", line 84
>   VENUS IS EXITTING! Bye!
> 
>   pdbtool> d 500
>   Assertion failed: p.id != 0, file "pdb.c", line 252
>   VENUS IS EXITTING! Bye!

Yeah, the code is a bit extreme on assertions. You'll not be able to
remove someone from a non-existant group, even when that user is
registered as a group-member. (But with the bug fixed, that shouldn't
occur)

> What do I need to do to be able to use pdbtool again?

Best thing is to patch the source, and start over again. Although you
could get the maxid's back to normal values with the `maxids' command,
you won't be able to remove the bad group-id from user jrs's list.

> -- Jonathan

l8r,
    Jan



Received on 1999-08-19 18:57:32