Skip to content

Segmentation faults — tracking issue #451

@dmontagu

Description

@dmontagu

I'm creating this issue to track segmentation fault issues that we have run into while working on pydantic or pydantic-core.

Obviously it is a major problem if users are at risk of hitting segmentation faults thanks to using pydantic. So far it seems that when we've hit segmentation faults during development, other potential culprits have been at least tangentially involved, but we should keep an eye out for patterns in case there is anything we can do to minimize the potential for this.

Some cases where we've had segmentation faults:

  • pydantic: MacOS/PyPy 3.9 — note that the segmentation fault is hit very early, potentially before any pydantic_core code has been executed?
  • pydantic-core: CPython3.7 with nightly Rust, and again -- note this appears to have happened after the tests finished running but not before the final testing report was generated
  • Running code in the pycharm debugger — I have frequently had issues where the mere presence of debug points in certain locations in pydantic-internal code has caused a segfault to occur until I moved the debug point/points. (Usually I can get to the line I wanted to break by moving the debug point appropriately and manually stepping, but not always.)

Please add comments on this issue if you run into any new sources of segmentation fault, or discover new patterns in their occurrence, so we can investigate and resolve any issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions