Add-on - open_mainfile() always leads to segmentation fault
Threading is not supported in Blender.
So I changed it to:
import bpy
def test():
    bpy.ops.wm.open_mainfile(filepath=bpy.data.filepath)
    return -1.0
bpy.app.timers.register(test)

But this also wasn't working. Version 2.91.0 Alpha has already a commit fixing this bug.
You can check committed notes here: https://developer.blender.org/T80028