Skip to content

v4.1.x: Fix case where debuggers cannot read the MPIR proctable. #8571

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 15, 2021

Conversation

awlauria
Copy link
Contributor

@awlauria awlauria commented Mar 9, 2021

Make sure the definition of the MPIR_Proctable
is in a header file that is included in the file
orted_mpir_breakpoint.c, which is compiled with -g
and compiled without optimizations.

Otherwise, the debugger (such as gdb) won't know
the complete definition of the proctable, preventing
it from being able to read it.

Since the MPIR_proctable should be accessed from
orted_submit.c and orted_mpir_breakpoint.c, move it
to the mpir_orted.h header file.

See issue: #8563

Signed-off-by: Austen Lauria [email protected]
(cherry picked from commit a71fbaf)

Fixes #8563

@awlauria awlauria changed the title Fix MPIR regression with extern MPIR_proctable. v4.1.x: Fix MPIR regression with extern MPIR_proctable. Mar 9, 2021
@awlauria awlauria linked an issue Mar 9, 2021 that may be closed by this pull request
Copy link
Member

@jsquyres jsquyres left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commit message does not explain why the change fixes the problem.

I'm sorry to harp on this, and I realize that the user says that this fixes the issue for them, but I do not understand why moving extern struct foo *bar; from a .h file to a .c file changes anything in the emitted .o file.

I worry that we're not actually fixing the problem, but just somehow changing the symptom of a different / underlying issue.

Clearly, I'm missing something. If the change is correct but the implication of this change is subtle, please explain it in a comment in the code and/or in the commit message. Thanks!

Also, my new git commit checker CI should have failed because the cited cherry-pick commit doesn't exist on anywhere in the repo yet. 😦 I'll investigate that separately.

Make sure the definition of the MPIR_Proctable
is in a header file that is included in the file
orted_mpir_breakpoint.c, which is compiled with -g
and compiled without optimizations.

Otherwise, the debugger (such as gdb) won't know
the complete definition of the proctable, preventing
it from being able to read it.

Since the MPIR_proctable should be accessed from
orted_submit.c and orted_mpir_breakpoint.c, move it
to the mpir_orted.h header file.

See issue: open-mpi#8563

Signed-off-by: Austen Lauria <[email protected]>
(cherry picked from commit a71fbaf)
@awlauria awlauria changed the title v4.1.x: Fix MPIR regression with extern MPIR_proctable. v4.1.x: Fix case where debuggers cannot read the MPIR proctable. Mar 15, 2021
@awlauria
Copy link
Contributor Author

Updated the PR.

@jsquyres jsquyres added this to the v4.1.1 milestone Mar 15, 2021
@jsquyres jsquyres merged commit 7667614 into open-mpi:v4.1.x Mar 15, 2021
@awlauria awlauria deleted the mpir_fix_v4.1 branch March 16, 2021 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MPIR_proctable external variable not accessible in gdb in v4.0.6rc
3 participants