General fault diagnosis