Perforce Public Knowledge Base - Debugging "Excessive Wildcard Errors" After a Server Upgrade to 2009.2
Reset Search



Debugging "Excessive Wildcard Errors" After a Server Upgrade to 2009.2

« Go Back



After upgrading your Perforce server to 2009.2, you see "Excessive combinations of wildcard" messages when running p4 integrate or other commands.


This error message is the result of a fix implemented in the 2009.2 release of Perforce. From the P4D release notes:

#222817 (Bug #32962) **
   Some complex client views, when combined with other internally
   generated views create a map with more than 10 wild card
   combinations.  These may crash the server, or fail to match
   filepaths when they should. This change detects the overflow
   and returns an error.

The above fix prevents the server from crashing or hanging when the joining of the protections table and client or branch views generate too many permutations for the Perforce server to handle. Again, an error message is now issued in this case.

To eliminate the error, specify full directory paths rather than using the asterisk "*" or ellipsis "..." wildcard for intermediate directories in the protections table entries.  For example, the protection line below with an internal (not trailing) ellipsis wildcard:


might be expanded into three lines, to reduce computational complexity:


Even though this expansion produces a protections table with more lines, commands will likely run more efficiently and require less cpu and memory. The same approach should be applied to a client spec with complex view mapping.

Server Tunables

If path expansion is not a feasible, you can experiment with the "map.joinmax1" and "map.joinmax2" tunables.  By default, the Perforce Server map.joinmax1 value is set to 10,000 and the map.joinmax2 value is set to 1 million. The map.joinmax1 tunable sets the expanded wildcard limit to the expanded line count from the protections table, plus the line count of the expanded client view, and the map.joinmax1 setting. The map.joinmax2 setting is a hard limit, such that if the limit calculated from the map.joinmax1 setting is greater than map.joinmax2, then the map.joinmax2 value is used.

Dynamically changing map.joinmax2 values

One strategy for adjusting these settings is to increase map.joinmax2 to a very large value to effectively remove the hard limit, and then increase map.joinmax1 incrementally until your command completes. If your server appears to hang with 100% CPU utilization, then you will need to reduce the complexity of your protections.  NOTE: Due to risk of stack overflow, as of 2014.1 the effective max value for map.joinmax1 is 200,000.

To adjust the map.joinmax1 and map.joinmax2 variables, use the p4 configure set command.   For example,

           p4 configure set map.joinmax1=200000
           p4 configure set map.joinmax2=5M
           p4 configure show

The Perforce server does not need to be stopped, so this allows you to try multiple values until you find the value that works best.

The JoinCheck Utility

To assess the combinations of wildcards your configuration is producing, a Perforce staff developer has developed a utility, JoinCheck, located in our Public Depot. This utility reports on the join map size and the map line with the most wildcards.

The joincheck tool must be run as a Perforce super user using the syntax:

joincheck.exe [-b <branch> -c <client> -C <charset> -p <port> -u <user> -d -v] [ path ]   

JoinCheck output will look something like the following:

joincheck -b bruno_relOne_to_bruno_main -c bruno_ws -u bruno -p my_server:1666
     Joined map size: 235 lines
     Most wild line:  3 wildcards

An example of an integration using a branch specification that produced an "Excessive combinations of wildcard" error:

p4 integrate -b bruno_relOne_to_bruno_main
     Excessive combinations of wildcard ... in path and maps.

Checking this branch specification using joincheck reveals that the joined map is very large:

joincheck -b bruno_relOne_to_bruno_main -c bruno_ws -u bruno -p my_server:1666
     Joined map size: 1283 lines
     Most wild line:  4 wildcards  

Warning: When you run joincheck against a Unicode server, setting the -C option to utf16le-bom may crash the program.  To avoid this issue, please set the charset to utf8.

JoinCheck is available in 32-bit Windows, 64-bit Windows, 64-bit Linux, 32-bit Mac OSX 10.x and 64-bit Mac OSX 10.x binaries.


If you need a joincheck binary for other platforms, please contact Perforce support.

Related Links



Was this article helpful?



Please tell us how we can make this article more useful.

Characters Remaining: 255