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

ASF subversion and git services commented on TS-1921:
-----------------------------------------------------

Commit 1ca7c1a5e1a51f81d764cd92e86771d9b85c4efb in branch refs/heads/master 
from James Peach <jpe...@apache.org>
[ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=1ca7c1a ]

TS-1921: Fix reclaimable freelist stuck in infinite loop

The initialization order of static variables is fragile, so let's
use ats_pagesize() to replace the page_size static variable in
reclaimable freelist, and do some optimization for ats_pagesize().

                
> reclaimable freelist stuck in infinite loop
> -------------------------------------------
>
>                 Key: TS-1921
>                 URL: https://issues.apache.org/jira/browse/TS-1921
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Core
>            Reporter: James Peach
>         Attachments: 
> 0001-TS-1921-Fix-reclaimable-freelist-stuck-in-infinite-l.patch
>
>
> {code}
> flathead:build jpeach$ ./libtool --mode=execute lldb -- 
> ./proxy/traffic_server -R 1 -r SDK_API_TSNetVConn
> Current executable set to '/Users/jpeach/build/proxy/.libs/traffic_server' 
> (x86_64).
> ...
> (lldb) run
> Process 65112 launched: '/Users/jpeach/build/proxy/.libs/traffic_server' 
> (x86_64)
> ...
> Process 65112 stopped
> * thread #1: tid = 0x1c03, 0x0000000100c00b51 
> libtsutil.3.dylib`memory_alignment_init(f=0x0000000101007040, type_size=1024, 
> chunk_size=4294967295, alignment=0) + 401 at ink_queue_ext.cc:150, stop 
> reason = signal SIGSTOP
>     frame #0: 0x0000000100c00b51 
> libtsutil.3.dylib`memory_alignment_init(f=0x0000000101007040, type_size=1024, 
> chunk_size=4294967295, alignment=0) + 401 at ink_queue_ext.cc:150
>    147            if (chunk_size > 1) {
>    148              /* make alignment to be (2^N * page_size),
>    149               * but not larger than MAX_CHUNK_BYTE_SIZE */
> -> 150              while (alignment < chunk_byte_size)
>    151                alignment <<= 1;
>    152            }
>    153          }
> (lldb) p alignment
> (uint32_t) $0 = 0
> (lldb) p chunk_byte_size
> (uint32_t) $1 = 0
> ...
> (lldb) bt
> * thread #1: tid = 0x1c03, 0x0000000100c00b51 
> libtsutil.3.dylib`memory_alignment_init(f=0x0000000101007040, type_size=1024, 
> chunk_size=4294967295, alignment=0) + 401 at ink_queue_ext.cc:150, stop 
> reason = signal SIGSTOP
>     frame #0: 0x0000000100c00b51 
> libtsutil.3.dylib`memory_alignment_init(f=0x0000000101007040, type_size=1024, 
> chunk_size=4294967295, alignment=0) + 401 at ink_queue_ext.cc:150
>     frame #1: 0x0000000100c0094a 
> libtsutil.3.dylib`reclaimable_freelist_init(fl=0x0000000100c2fc18, 
> name=0x0000000100c1f0e0, type_size=1024, chunk_size=128, alignment=8) + 282 
> at ink_queue_ext.cc:471
>     frame #2: 0x0000000100bffec1 
> libtsutil.3.dylib`ink_freelist_init(fl=0x0000000100c2fc18, 
> name=0x0000000100c1f0e0, type_size=1024, chunk_size=128, alignment=8) + 49 at 
> ink_queue.cc:89
>     frame #3: 0x0000000100175621 
> traffic_server`Allocator::Allocator(this=0x0000000100c2fc18, 
> name=0x0000000100c1f0e0, element_size=1024, chunk_size=128, alignment=8) + 49 
> at Allocator.h:87
>     frame #4: 0x0000000100174e71 
> traffic_server`Allocator::Allocator(this=0x0000000100c2fc18, 
> name=0x0000000100c1f0e0, element_size=1024, chunk_size=128, alignment=8) + 49 
> at Allocator.h:88
>     frame #5: 0x0000000100bf3367 libtsutil.3.dylib`__cxx_global_var_init + 39 
> at Arena.cc:33
>     frame #6: 0x0000000100bf3379 libtsutil.3.dylib`_GLOBAL__I_a + 9 at 
> Arena.cc:88
>     frame #7: 0x00007fff5fc13378 
> dyld`ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 
> 236
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to