Brian Geffon created TS-3942:
--------------------------------

             Summary: Crash when enumerating HostDB records in HostDB UI
                 Key: TS-3942
                 URL: https://issues.apache.org/jira/browse/TS-3942
             Project: Traffic Server
          Issue Type: Bug
          Components: HostDB
            Reporter: Brian Geffon


When using the show all feature of hostdb ui it will periodically crash when 
enumerating round robin dns records. This is because of a new permanent 
hostname field that I added a while back so that we have the hostname of all 
hostdb records. The problem is that when allocating each HostDBInfo structure 
for the round robin entry the code doesn't currently memset() the entire 
structure (it does in the SRV record case but for some reason not the RR case). 
This means that in certain situations if we were unlucky the memory would be 
initialized to random memory and at some point down the road it would result in 
a crash in UnsunkPtrRegistry::ptr as seen in the stack trace below. 

#0  0x00000000006d91f3 in UnsunkPtrRegistry::ptr (this=..., i=...) at 
MultiCache.cc:1314
#1  0x00000000006d922d in UnsunkPtrRegistry::ptr (this=..., i=...) at 
MultiCache.cc:1318
#2  0x00000000006d9380 in MultiCacheBase::ptr (this=..., poffset=..., 
partition=...) at MultiCache.cc:1341
#3  0x00000000006d000a in HostDBInfo::perm_hostname (this=...) at HostDB.cc:2297
#4  0x00000000006d346e in ShowHostDB::showOne (this=..., r=..., rr=..., 
event=..., e=..., hostdb_rr=...) at HostDB.cc:2505
#5  0x00000000006d2982 in ShowHostDB::showAllEvent (this=..., event=..., e=...) 
at HostDB.cc:2407
#6  0x000000000050d0a6 in Continuation::handleEvent (this=..., event=..., 
data=...) at ../iocore/eventsystem/I_Continuation.h:146
#7  0x00000000006cb8fe in HostDBContinuation::iterateEvent (this=..., 
event=..., e=...) at HostDB.cc:1087
#8  0x000000000050d0a6 in Continuation::handleEvent (this=..., event=..., 
data=...) at ../iocore/eventsystem/I_Continuation.h:146
#9  0x000000000078c3ca in EThread::process_event (this=..., e=..., 
calling_code=...) at UnixEThread.cc:144
#10 0x000000000078c6e5 in EThread::execute (this=...) at UnixEThread.cc:223
#11 0x000000000053e6a2 in main (argv=...) at Main.cc:1765



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to