SharePoint 2010 : Exception: Microsoft.SharePoint.Administration.SPUpdatedConcurrencyException

After applying a cumulative update\ service pack on SharePoint Servers when we run psconfig.exe -cmd upgrade -inplace b2b –wait -force it fails on step 3 with the error message

"Exception: Microsoft.SharePoint.Administration.SPUpdatedConcurrencyException: An update conflict has occurred, and you must re-try this action. The object SPUpgradeSession Name=Upgrade-20110604-023550-824 was updated by Topgear\administrator, in the PSCONFIG (4272) process, on machine SharePoint2010. View the tracing log for more information about the conflict"

Resolution:

Open command prompt on the SharePoint Server (Run as Administrator)

Navigate to following location

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Bin

Execute:

stsadm -o setproperty -pn command-line-upgrade-running -pv Yes

Note: Running the above command on the SharePoint server will reset the command-line-upgrade-running property where an upgrade process stopped responding. Also, this command needs to be executed on each SharePoint Servers in the farm after the upgrade completes successfully on first server

Later, execute following to initiate the upgrade process again.

psconfig.exe -cmd upgrade -inplace b2b –wait –force

Note: If the upgrade fails with any errors re-view the upgrade.log file as it would contain detailed information to troubleshoot.