[SERVER-13431] segfault in bgsync during shutdown Created: 01/Apr/14  Updated: 11/Jul/16  Resolved: 01/Apr/14

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 2.6.0-rc2
Fix Version/s: 2.6.0-rc3

Type: Bug Priority: Major - P3
Reporter: Daniel Pasette (Inactive) Assignee: Eric Milkie
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Comments   
Comment by Githook User [ 01/Apr/14 ]

Author:

{u'username': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}

Message: SERVER-13431 _me should not reference mmapped memory

(cherry picked from commit 54123be0d616307b946122194586bd3cf93d2c3b)
Branch: v2.6
https://github.com/mongodb/mongo/commit/9b86a61a28200ffbbcbee0b04b22a725556575d5

Comment by Githook User [ 01/Apr/14 ]

Author:

{u'username': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}

Message: SERVER-13431 _me should not reference mmapped memory
Branch: master
https://github.com/mongodb/mongo/commit/54123be0d616307b946122194586bd3cf93d2c3b

Comment by Eric Milkie [ 01/Apr/14 ]

An examination of the code produced no leads.
I tried reproducing the problem with both 2.6 and 2.4 as a primary (it affects the code path in the function that crashed) but no luck yet.
Would it be possible to get the demangled stack trace, or the assembler listings for bgsync.o for this particular build?

Comment by Eric Milkie [ 01/Apr/14 ]

2014-03-31T18:40:26.408-0400 ** WARNING: --rest is specified without --httpinterface,
2014-03-31T18:40:26.408-0400 **          enabling http interface
dbexit: shutdown calledInvalid access at address: 0x7ffa660800c0 from thread: rsSyncNotifier
Got signal: 11 (Segmentation fault).
Backtrace:
0x11a21e1 0x75b7aa 0x75bd73 0x3fcd00f4a0 0xddc09c 0xddd045 0x11e6a89 0x3fcd0077f1 0x3fccce5ccd 
 /data/dist/mongodb-linux-x86_64-2.6.0-rc2-mms-connpool/bin/mongod(_ZN5mongo15printStackTraceERSo+0x21) [0x11a21e1]
 /data/dist/mongodb-linux-x86_64-2.6.0-rc2-mms-connpool/bin/mongod(_ZN5mongo10abruptQuitEi+0x3ba) [0x75b7aa]
 /data/dist/mongodb-linux-x86_64-2.6.0-rc2-mms-connpool/bin/mongod(_ZN5mongo24abruptQuitWithAddrSignalEiP7siginfoPv+0x273) [0x75bd73]
 /lib64/libpthread.so.0() [0x3fcd00f4a0]
 /data/dist/mongodb-linux-x86_64-2.6.0-rc2-mms-connpool/bin/mongod(_ZN5mongo7replset14BackgroundSync9markOplogEv+0x8c) [0xddc09c]
 /data/dist/mongodb-linux-x86_64-2.6.0-rc2-mms-connpool/bin/mongod(_ZN5mongo7replset14BackgroundSync14notifierThreadEv+0x195) [0xddd045]
 /data/dist/mongodb-linux-x86_64-2.6.0-rc2-mms-connpool/bin/mongod() [0x11e6a89]
 /lib64/libpthread.so.0() [0x3fcd0077f1]
 /lib64/libc.so.6(clone+0x6d) [0x3fccce5ccd]
EXIT CODE: 14

Patch was based on: https://github.com/mongodb/mongo/commit/d2716598fc73a359f88f10d3c691979d727f287b

$ addr2line -p -C -f -i -e mongodb-linux-x86_64-debugsymbols-2.6.0-rc2-mms-connpool/bin/mongod 0x11a21e1 0x75b7aa 0x75bd73 0x3fcd00f4a0 0xddc09c 0xddd045 0x11e6a89 0x3fcd0077f1 0x3fccce5ccd mongo::printStackTrace(std::ostream&) at /srv/10gen/mci-exec/mci/git@github.commongodb/mongo.git/mongodb-mongo-v2.6/src/mongo/util/stacktrace.cpp:304
std::basic_streambuf<char, std::char_traits<char> >::pptr() const at /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/streambuf:515
 (inlined by) std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::str() const at /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/sstream:131
 (inlined by) std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::str() const at /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/sstream:463
 (inlined by) mongo::abruptQuit(int) at /srv/10gen/mci-exec/mci/git@github.commongodb/mongo.git/mongodb-mongo-v2.6/src/mongo/db/db.cpp:1033
~basic_ostringstream at /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/sstream:444
 (inlined by) mongo::abruptQuitWithAddrSignal(int, siginfo*, void*) at /srv/10gen/mci-exec/mci/git@github.commongodb/mongo.git/mongodb-mongo-v2.6/src/mongo/db/db.cpp:1050
??
??:0
mongo::BSONObj::objsize() const at /srv/10gen/mci-exec/mci/git@github.commongodb/mongo.git/mongodb-mongo-v2.6/src/mongo/bson/bsonobj.h:272
 (inlined by) BSONObjIterator at /srv/10gen/mci-exec/mci/git@github.commongodb/mongo.git/mongodb-mongo-v2.6/src/mongo/bson/bsonobjiterator.h:42
 (inlined by) mongo::BSONObj::getField(mongo::StringData const&) const at /srv/10gen/mci-exec/mci/git@github.commongodb/mongo.git/mongodb-mongo-v2.6/src/mongo/bson/bson-inl.h:266
 (inlined by) mongo::BSONObj::operator[](mongo::StringData const&) const at /srv/10gen/mci-exec/mci/git@github.commongodb/mongo.git/mongodb-mongo-v2.6/src/mongo/bson/bsonobj.h:207
 (inlined by) mongo::replset::BackgroundSync::markOplog() at /srv/10gen/mci-exec/mci/git@github.commongodb/mongo.git/mongodb-mongo-v2.6/src/mongo/db/repl/sync_source_feedback.h:63
mongo::replset::BackgroundSync::notifierThread() at /srv/10gen/mci-exec/mci/git@github.commongodb/mongo.git/mongodb-mongo-v2.6/src/mongo/db/repl/bgsync.cpp:171
thread_proxy at /srv/10gen/mci-exec/mci/git@github.commongodb/mongo.git/mongodb-mongo-v2.6/src/third_party/boost/libs/thread/src/pthread/thread.cpp:133
??
??:0
??
??:0

Generated at Thu Feb 08 03:31:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.