Update to 5.29.0 get frozen
We got this on one of the db upgrades. For us, it was due to few entries in civicrm_relationship table which were attached to permanently deleted contact ids. You can follow the below steps to complete the upgrade process.

Take a separate back up for civicrm_relationship table.

Check invalid entries using -
select id 
from civicrm_relationship 
where contact_id_a not in (select id from civicrm_contact) OR contact_id_b  not in (select id from civicrm_contact)


Delete these rows
delete from civicrm_relationship 
where contact_id_a not in (select id from civicrm_contact) OR contact_id_b  not in (select id from civicrm_contact)



Complete the upgrade process. Hope that works.