mongo 2.2.0 seg fault

153 views
Skip to first unread message

Valentin Kuznetsov

unread,
Sep 7, 2012, 7:58:54 AM9/7/12
to mongod...@googlegroups.com
Hi,
I downloaded new release (2.2.0) and built it on our system (we use our own version of compiler). The system is Scientific Linux 5, 64 bit and we use gcc 4.6.1. Once I got executable and I was able to start mongod, but mongo crashed with seg fault. Here is the output

valya@vo106(23:49:08)> mongo --port 8230
MongoDB shell version: 2.2.0
Thu Sep  6 23:49:12 mongo got signal 11 (Segmentation fault), stack trace: 

Thu Sep  6 23:49:12 0x493733 0x40d824 0x38142302f0 0x40fb08 0x41b9ce 0x381421d994 0x40be09 
 mongo [0x493733]
 mongo [0x40d824]
 /lib64/libc.so.6 [0x38142302f0]
 mongo [0x40fb08]
 mongo [0x41b9ce]
 /lib64/libc.so.6(__libc_start_main+0xf4) [0x381421d994]
 mongo [0x40be09]

valya@vo106(23:49:12)> ps auxwww | grep mongo
valya    29900  3.0  0.1 131532 29796 ?        Sl   23:46   0:04 mongod --fork --dbpath=/tmp/valya/mongodb/db/ --port 8230 --nohttpinterface --logpath /tmp/valya/mongodb/logs/mongodb.log
valya    29936  0.0  0.0  59196   780 pts/1    S+   23:49   0:00 grep mongo
valya@vocms106(23:49:37)> tail /tmp/valya/mongodb/logs/mongodb.log
Thu Sep  6 23:46:59 [initandlisten] preallocateIsFaster=true 7.62
Thu Sep  6 23:47:00 [initandlisten] preallocateIsFaster=true 8.02
Thu Sep  6 23:47:01 [initandlisten] preallocateIsFaster=true 7.88
Thu Sep  6 23:47:01 [initandlisten] preallocating a journal file /tmp/valya/mongodb/db/journal/prealloc.0
Thu Sep  6 23:47:34 [initandlisten] preallocating a journal file /tmp/valya/mongodb/db/journal/prealloc.1
Thu Sep  6 23:48:08 [initandlisten] preallocating a journal file /tmp/valya/mongodb/db/journal/prealloc.2
Thu Sep  6 23:48:12 [initandlisten]             230686720/1073741824    21%
Thu Sep  6 23:48:15 [initandlisten]             356515840/1073741824    33%
Thu Sep  6 23:48:20 [initandlisten]             1006632960/1073741824   93%
Thu Sep  6 23:48:44 [initandlisten] waiting for connections on port 8230

valya@vo106(23:52:24)> ldd /build/vk/build_stuff/w/slc5_amd64_gcc461/external/mongo/2.2.0/bin/mongo
        linux-vdso.so.1 =>  (0x00007fff7b1fd000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003814a00000)
        librt.so.1 => /lib64/librt.so.1 (0x0000003815600000)
        libstdc++.so.6 => /build/vk/build_stuff/w/slc5_amd64_gcc461/external/gcc/4.6.1-comp2/lib64/libstdc++.so.6 (0x00002b451d0ab000)
        libm.so.6 => /lib64/libm.so.6 (0x0000003814e00000)
        libgcc_s.so.1 => /build/vk/build_stuff/w/slc5_amd64_gcc461/external/gcc/4.6.1-comp2/lib64/libgcc_s.so.1 (0x00002b451d1b8000)
        libc.so.6 => /lib64/libc.so.6 (0x0000003814200000)
        /lib64/ld-linux-x86-64.so.2 (0x0000003813e00000)

Any idea?
Thanks
Valentin.

gregor

unread,
Sep 7, 2012, 9:43:54 AM9/7/12
to mongod...@googlegroups.com
Are you able to see with gdb where in the code it has crashed?

Valentin Kuznetsov

unread,
Sep 7, 2012, 10:16:07 AM9/7/12
to mongod...@googlegroups.com
Here is gdb output and I'm still investigating.

GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-42.el5)
Copyright (C) 2009 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-redhat-linux-gnu".
For bug reporting instructions, please see:
Reading symbols from /build/vk/build_stuff/w/slc5_amd64_gcc461/external/mongo/2.2.0/bin/mongo...(no debugging symbols found)...done.
(gdb) run --port 8230
Starting program: /build/vk/build_stuff/w/slc5_amd64_gcc461/external/mongo/2.2.0/bin/mongo --port 8230
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x2aaaaaaab000
[Thread debugging using libthread_db enabled]
MongoDB shell version: 2.2.0

