rpm freezes on Redhat 9

This kind of thing is exactly why I dislike Redhat. Probably such problems have been fixed on more recent distributions, however if you encounter a stubborn freeze, try killing the stale locks with rm -f /var/lib/rpm/__db*.

Apparently it will happen after prolonged usage or under heavy load. Or if you mutter nasty things about Bob Young.