gdb hang on osx

175 views
Skip to first unread message

Andy Fan

unread,
Dec 11, 2017, 10:28:14 PM12/11/17
to mongodb-dev
I download the mongodb source code and compile it with scons --nostrip mongod option, then mongod ./mongod,  it looks hang forever at Reading symbols from /Users/zhifan/github/mongo/mongod... stage. 

when I dtruss it, I get the following output all the time

```
sigaction(0x8, 0x7FFF5FBFF018, 0x7FFF5FBFF040)       = 0 0
sigreturn(0x7FFF5FBFF508, 0x1E, 0x7FFF5FBFF040)      = 0 Err#-2
write(0xF, "\0", 0x1)        = -1 Err#35
sigaction(0x8, 0x7FFF5FBFF018, 0x7FFF5FBFF040)       = 0 0
sigreturn(0x7FFF5FBFF508, 0x1E, 0x7FFF5FBFF040)      = 0 Err#-2
write(0xF, "\0", 0x1)        = -1 Err#35
```

My env:

```
LM-SHC-16502651:~ zhifan$ uname -a
Darwin LM-SHC-16502651 16.7.0 Darwin Kernel Version 16.7.0: Wed Oct  4 00:17:00 PDT 2017; root:xnu-3789.71.6~1/RELEASE_X86_64 x86_64

LM-SHC-16502651:~ zhifan$ clang -v
Apple LLVM version 9.0.0 (clang-900.0.38)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
LM-SHC-16502651:~ zhifan$ gcc -v
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.38)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
LM-SHC-16502651:~ zhifan$ gdb -v
GNU gdb (GDB) 8.0.1
Copyright (C) 2017 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-apple-darwin16.7.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:
For help, type "help".
Type "apropos word" to search for commands related to "word".
```

could anyone help on this?

Andrew Morrow

unread,
Dec 12, 2017, 11:12:23 AM12/12/17
to mongodb-dev

Hi -

GDB doesn't work very well on modern macOS. Try lldb and see if you have better results?

Thanks,
Andrew


--
You received this message because you are subscribed to the Google Groups "mongodb-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-dev+unsubscribe@googlegroups.com.
To post to this group, send email to mongo...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-dev.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-dev/a44d18e7-e038-43c7-820f-247f5d7a92eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andy Fan

unread,
Dec 12, 2017, 9:48:21 PM12/12/17
to mongodb-dev
Thanks, Andrew.   I will try that. 
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-dev...@googlegroups.com.

Andy Fan

unread,
Dec 26, 2017, 7:33:59 PM12/26/17
to mongodb-dev
finally, I go to Ubuntu 16, and everything goes well then.  
Reply all
Reply to author
Forward
0 new messages