https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121392

--- Comment #4 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
The is one additional strange thing: as I reported elsewhere, the newlib patch
generally resolves the issue, but on one of our two AMD gfx90a systems, when
running 'libgomp.c/simd-math-1.c' with 'HSA_XNACK=1', it hangs, for example, in
4 out of 13 runs, and when SIGINTed, always produces a backtrace similar to:

    (gdb) r
    Starting program: [...]/simd-math-1.exe 
    [...]
    ^C
    Thread 1 "simd-math-1.exe" received signal SIGINT, Interrupt.
    __GI___ioctl (fd=3, request=3222817548) at
../sysdeps/unix/sysv/linux/ioctl.c:36
    36  ../sysdeps/unix/sysv/linux/ioctl.c: No such file or directory.
    (gdb) bt
    [...]
    #6  0x00007ffff786a699 in ?? () from /opt/rocm/lib/libhsa-runtime64.so.1
    #7  0x00007ffff7e5d1cb in run_kernel (kernel=kernel@entry=0x99af00,
vars=vars@entry=0x7ffef4200000, kla=<optimized out>, aq=aq@entry=0x0,
module_locked=module_locked@entry=false) at
[...]/source-gcc/libgomp/plugin/plugin-gcn.c:2382
    #8  0x00007ffff7e63aa5 in GOMP_OFFLOAD_run (device=<optimized out>,
fn_ptr=0x99af00, vars=0x7ffef4200000, args=0x7fffffffa9d0) at
[...]/source-gcc/libgomp/plugin/plugin-gcn.c:4933
    #9  0x00007ffff7ea5c05 in GOMP_target_ext (device=device@entry=-1,
fn=fn@entry=0x40aeb0 <test_fmod.88._omp_fn.0>, mapnum=mapnum@entry=3,
hostaddrs=hostaddrs@entry=0x7fffffffab00, sizes=sizes@entry=0x59e440
<omp_data_sizes.992>, kinds=kinds@entry=0x59e430 <omp_data_kinds.993>,
flags=<optimized out>, depend=<optimized out>, args=<optimized out>) at
[...]/source-gcc/libgomp/target.c:3358
    #10 0x000000000040b19d in test_fmod () at
../source-gcc/libgomp/testsuite/libgomp.c/simd-math-1.c:200
    #11 0x00000000004024f9 in main () at
../source-gcc/libgomp/testsuite/libgomp.c/simd-math-1.c:200

Note that this again points to 'fmod'?  But why only for 'HSA_XNACK=1' but not
without, and why only on one of the two gfx90a systems but not the other? 
(Nothing in 'dmesg'.)

Reply via email to