Segmentation Fault in Python

A code that fails and no further information is provided, is a situation of despair: no Traceback, no nothing. This is what a Segmentation Fault provides.

I was almost starting to questioning my career choice, while I was in a hurry for delivering a code ASAP and this catastrophe happens.
What a nightmare.

It happened while using MySQL connector for Python.
The reason: a Bug on version 8.0.8 where the connector crashes, if you have imported Python random library or if any component of your project has it on its implementation. In my case, I was using Python Client for Google PubSub, which has Python random library on its implementation.

To identify this all this scenario, it was only possible with faulthandler library:

Thanks to Cookie Monster's Answer on StackOverflow. Really helped.

I hope you might not face this situation too often.

Stay at home. Regards.

Mastodon