Skip to content

[v6.0.x] ompi/rte: Increase job name printing buffer size - #14402

Merged
hppritcha merged 1 commit into
v6.0.xfrom
backport/pr-14398-to-v6.0.x
Sep 10, 2026
Merged

hppritcha merged 1 commit into
v6.0.xfrom
backport/pr-14398-to-v6.0.x

Conversation

@ompi-backport-bot

Copy link
Copy Markdown

Backport of #14398 to v6.0.x.


ompi_pmix_print_id may try to print a string longer than 50 bytes onto the print name buffer:

snprintf(ptr->buffers[ptr->cntr++],
OPAL_PRINT_NAME_ARGS_MAX_SIZE,
"%s.%u", procid->nspace, procid->rank);

nspace defaults to singleton.{hostname}.{pid} (hostname alone can be as long as 64 bytes.) on singleton process, and can be as long as PMIX_MAX_NSLEN. A truncated id causes mismatch and resulted in MPI_Comm_spawn returning MPI_ERR_UNKNOWN.

This PR bumps the buffer size to be enough to hold any ID.

Also fix a size calculation issue:

The functions snprintf() and vsnprintf() write at most size bytes
(including the terminating null byte ('\0')) to str.

so OPAL_PRINT_NAME_ARGS_MAX_SIZE + 1 is not needed.

Signed-off-by: Yuan Tong <[email protected]>
(cherry picked from commit 6d83fe4)
@ompi-backport-bot ompi-backport-bot Bot added the target:v6.0.x Backport targeting the v6.0.x branch label Sep 8, 2026
@github-actions github-actions Bot added this to the v6.0.0 milestone Sep 8, 2026
@hppritcha
hppritcha merged commit 8289f4a into v6.0.x Sep 10, 2026
28 of 32 checks passed
@hppritcha
hppritcha deleted the backport/pr-14398-to-v6.0.x branch September 10, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Target: v6.0.x target:v6.0.x Backport targeting the v6.0.x branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants