crashes in ipAddrToAsciiAsynchronous (pure virtual method called)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
EPICS Base |
Invalid
|
High
|
Andrew Johnson |
Bug Description
From Kay Kasemir,
One of the ArchiveEngines that Johnny uses under R3.14.7 tends to crash
quite often.
The only special thing about it might be that is currently has several channels that point to a soft IOC which is down, i.e. a few unresolved channels. On the console, CAC keeps printing things like "disconnected",
"connection refused", ...
I now got a core file which shows ipAddrToAsciiAs
run into a NULL callback pointer. Last words of the engine:
Virtual circuit disconnect
pure virtual method called
core dumped
gdb backtrace:
#0 0xb6eb1c0f in raise () from /lib/tls/libc.so.6
#1 0xb6eb3415 in abort () from /lib/tls/libc.so.6
#2 0xb7079527 in __cxa_call_
../../.
#6 0xb716c158 in epicsThreadCall
../../.
#7 0xb7172ec3 in start_routine (arg=0x80899c0) at
../../.
#8 0xb7126dec in start_thread () from /lib/tls/
(gdb) fra 5
...
(gdb) list
275 {
276 epicsGuardRelease < epicsMutex > unguard (
guard );
277 // dont call callback with lock applied
278 this->pCurrent-
this->nameTmp );
279 }
(gdb) print *this
$2 = {<ipAddrToAscii
<epicsThreadRun
nameTmp = "...unreadable garbage ...",
transactionF
mutex = {<No data fields>}, pFreeList = 0x0, pChunkList = 0x0},
labor = {pFirst = 0x0, pLast = 0x0, itemCount = 0}, mutex = {id = 0x0},
laborEvent = {id = 0x0},
destructorBl
0x0, mutex = {id = 0x0}, event = {id = 0x0}, exitEvent = {id = 0x0},
pWaitReleaseFlag = 0x0,
begin = false, cancel = false, terminated = false}, pCurrent = 0x0,
cancelPendingCount = 0, exitFlag = false, callbackInProgress = false,
static globalMutex = {
id = 0x80870a0}, static pEngine = 0x80893b8, static
numberOfReferences = 1}
Note that pCurrent is 0, hence this->pCurrent-
( this->nameTmp );
crashes.
Original Mantis Bug: mantis-202
http://
Initial indications point to irregularities here.
The dump below says that the crash occurred at ipAddrToAsciiAs ynchronous. cpp:278 yet it also indicates that "this-> callbackInProgress" is false. Looking at the source I know that "this-> callbackInProgress" is set to true just prior to ipAddrToAsciiAs ynchronous. cpp:278 and set to false just after that line. The only other line in the source that modifies this variable is the constructor for ipAddrToAsciiEn ginePrivate.
Therefore, I can conclude that one of two circumstances is occurring. thread. exitWait ();" isn't working correctly (and the destructor is allowed to return before the ipAddrToAsciiEn ginePrivate thread exits). ginePrivate data structure.
1) The implementation of "this->
2) Some other agent is illegitimately modifying (corrupting) the ipAddrToAsciiEn
I am inclined to conclude that number (2) is probably the correct deduction because every non-static field in ipAddrToAsciiEn ginePrivate is zero. The fields "laborEvent = {id = 0x0}, destructorBlock Event = {id = 0x0}" both being zero is particularly suspicious. No doubt this might be allowed to occur if "this-> thread. exitWait ();" wasn’t working, but since "epicsThread: :exitWait( )" is depended upon by many threads in base then I am inclined to conclude that the probability of that outcome would be quite small.
edited on: 2005-05-31 10:06