[Chapel Merge] Call init_ofiFabricDomain from chpl_comm_post_mem_

Branch: refs/heads/main
Revision: d7dff0e
Author: jhh67
Link: Call init_ofiFabricDomain from chpl_comm_post_mem_init by jhh67 · Pull Request #19525 · chapel-lang/chapel · GitHub
Log Message:

Merge pull request #19525 from jhh67/T3193

Call init_ofiFabricDomain from chpl_comm_post_mem_init

Previously init_ofiFabricDomain was called by init_ofi which is called by chpl_comm_post_task_init. This led to seg faults with the verbs provider because its implementation of fi_domain patches memory-related system calls, causing threads that were already using those system calls to seg fault. Calling init_ofiFabricDomain from chpl_comm_post_mem_init eliminates the problem because the worker threads have not yet been created, avoiding the race.

Reviewed by @gbtitus and @ronawho.

Modified Files:
M runtime/include/chpl-tasks.h

M runtime/include/tasks/qthreads/chpl-tasks-impl-fns.h
M runtime/src/comm/ofi/comm-ofi.c
M runtime/src/tasks/qthreads/tasks-qthreads.c

Compare: https://github.com/chapel-lang/chapel/compare/f0d209e0044e...d7dff0eb957b