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

MPIR_PROCDESC is not visible in non-debug builds #4892

Closed
jjhursey opened this issue Mar 8, 2018 · 1 comment
Closed

MPIR_PROCDESC is not visible in non-debug builds #4892

jjhursey opened this issue Mar 8, 2018 · 1 comment

Comments

@jjhursey
Copy link
Member

jjhursey commented Mar 8, 2018

  • Impacts master, v3.0.x, and v3.1.x. The v2.x and v2.0.x series do not have this problem.
  • Must be built with --disable-debug.

Consider the following gdb script that we will run against an mpirun launching an MPI application.

shell$ cat gdb-test-cmd.txt 
echo MPIR_debug_state\n
p MPIR_debug_state

echo MPIR_proctable_size\n
p MPIR_proctable_size

echo MPIR_proctable (pointer)\n
p MPIR_proctable

echo MPIR_proctable (type info)\n
ptype MPIR_proctable

echo MPIR_proctable (contents)\n
p *MPIR_proctable@MPIR_proctable_size

On master with a --enable-debug build you can see the expected:

shell$ gdb --batch -x gdb-test-cmd.txt --pid `ps aux | grep mpirun | grep -v grep | awk '{print $2}'`[New LWP 92532]
[New LWP 92531]
[New LWP 92530]
[New LWP 92529]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
0x00003fff953dd5d8 in poll () from /lib64/libc.so.6
MPIR_debug_state
$1 = 1
MPIR_proctable_size
$2 = 2
MPIR_proctable (pointer)
$3 = (struct MPIR_PROCDESC *) 0x100081b59d0
MPIR_proctable (type info)
type = struct MPIR_PROCDESC {
    char *host_name;
    char *executable_name;
    int pid;
} *
MPIR_proctable (contents)
$4 = {{
    host_name = 0x100081b6a40 "n01", 
    executable_name = 0x100081b45b0 "/home/jjhursey/./hello_c", 
    pid = 92533
  }, {
    host_name = 0x100081b7bd0 "n01", 
    executable_name = 0x100080107f0 "/home/jjhursey/./hello_c", 
    pid = 92534
  }}

On master with a --disable-debug build the MPIR_PROCDESC structure is obscured so we cannot read the MPIR_proctable

shell$ gdb --batch -x gdb-test-cmd.txt --pid `ps aux | grep mpirun | grep -v grep | awk '{print $2}'`[New LWP 92409]
[New LWP 92408]
[New LWP 92407]
[New LWP 92406]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
0x00003fff799fd5d8 in poll () from /lib64/libc.so.6
MPIR_debug_state
$1 = 1
MPIR_proctable_size
$2 = 2
MPIR_proctable (pointer)
$3 = 635592864
MPIR_proctable (type info)
type = <data variable, no debug info>
MPIR_proctable (contents)
gdb-test-cmd.txt:14: Error in sourced command file:
Cannot access memory at address 0x25e260a0
@jjhursey
Copy link
Member Author

PRs have been merged. We can close this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant