mongod crash(terminated with signal 5) - mongodb

I configured a mongodb's capped collection,with capacity more than 3G,after that mongod crash for many times,but there was nothing wrong in the mongd.log.Howerver linux abrt has core dumped for mongod,messages from coredump are as following:
Program terminated with signal 5, Trace/breakpoint trap. #0 0x00000000010b9951 in v8::internal::OS::DebugBreak() () Missing separate debuginfos, use: debuginfo-install
glibc-2.12-1.107.el6.x86_64 libgcc-4.4.7-3.el6.x86_64 libstdc++-4.4.6-4.el6.x86_64 (gdb) where #0 0x00000000010b9951 in v8::internal::OS::DebugBreak() () #1 0x00000000010ba06a in
v8::internal::OS::Abort() () #2 0x0000000000f1c5f3 in API_Fatal(char const*, char const*, ...) () #3 0x0000000000ece607 in ?? () #4 0x0000000000ece916 in
v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) () #5 0x000000000108c891 in v8::internal::Map::UpdateCodeCache(v8::internal::Handle<v8::internal::Map>,
v8::internal::Handle<v8::internal::String>, v8::internal::Handle<v8::internal::Code>) () #6 0x0000000001149180 in
v8::internal::StubCache::ComputeKeyedLoadOrStoreElement(v8::internal::Handle<v8::internal::Map>, v8::internal::KeyedIC::StubKind, v8::internal::StrictModeFlag) () #7
0x0000000001000bfc in v8::internal::KeyedIC::ComputeMonomorphicStub(v8::internal::Handle<v8::internal::Map>,
v8::internal::KeyedIC::StubKind, v8::internal::StrictModeFlag, v8::internal::Handle<v8::internal::Code>) () #8 0x000000000100779a in
v8::internal::KeyedIC::ComputeStub(v8::internal::Handle<v8::internal::JSObject>, v8::internal::KeyedIC::StubKind, v8::internal::StrictModeFlag,
v8::internal::Handle<v8::internal::Code>) () #9 0x0000000001008551 in v8::internal::KeyedLoadIC::Load(v8::internal::InlineCacheState,
v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, bool) () #10 0x000000000100894d in v8::internal::KeyedLoadIC_Miss(v8::internal::Arguments,
v8::internal::Isolate*) ()
my mongodb is 2.4.1, running in centos 6.3,16G memory and 8cpus.
Anyone can help me? Thanks very much.

The out of memory error mentioned makes me suspect that this could be an occurrence of this bug (V8 memory leaking):
https://jira.mongodb.org/browse/SERVER-9230
Can you upgrade to 2.4.2+ and see if the error still happens for you?

Related

high-availability nodes for streaming data are disconnected

