In some cases, when a traffic light has an inductive loop sensor, it is possible to approach a traffic light prepared to make a movement (through or turning), only to find yourself sitting at a red signal for your movement for several traffic light cycles. This can either be due to incompatibility between your vehicle and the inductive loop sensor in the pavement that tells the traffic light that somebody wants that movement (a common problem for bicyclists and motorcyclists), or due to an outright failure of the sensor loop or controller.
Of course, notifying the local authorities (via a non-emergency means) of the issue is recommended, as they can't fix what they don't know is broken, but it may take hours or even days for a technician to show up to address a defective (not just incompatible) sensor or controller, and repairs could take longer yet, depending on the situation. So, in the meantime, what can/should a driver do about their predicament, keeping safety as the first priority?
I ran into this in a car in the USA, by the way, but as mentioned, cycles (manual or motored) are known to have compatibility issues with inductive loops, so answers for two-wheeled vehicles and other countries are welcome as well.