One instance that crosses my mind often is the airbus a320 incident at Hamburg in 2008. Everything was done right there, but the requirements were wrong.
Despite all the procedures and tests, the software still managed to endanger the lives of the passengers.