underversion 1.30.7 of dolphindb , the node is disconnected and can be manually activated after the high-availability flow data table is created, what is the reason for the unsuccessful creation of the table?
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `./dolphindb -home /root/dolphindb/server/data/P3-NODE1 -logFile/root/dolphindb'.
Program terminated with signal 11 , Segmentation fault.
#0 0x00000000008da027 in RealtimeTable::getKeyColumnIndex(int) const () Missing separate debuginfos, use: debuginfo-install glibc-2.17-260.el7.x86_64 libgcc-4.8.5-36.el7.x86_64 (gdb) bt
#0 0x00000000008da027 in RealtimeTable::getKeyC olumnIndex(int) const ()
#1 0x00000000007039b3 in RegisterLogEntry::setTable(SmartPointer<Table> const&) ()
#2 0x000000000070853b in StreamingHA::registerDataFile(std::string const&, SmartPointer< StreamingDataFile> const&, bool) ()
#3 0x0000000000711a9c in StreamingHAManagerImpl::registerStreamTable(int, std::string const&, SmartPointer<Table> const&) ()
#4 0x00000000007ae416 in OperatorImp::haStreamTableInternal(Heap*, std::vector< SmartPointer<Constant>, std::allocator<SmartPointer<Constant>> >&) ()
# 5 0x00000000007aedbf in OperatorImp :: haStreamTable(Heap*, std::vector<SmartPointer<Constant>, std::allocator<SmartPointer<Constant>> >&) ()
#6 0x00007fb64c31877e in SystemFunction::call(Heap*, std::vector<SmartPointer <Constant >, std::allocator<SmartPoin ter<Constant>> >&)() from ./libDolphinDB.so
#7 0x00000000006d9a96 in SessionImp::run(SmartPointer<FunctionDef> const&, std::vector<SmartPointer<Constant> , std ::allocator<SmartPointer<Constant>> >&) ()
#8 0x00000000006deeb8 in SessionImp::run(std:: string const&, std::vector<SmartPointer<Constant>, std::allocator<SmartPointer<Constant> >> &) ()
#9 0x00000000005e5415 in APISocketConsole::execute() ()
#10 0x00000000005e1491 in SocketConsole::run() ()
#11 0x000000000062989e in Worker::run() ()
#12 0x00 007fb64be6b6dc in Runnable:: start() () from ./libDolphinDB.so
#13 0x00007fb64be6c8a0 in Thread::startFunc(void*) () from ./libDolphinDB.so
#14 0x00007fb64b1f5dd5 in start_thread () from /lib64/libpthread.so.0
#15 0x00007e ina2 () fro m /lib64/libc.so.6 
In the latest release of DolphinDB (V1.30.18/V2.00.6), the mentioned issues have been fixed. Upgrade your server and have a try.
The following script creates a high-availability stream table “haDevSt“ in the raft group “2“ where cacheLimit is 100000 and keyColumn is “id“.
t1=table(1:0,
["id","source_address","source_port","destination_address","destination_port"],
[STRING,INT,INT,INT,INT] ) haStreamTable(2,t1,"haDevSt",100000,"id")
To drop a high-availability stream table, call dropStreamTable(tableName).
For more information, please check the https://dolphindb.com/help/index.html

segmentation fault php7 symfony cli command using soap

I am tring to upgrade to php7 and symfony3 from php5.6 and symfony2 resp. I have some symfony console commands which uses soap to request third party apis.
After upgrading to php7 and php7.0-soap, but command fails with segmentation fault. I tried debugging with gdb, below is the trace. Looks like this is the issue with php7.0-soap ? What is the solution ?
Program received signal SIGSEGV, Segmentation fault.
0x00005555557bc4db in zend_hash_destroy ()
(gdb) bt
#0 0x00005555557bc4db in zend_hash_destroy ()
#1 0x00007fffecbbe141 in delete_type_persistent () from /usr/lib/php/20151012/soap.so
#2 0x00005555557bc5dd in zend_hash_destroy ()
#3 0x00007fffecbc55f1 in ?? () from /usr/lib/php/20151012/soap.so
#4 0x00007fffecbc565f in ?? () from /usr/lib/php/20151012/soap.so
#5 0x00005555557bc4d2 in zend_hash_destroy ()
#6 0x00007fffecb95f0b in zm_shutdown_soap () from /usr/lib/php/20151012/soap.so
#7 0x00005555557b25f3 in module_destructor ()
#8 0x00005555557ab08c in ?? ()
#9 0x00005555557bd048 in zend_hash_graceful_reverse_destroy ()
#10 0x00005555557ac055 in zend_shutdown ()
#11 0x000055555574fb3b in php_module_shutdown ()
#12 0x000055555563d796 in main ()
you can't use WSDL_CACHE_MEMORY (or WSDL_CACHE_BOTH) in PHP7 for the time being: https://bugs.php.net/bug.php?id=71931
use WSDL_CACHE_DISK instead by setting soap.wsdl_cache in php.ini, or - if you don't have access to php.ini - using ini_set:
ini_set('soap.wsdl_cache', WSDL_CACHE_DISK);

sharedlibrary apply-load-rules all Warning: the current language does not match this frame. Current language: auto; currently objective-c

I have Integrated Cocos2d to my Windows based application. When I run my Project I am getting the Crash after executing the line CC_DIRECTOR_INIT(); The error is **sharedlibrary **apply-load-rules all
Warning: the current language does not match this frame.
Current language: auto; currently objective-c****. I found the meaning of the error form this POST. But My question is how can I Implement this in my Project. I am new to cocos2-d. Any suggestions is appreciated.
- (void) applicationDidFinishLaunching:(UIApplication*)application
{
CC_DIRECTOR_INIT();
CCDirector *director = [CCDirector sharedDirector];
[director setDeviceOrientation:kCCDeviceOrientationPortrait];
[director setDisplayFPS:YES];
EAGLView *view = [director openGLView];
[view setMultipleTouchEnabled:YES];
[CCTexture2D setDefaultAlphaPixelFormat:kTexture2DPixelFormat_RGBA8888];
[[CCDirector sharedDirector] runWithScene: [Helloworld scene]];
}
This is the Screenshot where the crash occurs...
EDIT:
MY Console output..
#0 0x0002e60f in -[CCLabelAtlas updateAtlasValues] (self=0x68224c0, _cmd=0xc0be2) at CCLabelAtlas.m:75
#1 0x0002e994 in -[CCLabelAtlas setString:] (self=0x68224c0, _cmd=0x310f12c, newString=0xf3b98) at CCLabelAtlas.m:113
#2 0x0002e49c in -[CCLabelAtlas initWithString:charMapFile:itemWidth:itemHeight:startCharMap:] (self=0x68224c0, _cmd=0xb8d31, theString=0xf3b98, charmapfile=0xf3b88, w=16, h=24, c=46 '.') at CCLabelAtlas.m:50
#3 0x0002e380 in +[CCLabelAtlas labelAtlasWithString:charMapFile:itemWidth:itemHeight:startCharMap:] (self=0xf1ebc, _cmd=0xb6fd5, string=0xf3b98, charmapfile=0xf3b88, w=16, h=24, c=46 '.') at CCLabelAtlas.m:40
#4 0x0001268a in -[CCDirector setGLDefaultValues] (self=0x681c300, _cmd=0xb6b3d) at CCDirector.m:219
#5 0x0001406d in -[CCDirector setOpenGLView:] (self=0x681c300, _cmd=0xb6a18, view=0x681c850) at CCDirector.m:549
#6 0x00002e58 in -[cocowindowAppDelegate applicationDidFinishLaunching:] (self=0x681abe0, _cmd=0xd050a3, application=0x68016f0) at cocowindowAppDelegate.m:32
#7 0x00912ce2 in -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] ()
#8 0x00914d88 in -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] ()
#9 0x0091f617 in -[UIApplication handleEvent:withNewEvent:] ()
#10 0x00917abf in -[UIApplication sendEvent:] ()
#11 0x0091cf2e in _UIApplicationHandleEvent ()
#12 0x02e61992 in PurpleEventCallback ()
#13 0x01403944 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ ()
#14 0x01363cf7 in __CFRunLoopDoSource1 ()
#15 0x01360f83 in __CFRunLoopRun ()
#16 0x01360840 in CFRunLoopRunSpecific ()
#17 0x01360761 in CFRunLoopRunInMode ()
#18 0x009147d2 in -[UIApplication _run] ()
#19 0x00920c93 in UIApplicationMain ()
#20 0x00002b39 in main (argc=1, argv=0xbfffeff0) at main.m:14
(gdb)
EXC_ARITHMETIC usually means that you are dividing by zero. If you look in your screenshot then you are evaluating:
int row = (a % itemsPerRow) //...
From the output of your debugger it looks like itemsPerRow is 0 when this is caused and so the program is crashing. Try initialising this value or setting some conditional code if it is meant to be zero to stop it dividing by zero.
The warning message Warning: the current language does not match this frame. is just GDB getting a bit confused as to what language it is meant to be debugging. As you can see, it manages to sort itself out on the next line.
Edit:
This poster has a similar error to you: http://www.cocos2d-iphone.org/forum/topic/8209 Does his fix apply to you?

How do I create application tests in a Cocoa Touch Unit Testing Bundle with Xcode 4?

I've created an Xcode 4 project with a Cocoa Touch Unit Testing Bundle. I'm able to create and run logic tests successfully. However, I'm not sure how to create a test as an application test that runs on an iOS device and uses UIKit. When I create a test that uses UIKit and try to run the tests in the bundle on the device, Xcode 4 pops up a dialog saying:
Logic Testing Unavailable
Logic Testing on iOS devices is not supported. You can run logic tests on the Simulator.
I tried running the test on the simulator, but of course it failed when making UIKit calls.
Does anyone know how to create and run application tests on iOS devices using Xcode 4 and a Cocoa Touch Unit Testing Bundle?
EDIT: In case it helps, here is the test code:
#implementation TinyWordsTests
- (void)setUp
{
[super setUp];
CC_DIRECTOR_INIT();
}
- (void)tearDown
{
CC_DIRECTOR_END();
[super tearDown];
}
- (void)testExample
{
CCScene *scene = [TWOHelloWorldLayer scene];
STAssertNotNil(scene, #"Scene must not be nil.");
}
#end
and the resulting stack trace from gdb when the test is run in the simulator:
(gdb) bt
#0 0x00464781 in __HALT ()
#1 0x003af8ed in _CFRuntimeCreateInstance ()
#2 0x00da81ea in GSFontCreateWithName ()
#3 0x038f55eb in UINewFont ()
#4 0x038f56bd in +[UIFont fontWithName:size:traits:] ()
#5 0x038f507d in +[UIFont fontWithName:size:] ()
#6 0x01a49205 in -[CCTexture2D(Text) initWithString:fontName:fontSize:] (self=0x197f9f0, _cmd=0xe10840, string=0x1a9c900, name=0x1a9c8f0, size=64) at CCTexture2D.m:487
#7 0x01a2d897 in -[CCLabelTTF setString:] (self=0x1981d70, _cmd=0x156e07, str=0x1a9c900) at CCLabelTTF.m:95
#8 0x01a2dc9d in -[CCLabelTTF initWithString:fontName:fontSize:] (self=0x1981d70, _cmd=0xe10840, str=0x1a9c900, name=0x1a9c8f0, size=64) at CCLabelTTF.m:79
#9 0x01a2da9a in +[CCLabelTTF labelWithString:fontName:fontSize:] (self=0x1a9b53c, _cmd=0xe0ddc0, string=0x1a9c900, name=0x1a9c8f0, size=64) at CCLabelTTF.m:53
#10 0x01a01b10 in -[TWOHelloWorldLayer init] (self=0x197ee40, _cmd=0x2c7c) at TWOHelloWorldLayer.m:39
#11 0x01a341bb in +[CCNode node] (self=0x1a99ee4, _cmd=0x3baad59) at CCNode.m:231
#12 0x01a01a80 in +[TWOHelloWorldLayer scene] (self=0x1a99ee4, _cmd=0xe00fa0) at TWOHelloWorldLayer.m:22
#13 0x01a5d430 in -[TinyWordsTests testExample] (self=0x197e490, _cmd=0xe59dd0) at TinyWordsTests.m:30
#14 0x00410c7d in __invoking___ ()
#15 0x00410b51 in -[NSInvocation invoke] ()
#16 0x201043d2 in -[SenTestCase invokeTest] ()
#17 0x20104aa7 in -[SenTestCase performTest:] ()
#18 0x201041d3 in -[SenTest run] ()
#19 0x20106eda in -[SenTestSuite performTest:] ()
#20 0x201041d3 in -[SenTest run] ()
#21 0x20106eda in -[SenTestSuite performTest:] ()
#22 0x201041d3 in -[SenTest run] ()
#23 0x201067a4 in +[SenTestProbe runTests:] ()
#24 0x000023c7 in ?? ()
#25 0x000025f2 in ?? ()
#26 0x0000209a in ?? ()
#27 0x00002049 in ?? ()
To allow this to work correctly, you need to go to your testing bundle's build settings and set the Test Host key to $(BUNDLE_LOADER).
In addition, make sure that Bundle Loader key is set to to $(BUILT_PRODUCTS_DIR)/yourAppName.app/yourAppName in the bundle's build settings as well.
Unfortunately, testing on iOS is a hodgepodge with the official tools. There are two types of unit tests. Logic Tests which have no UI invocations and runs in the Simulator. Application Tests which can exercise and manipulate the UI but only runs on the device.
It sounds like you have written Logic Tests that exercise the UI. What you want is to create Application Tests and run that on the device. To do this you have to follow http://developer.apple.com/library/ios/#documentation/Xcode/Conceptual/iphone_development/135-Unit_Testing_Applications/unit_testing_applications.html and create an independent Application Target to run on the device that includes the AppTest target.
But, just an aside is this gets quite tedious as you have to add all code under test and dependencies into each target and application target. You also have to only place logic tests in the logic test target and application tests in the application test target.

MKMapView crashing with EXC_BAD_ACCESS

I have the following line of code which activates the breakpoint
[mapView addAnnotations:grabinstance.itemArray];
This crashing randomly. grabinstance.itemArray is fully populated always and is never changing at the time due to this bit of code only being called once the array is full. This particular time this was confirmed as 323 items in the array.
NSZombieEnabled doesn't find anything at all either.
The backtrace is below and line 1154 is the line above.
#0 0x0126a372 in _insert ()
#1 0x0126a312 in _splitNode ()
#2 0x0126a3b7 in _insert ()
#3 0x011db253 in -[MKAnnotationContainerView addAnnotation:] ()
#4 0x011dfc2e in -[MKAnnotationContainerView addAnnotations:] ()
#5 0x011b0b30 in -[MKMapView addAnnotations:] ()
#6 0x00009257 in -[BigViewController plotItems] (self=0x614de90, _cmd=0x16464f) at /Users/zzzz/Documents/iPhone Projects/BigProject/Classes/BigViewController.m:1154
#7 0x005336c1 in _nsnote_callback ()
#8 0x01c18f99 in __CFXNotificationPost_old ()
#9 0x01b9833a in _CFXNotificationPostNotification ()
#10 0x00529266 in -[NSNotificationCenter postNotificationName:object:userInfo:] ()
#11 0x00024071 in -[ItemGrabber parserDidEndDocument:] (self=0x617b540, _cmd=0x689aa3, parser=0xf6b4ab0) at /Users/zzzz/Documents/iPhone Projects/BigProject/Classes/ItemGrabber.m:267
You should check your annotations using CLLocationCoordinate2DIsValid():
if (CLLocationCoordinate2DIsValid(place.coordinate)) {
[_mapView addAnnotation:place];
} else {
NSLog(#"place %# has invalid coordinates", place.name);
}
Bug reported to Apple and as been acknowledged
I also had the same problem and i fixed it,The problem was with my locations,The objects in the array may not contain valid locations,They may be garbage values