Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navi 3 causes malloc(): unsorted double linked list corrupted #518

Closed
pxl-th opened this issue Oct 15, 2023 · 1 comment
Closed

Navi 3 causes malloc(): unsorted double linked list corrupted #518

pxl-th opened this issue Oct 15, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@pxl-th
Copy link
Member

pxl-th commented Oct 15, 2023

Running following MWE with Navi 3 as a target and --check-bounds=yes causes:

malloc(): unsorted double linked list corrupted

[5481] signal (6.-6): Aborted
in expression starting at /home/pxl-th/.julia/dev/t.jl:42

After this the process just stalls until you kill it.

ASAN Julia build does not reproduce it.
This happens a lot when running tests at random places.
However in the following MWE it happens consistently at a random loop iteration.

This is on Julia 1.10-beta3 and ROCm 5.6 mixed-mode.

MWE:

using AMDGPU
using GPUCompiler

const eltypes = (
    Int16, Int32, Int64,
    Float16, Float32, Float64,
    ComplexF16, ComplexF32, ComplexF64,
    Complex{Int16}, Complex{Int32}, Complex{Int64})

function ker(Rreduce, As)
    ireduce = workitemIdx().x
    while ireduce  1
        Ireduce = Rreduce[ireduce]
        As[Ireduce]
        ireduce += 1
    end
    return
end

struct CompilerParams <: AbstractCompilerParams end

function main()
    target = GCNCompilerTarget(; dev_isa="gfx1100")
    config = CompilerConfig(target, AMDGPU.Compiler.HIPCompilerParams();
        kernel=true, always_inline=true)

    for ET in eltypes
        Core.println(ET)
        tt = Tuple{
            CartesianIndices{3, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}, Base.OneTo{Int64}}},
            Base.Broadcast.Broadcasted{
                Nothing,
                Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}, Base.OneTo{Int64}},
                typeof(isequal),
                Tuple{ROCDeviceArray{ET, 3, 1}, ROCDeviceArray{ET, 3, 1}}},
        }
        source = methodinstance(typeof(ker), tt)
        job = CompilerJob(source, config)
        sprint(io -> GPUCompiler.code_native(io, job))
    end
end
main()
@pxl-th
Copy link
Member Author

pxl-th commented Oct 17, 2023

Fixed by JuliaLang/llvm-project#21

@pxl-th pxl-th closed this as completed Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant