Skip to content

Crash on Windows when explicitly setting number of threads #306

Open
@ludvigak

Description

@ludvigak

Related to the FINUFFT.jl issue ludvigak/FINUFFT.jl#61 we have boiled down that the following code causes a crash running on Windows with Julia v1.10.4 and FFTW v1.8.0, but only when explicitly setting the thread count in julia using --threads.

using FFTW
FFTW.set_num_threads(6)
data = rand(ComplexF32, 64)
for i in 1:10000
    @show i
    fft(data)
end

e.g. running julia --threads=8 fftwcrash.jl gives the following output, although the number of iterations before the crash varies from run to run

[...]
i = 967

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x63975556 -- .text at C:\Users\me\.julia\artifacts\b7dd1809d0626eac3bf6f97ba8ccfbb6cc63c509\bin\libfftw3f-3.dll (unknown line)
in expression starting at C:\Users\me\fftwcrash.jl:4
.text at C:\Users\me\.julia\artifacts\b7dd1809d0626eac3bf6f97ba8ccfbb6cc63c509\bin\libfftw3f-3.dll (unknown line)
#2 at C:\Users\me\.julia\packages\FFTW\6nZei\src\providers.jl:58
unknown function (ip: 0000018d5b11139b)
jl_apply at C:/workdir/src\julia.h:1982 [inlined]
start_task at C:/workdir/src\task.c:1238
Allocations: 2908 (Pool: 2900; Big: 8); GC: 0

Results do vary with other choices of array length and arguments to set_num_threads and --threads, but the above combination consistently crashes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions