Re: Intermittent assertion during ORB thread creation
Mike Cunha via omniORB-list <[email protected]>
| Newsgroups | gmane.comp.corba.omniorb.user |
|---|---|
| Message-ID | <[email protected]> |
Duncan, We were not able to run with trace level set to 25; it severely slowed down our system. We ran at trace level 5, but it didn't provide any useful information. We added some additional checks and logs in a patch file to the omniOrb build (attached). With this patch applied, the error is less frequent, but we were still able to reproduce it. It now fails at giopServer.cc line 993; the new check fails for orbAsyncInvoker->insert(task) less than 1. We don't see any other log messages, which we thought we covered for all cases where this call could return 0. Mike Cunha -----Original Message----- From: Duncan Grisby [mailto:[email protected]] Sent: Monday, August 21, 2017 11:20 AM To: Mike Cunha; [email protected] Subject: Re: [omniORB] Intermittent assertion during ORB thread creation On Wed, 2017-08-16 at 10:31 -0400, Mike Cunha via omniORB-list wrote: > Intermittently, I will get an omniORB assertion failure during ORB > thread creation. It is not specific to one address space on my system. > > Here is the error message: > omniORB: (1): Assertion failed. This indicates a bug in the > application using omniORB, or maybe in omniORB itself. > file: giopServer.cc > line: 986 > info: 0 That means it unexpectedly failed to handle a readable connection. As the comment in the code says, it "should never happen". If it can't start a thread at that stage, it should queue the request. Can you run with -ORBtraceLevel 25 and reproduce the issue? What kind of system is this? Does it have a very limited amount of memory? Is it 32 or 64 bit? Duncan. -- -- Duncan Grisby -- -- [email protected] -- -- http://www.grisby.org -- _______________________________________________ omniORB-list mailing list [email protected] http://www.omniorb-support.com/mailman/listinfo/omniorb-list
0002-debug-msgs.patch
(application/octet-stream, 3.1 KB)
diff -ruN omniORB-4.2.0/src/lib/omniORB/orbcore/giopServer.cc omniORB-4.2.0-patch/src/lib/omniORB/orbcore/giopServer.cc
--- omniORB-4.2.0/src/lib/omniORB/orbcore/giopServer.cc 2014-04-17 12:32:49.000000000 -0400
+++ omniORB-4.2.0-patch/src/lib/omniORB/orbcore/giopServer.cc 2017-08-16 16:21:54.056291493 -0400
@@ -979,15 +979,25 @@
connectionState* cs = csLocate(conn);
if (!cs) return;
- giopWorker* task = new giopWorker(cs->strand,this,1);
- if (!orbAsyncInvoker->insert(task)) {
- // Cannot start serving this new connection.
- // Should never happen
- OMNIORB_ASSERT(0);
+ giopWorker* task = NULL;
+ task = new giopWorker(cs->strand,this,1);
+ if ( NULL == task )
+ {
+ // Log Critical Error to Console
+ OMNIORB_ASSERT(0);
+ }
+ else if ( 1 > orbAsyncInvoker->insert(task) )
+ {
+ // Cannot start serving this new connection.
+ // Should never happen
+ OMNIORB_ASSERT(0);
+ }
+ else
+ {
+ task->insert(cs->workers);
+ conn->pd_n_workers++;
+ pd_n_temporary_workers++;
}
- task->insert(cs->workers);
- conn->pd_n_workers++;
- pd_n_temporary_workers++;
break;
}
default:
diff -ruN omniORB-4.2.0/src/lib/omniORB/orbcore/invoker.cc omniORB-4.2.0-patch/src/lib/omniORB/orbcore/invoker.cc
--- omniORB-4.2.0/src/lib/omniORB/orbcore/invoker.cc 2017-08-16 15:00:19.575847009 -0400
+++ omniORB-4.2.0-patch/src/lib/omniORB/orbcore/invoker.cc 2017-08-16 16:26:41.106617911 -0400
@@ -249,13 +249,16 @@
// Get a new worker from the invoker
worker = pd_invoker->getWorker(this);
- if (!worker) {
- if (task->category() == omniTask::ImmediateDispatch) {
- omniORB::logs(2, "Unable to start new thread. Operation failed.");
+ if (!worker)
+ {
+ if (task->category() == omniTask::ImmediateDispatch)
+ {
+ omniORB::logs(1, "Unable to start new thread. Operation failed.");
return 0;
}
- else {
- omniORB::logs(2, "Unable to start new thread. Task queued.");
+ else
+ {
+ omniORB::logs(1, "Unable to start new thread. Task queued.");
task->enq(pd_tasks);
return 1;
}
@@ -796,17 +799,22 @@
CORBA::Boolean
omniAsyncInvoker::insert(omniTask* t)
{
- if (t->category() == omniTask::DedicatedThread) {
+ if (t->category() == omniTask::DedicatedThread)
+ {
return pd_dedicated->insert(t);
}
- else {
- switch (t->purpose()) {
-
- case omniTask::General: return pd_general->insert(t);
- case omniTask::ServerUpcall: return pd_server->insert(t);
- case omniTask::ClientInvocation: return pd_client->insert(t);
+ else
+ {
+ switch (t->purpose())
+ {
+ case omniTask::General: return pd_general->insert(t);
+ case omniTask::ServerUpcall: return pd_server->insert(t);
+ case omniTask::ClientInvocation: return pd_client->insert(t);
}
}
+
+ // Log Critical Error to Console <- Should never get here
+ omniORB::logs(1,"AsyncInvoker::insert() returning 0!" );
return 0;
}