[AGENT++] AgentX++ master agent dumps core

Frank Fock fock at agentpp.com
Wed Apr 2 22:43:22 CEST 2008


Hi Abil,

I could not reproduce the problem, however I found a possible
bug in MasterAgentXMib::remove_indexes. Please add the following
two lines to it and try again to reproduce the problem

void MasterAgentXMib::remove_indexes(u_int sid)
{
	lock_reg();
         ...
	unlock_reg();
}

Best regards,
Frank


Frank Fock wrote:
> Hi Abil,
> 
> I will have look into this. This has not been reported before.
> 
> Best regards,
> Frank
> 
> Abil George wrote:
>> AgentX++ master agent dumps core when multiple (4) AgentX++ sub agents 
>> registered (connected) to this master agent are killed simultaneously 
>> using kill -9 command. I have pasted the the stack traces for these 
>> dumps. For multiple runs of same test, I have got different traces.
>>
>> Please let me know any one has seen this issue before and know the 
>> solution.
>> The version I am using
>> SNMP++v3.2.23
>> AgentX++ v1.4.16
>>
>> AGENT++v3.5.29
>>
>> The traces which I got from the test run.
>>
>> Trace 1)
>>
>> t at 3 (l at 3) signal SEGV (no mapping at the fault address) in 
>> Oid::nCompare at line 660 in file "oid.cpp"
>>   660       if (smival.value.oid.ptr[z] < o.smival.value.oid.ptr[z])
>> (dbx) where                current thread: t at 3
>> =>[1] Oid::nCompare(this = 0x10047a230, n = 17238U, o = CLASS), line 
>> 660 in "oid.cpp"
>>   [2] operator<(lhs = CLASS, rhs = CLASS), line 277 in "oid.cpp"
>>   [3] operator<=(lhs = CLASS, rhs = CLASS), line 199 in "oid.h"
>>   [4] OidxPtrEntryPtrAVLMap::seek(this = 0x1004ccc40, key = 
>> 0x10047a230), line 212 in "avl_map.cpp"
>>   [5] OidList<AgentXIndexEntry>::find(this = 0x1004d5630, oidptr = 
>> 0x10047a230), line 733 in "List.h"
>>   [6] OidList<AgentXIndexEntry>::remove(this = 0x1004d5630, oidptr = 
>> 0x10047a230), line 727 in "List.h"
>>   [7] AgentXIndex::remove_session(this = 0x1004d55e0, sid = 4U), line 
>> 255 in "agentx_index.cpp"
>>   [8] AgentXIndexDB::remove_session(this = 0x100176f20, sid = 4U), 
>> line 357 in "agentx_index.cpp"
>>   [9] MasterAgentXMib::remove_indexes(this = 0x100133a60, sid = 4U), 
>> line 2148 in "agentx_master.cpp"
>>   [10] MasterAgentXMib::remove_peer(this = 0x100133a60, peer = CLASS), 
>> line 763 in "agentx_master.cpp"
>>   [11] AgentXCloseTask::run(this = 0x1004ef090), line 73 in 
>> "agentx_master.cpp"
>>   [12] TaskManager::run(this = 0x1001745c0), line 783 in "threads.cpp"
>>   [13] thread_starter(t = 0x1001745f8), line 492 in "threads.cpp"
>>
>> Trace 2)
>>
>> t at 3 (l at 3) signal SEGV (no mapping at the fault address) in 
>> pthread_mutex_lock at 0x7fffffff7e21436c
>> 0x7fffffff7e21436c: pthread_mutex_lock+0x0014:  ldub     [%i0 + 5], %l1
>> Current function is Synchronized::lock
>>   401       pthread_mutex_lock(&monitor);
>> (dbx) where                current thread: t at 3
>>   [1] pthread_mutex_lock(0x1a, 0x0, 0x7fffffff7cc00800, 
>> 0xfffffffffffffff8, 0x4, 0x0), at 0x7fffffff7e21436c =>[2] 
>> Synchronized::lock(this = 0xa), line 401 in "threads.cpp"
>>   [3] ThreadManager::start_synch(this = 0x2), line 143 in "threads.cpp"
>>   [4] Mib::remove(this = 0x100133a60, context = CLASS, oid = CLASS), 
>> line 2907 in "mib.cpp"
>>   [5] MasterAgentXMib::remove_entry(this = 0x100133a60, cid = 1U, reg 
>> = CLASS), line 2071 in "agentx_master.cpp"
>>   [6] MasterAgentXMib::remove_entries(this = 0x100133a60, cid = 1U, 
>> sid = 1U), line 2187 in "agentx_master.cpp"
>>   [7] MasterAgentXMib::remove_peer(this = 0x100133a60, peer = CLASS), 
>> line 767 in "agentx_master.cpp"
>>   [8] AgentXCloseTask::run(this = 0x10074db50), line 73 in 
>> "agentx_master.cpp"
>>   [9] TaskManager::run(this = 0x1001745c0), line 783 in "threads.cpp"
>>   [10] thread_starter(t = 0x1001745f8), line 492 in "threads.cpp"
>>
>>
>> Trace 3)
>>
>> t at 3 (l at 3) signal SEGV (access to address exceeded protections) in 
>> realfree at 0x7fffffff7dc4f78c
>> 0x7fffffff7dc4f78c: realfree+0x021c:    stx      %l1, [%g4 + 16]
>> Current function is Oid::Oid
>>   154       smival.value.oid.ptr = (SmiLPUINT32) new unsigned 
>> long[oid_len];
>> (dbx) where                current thread: t at 3
>>   [1] realfree(0x10041dc10, 0x7fffffff7ddb6f78, 0x7fffffff7cd00000, 
>> 0x37d20, 0x7fffffff7cd40280, 0x7fffffff7c70fa6c), at 
>> 0x7fffffff7dc4f78c   [2] cleanfree(0x0, 0x1003dce90, 0x20, 
>> 0x7fffffff7f42c18c, 0x7fffffff7e10ca70, 0x4), at 0x7fffffff7dc4fedc   
>> [3] _malloc_unlocked(0x8, 0x0, 0x7fffffff7cc00800, 0xbbd8, 
>> 0x7fffffff7cd41e40, 0x7fffffff7c70fa68), at 0x7fffffff7dc4efbc   [4] 
>> malloc(0x8, 0x5044, 0x28223fe0, 0x37d20, 0x7fffffff7cd40280, 0x0), at 
>> 0x7fffffff7dc4ee94   [5] operator new(0x8, 0x7fffffff7e007830, 
>> 0x7fffffff7cc00800, 0x104274, 0x7fffffff7e10ca70, 0xfffffffeffc06200), 
>> at 0x7fffffff7e008820 =>[6] Oid::Oid(this = 0x7fffffff7c70f390, 
>> raw_oid = 0x7fffffff7c70f3c8, oid_len = 1), line 154 in "oid.cpp"
>>   [7] Oid::operator+=(this = 0x7fffffff7c70f560, i = 3U), line 393 in 
>> "oid.cpp"
>>   [8] Oidx::operator+=(this = 0x7fffffff7c70f560, i = 3U), line 636 in 
>> "snmp_pp_ext.cpp"
>>   [9] agentxRegistrationEntry::remove(this = 0x100137780, cid = 3U, 
>> sid = 3U, rid = 428U), line 328 in "agentx_mib.cpp"
>>   [10] MasterAgentXMib::remove_entry(this = 0x100133a60, cid = 3U, reg 
>> = CLASS), line 2085 in "agentx_master.cpp"
>>   [11] MasterAgentXMib::remove_entries(this = 0x100133a60, cid = 3U, 
>> sid = 3U), line 2187 in "agentx_master.cpp"
>>   [12] MasterAgentXMib::remove_peer(this = 0x100133a60, peer = CLASS), 
>> line 767 in "agentx_master.cpp"
>>   [13] AgentXCloseTask::run(this = 0x1006726e0), line 73 in 
>> "agentx_master.cpp"
>>   [14] TaskManager::run(this = 0x1001745c0), line 783 in "threads.cpp"
>>   [15] thread_starter(t = 0x1001745f8), line 492 in "threads.cpp"
>>
>> Thanks,
>> Abil.
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> AGENTPP mailing list
>> AGENTPP at agentpp.org
>> http://lists.agentpp.org/mailman/listinfo/agentpp
> 

-- 
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com



More information about the AGENTPP mailing list