Skip to content
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

v3.1.x: Fix case where debuggers cannot read the MPIR proctable. #8572

Merged
merged 1 commit into from
Mar 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions orte/orted/orted-mpir/orted_mpir.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,27 @@ BEGIN_C_DECLS
#define MPIR_MAX_PATH_LENGTH 512
#define MPIR_MAX_ARG_LENGTH 1024


/* Note to future MPIR maintainers:
*
* This struct MUST (along with all other MPIR_* symbols) be declared
* and defined in this file. Otherwise they may be compiled *without* -g
* and *with* optimizations in production. In the case where they are
* not here, the debugger won't have the complete definition of the proctable.
* This will prevent the debugger from reading it properly.
*
* It also needs to be seen by multiple files (orted_submih.c and
* orted_mpir_breakpoint.c), so this is a better place for it anyway.
*
* For more info/discussion on this, see the following github issue:
* https://github.com/open-mpi/ompi/issues/8563
*/
struct MPIR_PROCDESC {
char *host_name; /* something that can be passed to inet_addr */
char *executable_name; /* name of binary */
int pid; /* process pid */
};

extern struct MPIR_PROCDESC *MPIR_proctable;
extern int MPIR_proctable_size;
extern volatile int MPIR_being_debugged;
Expand Down
7 changes: 0 additions & 7 deletions orte/orted/orted_submit.c
Original file line number Diff line number Diff line change
Expand Up @@ -2207,13 +2207,6 @@ static void complete_recv(int status, orte_process_name_t* sender,
#define DUMP_INT(X) fprintf(stderr, " %s = %d\n", # X, X);
#define FILE_MODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)

struct MPIR_PROCDESC {
char *host_name; /* something that can be passed to inet_addr */
char *executable_name; /* name of binary */
int pid; /* process pid */
};


/**
* Initialization of data structures for running under a debugger
* using the MPICH/TotalView parallel debugger interface. Before the
Expand Down