If you see an entry in the cachebuilder log that says: "Building Maps" (This may or may not be followed by an error reading "An item with the same key has already been added") and then the cachebuilder restarts, you've got a duplicate user entry.
Run this script:
WITH cte AS (
  SELECT u.Id, u.Domain, u.UserName, u.DisplayName, u.DistinguishedName,
    rn = Row_number() OVER(partition BY u.UserName, u.Domain ORDER BY u.UserName, u.Domain),
    [ROWCOUNT] = COUNT(*) OVER (PARTITION BY u.UserName, u.Domain)
  FROM CI$User u
)Â
SELECT * FROM cte WHERE [ROWCOUNT] > 1;
WITH cteB AS (
  SELECT u.Id, u.Domain, u.UserName, u.DisplayName, u.DistinguishedName,
    rn = Row_number() OVER(partition BY u.UserName, u.Domain ORDER BY u.UserName, u.Domain),
    [ROWCOUNT] = COUNT(*) OVER (PARTITION BY u.UserName, u.Domain)
  FROM CI$DomainGroup u
)Â
SELECT * FROM cteB WHERE [ROWCOUNT] > 1
Then for each user returned, look them up in the SCSM Console and delete one of them (one will be a duplicate).
Once you've done that for each duplicate, go to the Deleted Items view in Administration in the SCSM Console, and remove the deleted users from that view as well.
Finally, run these queries against the ServiceManagement database:
TRUNCATE TABLE LastModified
TRUNCATE TABLE CI$User
TRUNCATE TABLE CI$DomainGroup
Restart the cachebuilder, and the error should be resolved.
Â