Some jurisdictions may have laws that specifically address this situation. For example, in Colorado, CRS 42-4-612 says:
Whenever a driver approaches an intersection and faces a traffic control signal which is inoperative or which remains on steady red or steady yellow during several time cycles, the rules controlling entrance to a through street or highway from a stop street or highway, as provided under section 42-4-703 , shall apply until a police officer assumes control of traffic or until normal operation is resumed.
Which basically means, come to a complete stop and yield to cross traffic, proceeding only when it is clear.
So you may want to try to look up the law in your jurisdiction.
As another alternative, in some places, and in particular in nearly all of the US, it is legal to make a right turn on a red light. So if you’re in such a place, and there is no sign forbidding it, and there is a road to your right, you can simply turn right and then find a different route to your destination.
Otherwise, if you have a phone, I would try to call the police. If traffic is backing up at the intersection, or you see other drivers doing unsafe maneuvers to get out, I would say it’s justified to use the emergency number (112/911/999/etc). They could send an officer to manually direct traffic, or at least to shut off the signal so that it is equivalent to an all-way stop. That should be much faster than the hours or days that might be needed to make complete repairs.