JuliaGPU / JuliaGPU/AMDGPU.jl

Invalid `Os::currentStackPtr()`

Open
#549 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
344
Forks
79
Avg merge
2d 19h
Merged PRs (30d)
25

Description

Debug HIP build triggers following assertion:

julia> using AMDGPU

julia> ROCArray{Float32}(undef, 4)

julia: /home/pxl-th/code/clr/rocclr/os/os_posix.cpp:310: static void amd::Os::currentStackInfo(unsigned char**, size_t*): Assertion `Os::currentStackPtr() >= *base - *size && Os::currentStackPtr() < *base && "just checking"' failed.

[14718] signal (6.-6): Aborted
in expression starting at REPL[4]:1
pthread_kill at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
raise at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
abort at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x7f21e1a2871a)
__assert_fail at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
currentStackInfo at /home/pxl-th/code/clr/rocclr/os/os_posix.cpp:310
HostThread at /home/pxl-th/code/clr/rocclr/thread/thread.cpp:34
hipGetDeviceCount at /home/pxl-th/code/clr/hipamd/src/hip_device_runtime.cpp:546
hipGetDeviceCount at /home/pxl-th/.julia/dev/AMDGPU/src/hip/libhip.jl:42 [inlined]
ndevices at /home/pxl-th/.julia/dev/AMDGPU/src/hip/device.jl:79 [inlined]
pool_cleanup at /home/pxl-th/.julia/dev/AMDGPU/src/runtime/memory/hip.jl:12
#3 at /home/pxl-th/.julia/dev/AMDGPU/src/runtime/memory/hip.jl:56
unknown function (ip: 0x7f21e10931d2)
_jl_invoke at /home/pxl-th/code/julia/src/gf.c:2873 [inlined]
ijl_apply_generic at /home/pxl-th/code/julia/src/gf.c:3074
jl_apply at /home/pxl-th/code/julia/src/julia.h:1976 [inlined]
start_task at /home/pxl-th/code/julia/src/task.c:1238
Allocations: 2003867 (Pool: 2002058; Big: 1809); GC: 3
Aborted (core dumped)

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

Start at rocclr/os/os_posix.cpp:310 and trace currentStackInfo/currentStackPtr through the call from hip_device_runtime.cpp:546. Reproduce with a debug HIP build using the Julia REPL commands shown, then inspect the AMDGPU call sites in src/hip/libhip.jl and src/hip/device.jl. Done means the ROCArray allocation no longer aborts on this assertion.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.