[ 
https://issues.apache.org/jira/browse/TS-2594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13944637#comment-13944637
 ] 

Alan M. Carroll commented on TS-2594:
-------------------------------------

Solutions:

That's a bit trickier. The brute force approach would be to update the MIME 
data with current WKS values as they are read from disk. That is, effectively 
not store the values by recomputing them every time. It's unclear if this would 
be a noticeable performance hit - the string to WKS calculation appears to be 
fast and there are rarely a particularly large number of fields in a header, 
although the total count can aggregate for objects with many alternates. This 
approach has the advantage that it's compatible with any version (or mixed 
versions) of objects stored in the cache.

If the performance cost of this is too high, then we will need to have a 
mechanism to "lock down" the WKS values. I've spent a lot of time pondering 
that and I think the best option is to encode that in the same array that sets 
the slot index and presence bit mask. It would be a pain to track down the 
current values but it would be a one time cost. Going forward, however, we 
would need to put every string with a WKS index in that array and update when a 
string was added. On the other hand, we could reduce the multiple defining 
arrays and use the _hdrtoken_strs_field_initializers for everything.

It should be noted that *removing* a string will be tricky - the WKS arrays are 
presumed compact although really the only cost is some wasted space in the 
arrays. It seems unlikely to be a problem that won't be de facto handled by 
cache format changes (in that, if the cache format changes for other reasons, 
we can re-compact the WKS arrays with out additional cost).

> Segmentation fault for 4.2.0-rc0
> --------------------------------
>
>                 Key: TS-2594
>                 URL: https://issues.apache.org/jira/browse/TS-2594
>             Project: Traffic Server
>          Issue Type: Bug
>    Affects Versions: 4.2.0
>            Reporter: bettydramit
>              Labels: crash
>             Fix For: 4.2.0, 5.0.0
>
>
> {code}
> [E. Mgmt] log ==> [TrafficManager] using root directory '/usr'
> [TrafficServer] using root directory '/usr'
> NOTE: Traffic Server received Sig 11: Segmentation fault
> /usr/bin/traffic_server - STACK TRACE: 
> /lib64/libpthread.so.0(+0xf70f)[0x2b4e95ab670f]
> /lib64/libc.so.6(memcpy+0xe)[0x2b4e96a4595e]
> /usr/lib64/trafficserver/libtsutil.so.4(StrList::_new_cell(char const*, 
> int)+0xef)[0x2b4e939ac88f]
> /usr/bin/traffic_server(StrList::new_cell(char const*, int)+0x9f)[0x5ff919]
> /usr/bin/traffic_server(StrList::append_string(char const*, 
> int)+0x28)[0x5ff9ce]
> /usr/bin/traffic_server(mime_field_value_get_comma_list(MIMEField*, 
> StrList*)+0x51)[0x602a39]
> /usr/bin/traffic_server(MIMEField::value_get_comma_list(StrList*)+0x22)[0x551052]
> /usr/bin/traffic_server(MIMEHdr::value_get_comma_list(char const*, int, 
> StrList*)+0x4a)[0x5510a0]
> /usr/bin/traffic_server(HttpTransactCache::CalcVariability(CacheLookupHttpConfig*,
>  HTTPHdr*, HTTPHdr*, HTTPHdr*)+0xab)[0x5a3399]
> /usr/bin/traffic_server(HttpTransactCache::calculate_quality_of_match(CacheLookupHttpConfig*,
>  HTTPHdr*, HTTPHdr*, HTTPHdr*)+0xc68)[0x5a19b0]
> /usr/bin/traffic_server(HttpTransactCache::SelectFromAlternates(CacheHTTPInfoVector*,
>  HTTPHdr*, CacheLookupHttpConfig*)+0x28c)[0x5a0a7e]
> /usr/bin/traffic_server(CacheVC::openReadStartHead(int, 
> Event*)+0x5f2)[0x68e590]
> /usr/bin/traffic_server(Continuation::handleEvent(int, void*)+0x6b)[0x4e7137]
> /usr/bin/traffic_server(CacheVC::handleReadDone(int, Event*)+0x1127)[0x66bfa9]
> /usr/bin/traffic_server(Continuation::handleEvent(int, void*)+0x6b)[0x4e7137]
> /usr/bin/traffic_server(AIOCallbackInternal::io_complete(int, 
> void*)+0x3b)[0x671371]
> /usr/bin/traffic_server(Continuation::handleEvent(int, void*)+0x6b)[0x4e7137]
> /usr/bin/traffic_server(EThread::process_event(Event*, int)+0xc7)[0x6d9165]
> /usr/bin/traffic_server(EThread::execute()+0x9f)[0x6d9333]
> /usr/bin/traffic_server(main+0x122f)[0x50e634]
> /lib64/libc.so.6(__libc_start_main+0xfc)[0x2b4e969dad1c]
> /usr/bin/traffic_server[0x4ca098]
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to