Facing malloc(): mismatching next->prev_size (unsorted) Aborted error while importing mesh file

I am trying to import a mesh file (created using GMSH python API) using dolfinx.io.gmshio.read_from_msh() function. This function was working fine when I used only two surfaces as physical groups in the mesh file. But when I am trying to load a mesh file with more than 2 physical groups, I am facing this error: malloc(): mismatching next->prev_size (unsorted) Aborted.
Can anyone help me with that? Thanks in advance.

Without having the actual script that generated the msh file, it is impossible to give any further guidance.

A similar error was resolved in: