I was caught by this when upgrading CentOS servers from 5.2 to 5.3. Should make it a habit to atleast read the release notes!!
When upgrading from an earlier version of Red Hat
Enterprise Linux to 5.3, you may encounter the following
error:Updating : mypackage ################### [
472/1655]rpmdb: unable to lock mutex: Invalid argumentThe cause of the locking issue is that the shared futex
locking in glibc was enhanced with per-process futexes
between 5.2 and 5.3. As a result, programs running against
the 5.2 glibc can not properly perform shared futex locking
against programs running with the 5.3 glibc.This particular error message is a side effect of a package
calling rpm as part of its install scripts. The rpm
instance performing the upgrade is using the prior glibc
throughout the upgrade, but the rpm instance launched from
within the script is using the new glibc.To avoid this error, upgrade glibc first in a separate run,
ie# yum update glibc
# yum updateYou will also see this error if you downgrade glibc to an
earlier version on an installed 5.3 system.