Skip to content

Commit

Permalink
prov/shm: Print shm name and error code when failed to open
Browse files Browse the repository at this point in the history
This help debugging issues when the two sides don't agree on the
naming convention. For example, in fabtests, if one side forgets
to use the '-s <node-name>' option, shm objects it creates may lack
the node-name prefix, while the peer may try to open with the prefix.

Cherry-picked from commit a955a51

Signed-off-by: Jianxin Xiong <[email protected]>
  • Loading branch information
j-xiong authored and aingerson committed Mar 18, 2024
1 parent b8849e9 commit 9bc355c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion prov/shm/src/smr_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,8 @@ int smr_map_to_region(const struct fi_provider *prov, struct smr_map *map,

fd = shm_open(name, O_RDWR, S_IRUSR | S_IWUSR);
if (fd < 0) {
FI_WARN_ONCE(prov, FI_LOG_AV, "shm_open error\n");
FI_WARN_ONCE(prov, FI_LOG_AV,
"shm_open error: name %s errno %d\n", name, errno);
return -errno;
}

Expand Down

0 comments on commit 9bc355c

Please sign in to comment.