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

gdb stuck in MPI_Init #3428

Closed
masterleinad opened this issue Aug 1, 2018 · 3 comments
Closed

gdb stuck in MPI_Init #3428

masterleinad opened this issue Aug 1, 2018 · 3 comments

Comments

@masterleinad
Copy link

  • Your Windows build number: Microsoft Windows [Version 10.0.16299.371]

  • What you're doing and what's happening:

Using the Debian GNU/Linux app running the simple program

#include <mpi.h>

int main(int argc, char *argv[])
{
  MPI_Init(&argc, &argv);
  MPI_Finalize();
}

gdb is stuck in MPI_Init. The gdb version is GNU gdb (Debian 8.1-4) 8.1 and

$ mpicxx -v

gives

Using built-in specs.
COLLECT_GCC=/usr/bin/g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 8.2.0-1' --with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-8 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 8.2.0 (Debian 8.2.0-1)
  • What's wrong / what should be happening instead:
    gdb should have no issues stepping through the program.
@onomatopellan
Copy link

I can't reproduce this on build 17134. Can you upgrade your Windows 10 and try again?

GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from a.out...(no debugging symbols found)...done.
(gdb) b main
Breakpoint 1 at 0x7e4
(gdb) r
Starting program: /home/onoma/test/a.out
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Breakpoint 1, 0x00000000080007e4 in main ()
(gdb) s
Single stepping until exit from function main,
which has no line number information.
[New Thread 0x7ffffc150700 (LWP 508)]
[New Thread 0x7ffffb940700 (LWP 509)]
[Thread 0x7ffffb940700 (LWP 509) exited]
[Thread 0x7ffffc150700 (LWP 508) exited]
__libc_start_main (main=0x80007e0 <main>, argc=1, argv=0x7ffffffee468, init=<optimized out>, fini=<optimized out>,
    rtld_fini=<optimized out>, stack_end=0x7ffffffee458) at ../csu/libc-start.c:325
325     ../csu/libc-start.c: No such file or directory.
(gdb) s
__GI_exit (status=0) at exit.c:105
105     exit.c: No such file or directory.
(gdb)

@therealkenc
Copy link
Collaborator

[Version 10.0.16299.371]

Yeah almost certainly addressed with the gdb fixes since then. Maybe #2333 addressed in 17017. Try 1803 aka 17134 aka RS4 aka April 2018 Update. If the problem persists ping this issue and we can revisit.

@masterleinad
Copy link
Author

Yes, after upgrading the code runs as expected in gdb. Thanks!

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

No branches or pull requests

3 participants