What exactly occurs when a gearbox malfunctions? Could you elaborate on the potential consequences and the mechanisms behind such a failure? Are there any warning signs that precede a gearbox breakdown? How does it impact the overall performance of the system it's a part of? Additionally, what steps should be taken to prevent or mitigate the effects of a gearbox failure?