Program received signal SIGSEGV, Segmentation fault.
0x000000000040fb08 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::find_last_not_of(char const*, unsigned long, unsigned long) const ()
    at /build/lat/comp/boot461b/BUILD/slc5_amd64_gcc461/external/gcc/4.6.1-comp2/gcc-4.6.1/obj/x86_64-unknown-linux-gnu/libstdc++-v3/include/bits/basic_string.tcc:876
876     /build/lat/comp/boot461b/BUILD/slc5_amd64_gcc461/external/gcc/4.6.1-comp2/gcc-4.6.1/obj/x86_64-unknown-linux-gnu/libstdc++-v3/include/bits/basic_string.tcc: No such file or directory.
        in /build/lat/comp/boot461b/BUILD/slc5_amd64_gcc461/external/gcc/4.6.1-comp2/gcc-4.6.1/obj/x86_64-unknown-linux-gnu/libstdc++-v3/include/bits/basic_string.tcc

gregor

unread,
Sep 7, 2012, 10:24:47 AM9/7/12
to mongod...@googlegroups.com
It looks like the bottom of the stack trace is missing - do you have the whole thing?

Valentin Kuznetsov

unread,
Sep 7, 2012, 10:42:46 AM9/7/12
to mongod...@googlegroups.com
Not really, this is here gdb stops, if I continue it prints out seg. fault stack

GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-42.el5)
Copyright (C) 2009 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-redhat-linux-gnu".
For bug reporting instructions, please see:
Reading symbols from /build/vk/build_stuff/w/slc5_amd64_gcc461/external/mongo/2.2.0/bin/mongo...(no debugging symbols found)...done.
(gdb) run --port 8230
Starting program: /build/vk/build_stuff/w/slc5_amd64_gcc461/external/mongo/2.2.0/bin/mongo --port 8230
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x2aaaaaaab000
[Thread debugging using libthread_db enabled]
MongoDB shell version: 2.2.0

Program received signal SIGSEGV, Segmentation fault.
0x000000000040fb08 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::find_last_not_of(char const*, unsigned long, unsigned long) const ()
    at /build/lat/comp/boot461b/BUILD/slc5_amd64_gcc461/external/gcc/4.6.1-comp2/gcc-4.6.1/obj/x86_64-unknown-linux-gnu/libstdc++-v3/include/bits/basic_string.tcc:876
876     /build/lat/comp/boot461b/BUILD/slc5_amd64_gcc461/external/gcc/4.6.1-comp2/gcc-4.6.1/obj/x86_64-unknown-linux-gnu/libstdc++-v3/include/bits/basic_string.tcc: No such file or directory.
        in /build/lat/comp/boot461b/BUILD/slc5_amd64_gcc461/external/gcc/4.6.1-comp2/gcc-4.6.1/obj/x86_64-unknown-linux-gnu/libstdc++-v3/include/bits/basic_string.tcc
(gdb) 
(gdb) c
Continuing.
Fri Sep  7 16:41:27 mongo got signal 11 (Segmentation fault), stack trace: 

Fri Sep  7 16:41:27 0x493733 0x40d824 0x38142302f0 0x40fb08 0x41b9ce 0x381421d994 0x40be09 
 /build/vk/build_stuff/w/slc5_amd64_gcc461/external/mongo/2.2.0/bin/mongo [0x493733]
 /build/vk/build_stuff/w/slc5_amd64_gcc461/external/mongo/2.2.0/bin/mongo [0x40d824]
 /lib64/libc.so.6 [0x38142302f0]
 /build/vk/build_stuff/w/slc5_amd64_gcc461/external/mongo/2.2.0/bin/mongo [0x40fb08]
 /build/vk/build_stuff/w/slc5_amd64_gcc461/external/mongo/2.2.0/bin/mongo [0x41b9ce]
 /lib64/libc.so.6(__libc_start_main+0xf4) [0x381421d994]
 /build/vk/build_stuff/w/slc5_amd64_gcc461/external/mongo/2.2.0/bin/mongo [0x40be09]


Program exited with code 016.

gregor

unread,
Sep 11, 2012, 3:31:47 AM9/11/12
to mongod...@googlegroups.com
Is this a debug build you are running?

Valentin Kuznetsov

unread,
Sep 11, 2012, 9:37:07 PM9/11/12
to mongod...@googlegroups.com
Hi,
after spending more time with our setup I found that original problem caused by mismatch of gcc libraries/builds. Probably linker pick-up wrong set of libraries. I performed clean install and was able to run mongo without problem.

Sorry for false alarm.
Valentin.

gregor

unread,
Sep 13, 2012, 6:46:29 AM9/13/12
to mongod...@googlegroups.com
great glad you got it fixed
Reply all
Reply to author
Forward
0 new messages