Officials say the gunfire erupted as hundreds of prisoners tried a mass escape after government talks with the inmates broke down .