Skip to content

MPIR_proctable external variable not accessible in gdb in v4.0.6rc #8563

Closed
@louisespellacy-arm

Description

@louisespellacy-arm

Thank you for taking the time to submit an issue!

Background information

What version of Open MPI are you using? (e.g., v3.0.5, v4.0.2, git branch name and hash, etc.)

v4.0.6rc2

Describe how Open MPI was installed (e.g., from a source/distribution tarball, from a git clone, from an operating system distribution package, etc.)

From openmpi-v4.0.6rc2 tar gz with GCC 8.3.0 or 10.2.0 or PGI 20.1.

Please describe the system on which you are running

  • Operating system/version: Ubuntu 18.04
  • Computer hardware: x86_64
  • Network type: self

Details of the problem

Following changes made in #7757, MPIR_proctable is not accessible via gdb.

gdb --quiet --ex start --ex "set MPIR_being_debugged=1" --ex "break MPIR_Breakpoint" --ex "continue" --ex "print MPIR_proctable_size" --ex "print MPIR_proctable" --ex "output (*MPIR_proctable)@4" --args mpirun -n 4 ./a.out

// with openmpi 4.0.5
(gdb) print MPIR_proctable_size
$1 = 4
(gdb) print MPIR_proctable
$2 = (struct MPIR_PROCDESC *) 0x721ca0
(gdb) output (*MPIR_proctable)@4
{{host_name = 0x71f7c0 "mycomputer", executable_name = 0x72aa50 "/home/louspe01/test_dir/./a.out", 
    pid = 13804}, {host_name = 0x720fc0 "mycomputer", 
    executable_name = 0x72aa80 "/home/louspe01/test_dir/./a.out", pid = 13805}, {
    host_name = 0x72bf70 "mycomputer", executable_name = 0x721d10 "/home/louspe01/test_dir/./a.out", 
    pid = 13806}, {host_name = 0x72bea0 "mycomputer", 
    executable_name = 0x72b850 "/home/louspe01/test_dir/./a.out", pid = 13807}}

//with openmpi 4.0.6rc2
(gdb) print MPIR_proctable_size
$1 = 4
(gdb) print MPIR_proctable
$2 = (struct MPIR_PROCDESC *) 0x754690
(gdb) output (*MPIR_proctable)@4
0x754690

When comparing the DWARF output, the symbols for MPIR_proctable were previously found in libopen-rte.so with the following entries:

 <1><697c>: Abbrev Number: 53 (DW_TAG_variable)
    <697d>   DW_AT_name        : (indirect string, offset: 0x40ed): MPIR_proctable
    <6981>   DW_AT_decl_file   : 1
    <6982>   DW_AT_decl_line   : 162
    <6983>   DW_AT_decl_column : 23
    <6984>   DW_AT_type        : <0x6992>
    <6988>   DW_AT_external    : 1
    <6988>   DW_AT_location    : 9 byte block: 3 90 79 2b 0 0 0 0 0     (DW_OP_addr: 2b7990)

However, the symbols are now in libopen-orted-mpir.so as expected from change #7757 but they are all marked as external:

 <1><2f0e>: Abbrev Number: 24 (DW_TAG_variable)
    <2f0f>   DW_AT_name        : (indirect string, offset: 0x2791): MPIR_proctable
    <2f13>   DW_AT_decl_file   : 63
    <2f14>   DW_AT_decl_line   : 21
    <2f15>   DW_AT_decl_column : 30
    <2f16>   DW_AT_type        : <0x2f1a>
    <2f1a>   DW_AT_external    : 1
    <2f1a>   DW_AT_declaration : 1

The resulting behaviour is that the values in the MPIR_proctable are not queriable in gdb.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions