[SERVER-10483] v8 segfaults and prints stack trace when exiting the shell (sometimes) Created: 09/Aug/13  Updated: 28/Oct/13  Resolved: 16/Oct/13

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: 2.5.1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Matt Dannenberg Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

linux 64bit


Issue Links:
Duplicate
is duplicated by SERVER-11099 clang compiled mongo shell crashes on... Closed
Operating System: ALL
Participants:

 Description   

I have not found a repro yet, but it happens when I quit the shell (via ctrl-c) or sometimes when run a smoke test. It does not happen consistently.

Here is an example stacktrace:
ReplSetTest stopSet *** Shut down repl set - test worked ****
mongo got signal 11 (Segmentation fault), stack trace:
0x70a916 0x5c2626 0x7fecea455240 0x9a7981 0x7e2b57 0x8a8455 0x8a82c6 0x6bf1fc 0x6bf0cc 0x5cc896 0x5ccdf9 0x7fecea441a15 0x5c1399
/home/dannenberg/work/server10086/mongo/mongo(_ZN5mongo15printStackTraceERSo+0x26) [0x70a916]
/home/dannenberg/work/server10086/mongo/mongo(_Z12quitAbruptlyi+0x1f6) [0x5c2626]
/usr/lib/libc.so.6(+0x35240) [0x7fecea455240]
/home/dannenberg/work/server10086/mongo/mongo(_ZN2v88internal15MemoryAllocator4FreeEPNS0_11MemoryChunkE+0x41) [0x9a7981]
/home/dannenberg/work/server10086/mongo/mongo(_ZN2v88internal15DeoptimizerDataD1Ev+0x27) [0x7e2b57]
/home/dannenberg/work/server10086/mongo/mongo(_ZN2v88internal7Isolate6DeinitEv+0x65) [0x8a8455]
/home/dannenberg/work/server10086/mongo/mongo(_ZN2v88internal7Isolate8TearDownEv+0x56) [0x8a82c6]
/home/dannenberg/work/server10086/mongo/mongo(_ZN5mongo7V8ScopeD1Ev+0x10c) [0x6bf1fc]
/home/dannenberg/work/server10086/mongo/mongo(_ZN5mongo7V8ScopeD0Ev+0xc) [0x6bf0cc]
/home/dannenberg/work/server10086/mongo/mongo(Z5_mainiPPcS0+0x8566) [0x5cc896]
/home/dannenberg/work/server10086/mongo/mongo(main+0x59) [0x5ccdf9]
/usr/lib/libc.so.6(__libc_start_main+0xf5) [0x7fecea441a15]
/home/dannenberg/work/server10086/mongo/mongo() [0x5c1399]



 Comments   
Comment by Andrew Morrow (Inactive) [ 16/Oct/13 ]

Closing because this is a dup of SERVER-11099. More information, including what we believe is the fix, can be found in that ticket.

Comment by Matt Dannenberg [ 12/Aug/13 ]

here's an example result

mongo::printStackTrace(std::ostream&) at /home/dannenberg/work/server10086/mongo/src/mongo/util/stacktrace.cpp:303
quitAbruptly(int) at /home/dannenberg/work/server10086/mongo/src/mongo/shell/dbshell.cpp:225
??
??:0

v8::internal::Space::identity() at /home/dannenberg/work/server10086/mongo/src/third_party/v8/src/spaces.h:772
(inlined by) v8::internal::MemoryAllocator::Free(v8::internal::MemoryChunk*) at /home/dannenberg/work/server10086/mongo/src/third_party/v8/src/spaces.cc:599
~DeoptimizerData at /home/dannenberg/work/server10086/mongo/src/third_party/v8/src/deoptimizer.cc:57
v8::internal::Isolate::Deinit() at /home/dannenberg/work/server10086/mongo/src/third_party/v8/src/isolate.cc:1603
v8::internal::Isolate::TearDown() at /home/dannenberg/work/server10086/mongo/src/third_party/v8/src/isolate.cc:1574
~V8Scope at /home/dannenberg/work/server10086/mongo/src/mongo/scripting/engine_v8.cpp:549
~V8Scope at /home/dannenberg/work/server10086/mongo/src/mongo/scripting/engine_v8.cpp:535
~basic_stringstream at /usr/lib64/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../include/c++/4.8.1/sstream:565
(inlined by) ~variables_map at /usr/lib64/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../include/c++/4.8.1/sstream:565
(inlined by) _main(int, char*, char*) at /home/dannenberg/work/server10086/mongo/src/mongo/shell/dbshell.cpp:1133
main at /home/dannenberg/work/server10086/mongo/src/mongo/shell/dbshell.cpp:1154
??
??:0
_start at ??:?

Comment by Daniel Pasette (Inactive) [ 12/Aug/13 ]

can you run:

addr2line -p -C -f -i -e [path to mongo shell binary] [addresses here]

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