I can't imagine it has never come up before:
Someone sells their chometz before Pesach to a non-Jew. On Pesach the non-Jew dies. What happens now?
Mi Yodeya is a question and answer site for those who base their lives on Jewish law and tradition and anyone interested in learning more. It only takes a minute to sign up.Sign up to join this community
You would simply buy it back from his inheritors. For more information about how non-Jewish inheritance works, see this answer to a different question.
Rabbi Shlomo Kluger in Sefer HaElef Lecho Shlomo Siman 221 has a very similar question where the non Jew was taken prisoner over Pesach how to purchase back the Chometz. He proposes a way to purchase it back in front of Bais Din. I do not know if this same solution would apply to a case where the non Jew passed away.
If the non-Jew has children who knew about the sale, since according to Torah law a non-Jew inherits his father automatically - they just buy it back from the son. But if he had no children OR they didn't didn't know of the sale in which case the Chometz is Hefker then the Mahrsham permits the Chometz to be eaten after Pesach. All this is a synopsis of Teshuvos Mahrsham Vol. 6 Siman 26. Reprinted in Daas Torah Vol. 3 page 200