P4D -xf Flag

Applys fixes to server metadata by job number

Info & Tags

Article #:
834
Created:
02/06/07
Modified:
08/19/08
Tags:
p4d

Links

  1. Setting port to
    Perforce System Administrator's Guide
  2. Using triggers for external authentication
    Perforce System Administrator's Guide

SUMMARY

The -xf flag is used with a specific job number argument to address issues with your server metadata. The job numbers reference built-in server fixes to problems arising from older server  bugs, or fixes to a few common problems that can't easily be resolved without a specialized command.

DETAILS

Current valid -xf arguments are:

925 (working and locks table out of sync)

If Perforce is unable to completely write to both "db.working" and "db.locks" while a user checks out files, some files may be marked as open for that user, but corresponding lock records may not exist. This results in a the error:
Working and locked tables out of sync!
This is most likely to occur after running out of disk space on the drive that contains the Perforce root directory. This problem can prevent users from reverting or submitting files:
p4d -xf 925

3104 (early 99.2 resolve bug)

Rarely used. Addresses an issue with resolves in 99.2 prior to build 13782. When resolving several files with different resolve statuses (for instance: 'accept theirs' and 'accept merge'), and then submitting them, the resolve status of the source file is set incorrectly (for example, the p4 filelog of that file will indicate "copy into" instead of "merge into"):
p4d -xf 3104

4164 (early 2000.1 submit bug)

Rarely used. Addresses an issue with resolves in 2000.1 prior to build 17666. An inconsistency between "db.integ" and "db.rev" can produce resolution results that are different between the server and local  file:
p4d -xf 4164
An illustration of this problem could be reproduced by adding three files with differing contents (a, b and c) and then integrating them:
p4 integ -i a c
p4 resolve -ay
p4 integ -i b c
p4 resolve -at
p4 submit
File "c" will have the contents of "b" in the local workspace, but the contents of "a" in the server.

12904 (replace forward slashes with underscores in client names)

Prior to version 2006.2 it was possible to create client names with forward slashes ("/"). This would cause problems when deleting clients that began with the same characters followed by the slash. Subsequent to revision 2006.2 forward slashes were no longer permitted in newly created client names, but existing clients were not re-named. This command replaces any forward slash in existing client names ("xyz/abc") with an underscore ("xyz_abc"):
p4d -xf 12904

18362 (replace 'auth-check' trigger command)

Beginning with version 2005.2 of the server, a trigger can be added to use external authentication, such as LDAP. A potential problem with this functionality is that it makes it possible to completely lock anyone out of Perforce, including "super" users, if the "auth-check" trigger table entry was incorrectly entered. This command enables replacing the trigger table entry with a corrected entry:
p4d -xf 18362 "runcommand %args%"
where "runcommand" is a script or other tool and "%args" are the arguments to be passed. Note that this -xf argument can only be used to replace an existing "auth-check" trigger, not to add a new one.

One way to get back into a server using this command is to create a trigger table entry that always succeeds. For example:
p4d -xf 18362 "echo 0"
Since this command always returns "0", the trigger always succeeds. As a result any password entered will work.

Note:
When using this command to regain access to a server, the server should be launched in "localhost mode" using the "-p localhost:1666" server flag to prevent external connections until the problem with the "auth-check" trigger has been corrected.