[p4] Duplicate user entries

Laurent Giroud lgiroud at edengames.com
Tue Jul 4 02:09:09 PDT 2006


First of all, thanks for all the answers which were made on the list.
This is really helpful ;)

I have checked the various recommandations you made, and it doesn't appear
to be a space related problem (runnning your command does not reveal any),
nor an automatic user creation one (I had already forbidden this via
protection rules).

And indeed, the user names are exactly the same (case included), which, as
you say, points to an internal database problem.

I will be writing to perforce support, at least to report the bug, although
I doubt they will be able to pinpoint it without having a look at our base.
But at least it's certainly a good thing that they learn about such a
problem.

In order to fix the problem I will be trying Tony Sweeney's suggestion as
soon as I can operate on the server without disrupting normal work
operations. I'll forward the result to the list for future reference.
I guess backuping all db.* files before doing so is a good thing, just in
case something goes wrong.

Thanks again for your suggestions and recommandations !

Regards,
Laurent

> -----Message d'origine-----
> De : Weintraub, David [mailto:david.weintraub at bofasecurities.com] 
> Envoyé : lundi 3 juillet 2006 20:48
> À : Laurent Giroud; perforce-user at perforce.com
> Objet : RE: [p4] Duplicate user entries
> 
> I would check a few things:
> 
> * Check the case of the names of the various users. In 
> Perforce, case is
> significant. Weintraub is a different user from weintraub who is a
> different user from WEINTRAUB. In Windows, each of these names
> represents the same user ID. Meanwhile, Perforce will automatically
> create new users unless you specifically set up your 
> protection table to
> prevent this from happening (See <http://snipurl.com/so95> Preventing
> Creation of Users).
> 
> * Make sure there are no trailing spaces in user IDs. It isn't easy to
> do because if you use Perforce forms, it automatically makes trailing
> spaces as an underscore. However, I was able to do it via 
> p4perl. I had
> to resort to the following Unix command to see the spaces:
> 
> 	$ p4 -ztag users | awk '/^\.\.\. User/ {print "\"" substr($0,
> 10) "\""}'
> 
> This prints out the user's ID with quotes around each ID. 
> Thus if there
> is a trailing space, you'll see it inside the quotation marks.
> 
> * If you have determined that these Perforce users actually 
> have exactly
> the same matching ID, I suggest you call customer support immediately
> because this is pointing to a bad Perforce database problem. Unlike
> other database, the key to the database is the user ID number itself,
> and not an underlying hidden ID (It's why you can't change someone's
> user ID. You can only create a new user with the same attributes and
> delete the old one). It might be possible to dump your 
> database files to
> a journal, and somehow munge the journal to correct the 
> problem, but you
> shouldn't do this without Perforce helping you out.
> 
> Does Perforce use Berkeley DB for its database, or is this a homegrown
> database? If this is Berkeley DB, and they link dynamically 
> to Berkeley
> DB on Unix, I know that some versions of Berkeley DB have 
> bugs that can
> cause this problem. 
> 
> -----Original Message-----
> From: perforce-user-bounces at perforce.com
> [mailto:perforce-user-bounces at perforce.com] On Behalf Of 
> Laurent Giroud
> Sent: Monday, July 03, 2006 12:52 PM
> To: perforce-user at perforce.com
> Subject: [p4] Duplicate user entries
> 
> Hi,
>  
> since a few days, we have a strange problem with perforce.
> 4 users out of our 80 license quota appear duplicated when using "p4
> users"
> to list all users.
> 
> Despite being under the 80 actual users number, this causes one of our
> users to get a "quota license exceeded" error message.
> And indeed, "p4 users | wc -l" returns 80 as a result.
> 
> As a first test to overcome the problem I have deleted one of those
> duplicate users : the first duplicate is deleted without problem,
> however after that, "p4 user -d username" yields a "user 
> doesn't exist",
> even though the name still appears when using "p4 users".
> 
> Recreating the deleted user allows him to work normally 
> without problem.
> 
> I haven't been able to find anything about such a problem in 
> the user &
> administration documentation, nor on the perforce-users list 
> and even on
> google.
> I have seen a few thing about duplicates after depots merging, but we
> have only one depot and never merged it with another.
> 
> Would anyone have any clue ?
> 
> I'd gladly contact perforce support, but our license 
> currently does not
> include support so it's not an option for the moment :(
> 
> Thanks in advance if anyone has an idea.
> 
> Regards,
> Laurent
> --
> Laurent Giroud, lgiroud at edengames.com
> 
> _______________________________________________
> perforce-user mailing list  -  perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
> 





More information about the perforce-user mailing list