I can’t open Keychain Access (the system keychain) to modify; it freezes when I try to open it. How can I fix this problem?
Keychain Access: Keychain First Aid
As you can open Keychain Access, first use its first aid to verify or repair:
As commented, it's also good to use Disk Utility to verify or repair permissions. Also (not specific to this question) take the opportunity to verify the integrity of your startup volume.