Question: what episode does rin die?
Answer: naruto shippuden (episode 345) kakashi kills rin and obito goes insane.