JuliaGPU / JuliaGPU/AMDGPU.jl

Segfault in libamdhip

Open
#216 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug hip
Dominant language
Julia
Stars
344
Forks
79
Avg merge
2d 23h
Merged PRs (30d)
27

Description

julia> a_d = ROCArray(a)
32-element ROCVector{Float64}:
free(): invalid pointer

signal (6): Aborted
in expression starting at none:0
gsignal at /usr/lib/libc.so.6 (unknown line)
abort at /usr/lib/libc.so.6 (unknown line)
__libc_message at /usr/lib/libc.so.6 (unknown line)
malloc_printerr at /usr/lib/libc.so.6 (unknown line)
_int_free at /usr/lib/libc.so.6 (unknown line)
cfree at /usr/lib/libc.so.6 (unknown line)
unknown function (ip: 0x7fb9316ce317)
unknown function (ip: 0x7fb9316cf7e7)
unknown function (ip: 0x7fb93167e30e)
unknown function (ip: 0x7fb93169426d)
unknown function (ip: 0x7fb93157c834)
__pthread_once_slow at /usr/lib/libpthread.so.0 (unknown line)
hipStreamSynchronize at /home/deck/.julia/artifacts/b5a35fe56035e3d95e3203689c38aafec324a861/hip/lib/libamdhip64.so (unknown line)
macro expansion at /home/deck/.julia/packages/AMDGPU/PtNLZ/src/hip/error.jl:149 [inlined]
hipStreamSynchronize at /home/deck/.julia/packages/AMDGPU/PtNLZ/src/hip/libhip.jl:2
wait! at /home/deck/.julia/packages/AMDGPU/PtNLZ/src/sync.jl:20
wait! at /home/deck/.julia/packages/AMDGPU/PtNLZ/src/array.jl:86 [inlined]
copyto! at /home/deck/.julia/packages/AMDGPU/PtNLZ/src/array.jl:182
copyto! at /home/deck/.julia/packages/GPUArrays/VNhDf/src/host/abstractarray.jl:95 [inlined]
copyto_axcheck! at ./abstractarray.jl:1104 [inlined]
Array at ./array.jl:563 [inlined]
Array at ./boot.jl:481 [inlined]
convert at ./array.jl:554 [inlined]
adapt_storage at /home/deck/.julia/packages/GPUArrays/VNhDf/src/host/abstractarray.jl:45 [inlined]
adapt_structure at /home/deck/.julia/packages/Adapt/wASZA/src/Adapt.jl:42 [inlined]
adapt at /home/deck/.julia/packages/Adapt/wASZA/src/Adapt.jl:40 [inlined]
print_array at /home/deck/.julia/packages/GPUArrays/VNhDf/src/host/abstractarray.jl:48 [inlined]
show at ./arrayshow.jl:396
unknown function (ip: 0x7fb9326da581)
julia> versioninfo()
Julia Version 1.7.2
Commit bf53498635 (2022-02-06 15:21 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: AMD Custom APU 0405
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, znver2)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce ROCArray(a) with Julia 1.7.2 and the reported ROCm environment, then trace the failure through src/array.jl, src/sync.jl, src/hip/error.jl, and src/hip/libhip.jl. Done means the conversion and subsequent hipStreamSynchronize complete without the reported invalid-pointer abort.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.