Skip to content

Parallel computation on multiple threads causes segfaults #111

Description

@wegank

It seems that AlgebraicSolving.jl (or msolve?) is not thread-safe, as computing multiple Gröbner basis simultaneously with multithreading almost always causes segmentation faults.

The following is a minimal example that causes segfaults in an interactive session with julia --threads auto. The failure is reproducible on both Linux and macOS, with the latest Julia version (1.12) installed.

using AlgebraicSolving

R, (x, y) = polynomial_ring(QQ, [:x, :y])
n = 100
v = [[x + y - i, 2 * x^2 + 2 * y^2 - i^2] for i in 1:n]
Threads.@threads for i in 1:n
    gb = groebner_basis(Ideal(v[i]))
    println(gb)
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions