<div dir="ltr">Thanks. Looking into it ..<div><br></div><div>David</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 25, 2016 at 11:42 AM, Steven Wu <span dir="ltr"><<a href="mailto:stevenwu@apple.com" target="_blank">stevenwu@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> On May 25, 2016, at 11:24 AM, Vedant Kumar <<a href="mailto:vsk@apple.com">vsk@apple.com</a>> wrote:<br>
><br>
> Hi David,<br>
><br>
</span><span class="">> We're seeing another issue that we think is related to the recent static VP node allocation changes. Instrumented programs are hitting a segfault:<br>
><br>
> ```<br>
> 458.sjeng is fixed but 445.gobmk is broken.<br>
> LLVM Profile Warning: Unable to track new values: Running out of static counters.  Consider using option -mllvm -vp-counters-per-site=<n> to allocate more value profile counters at compile time.<br>
> /Users/buildslave/jenkins/workspace/Performance_ARM64_SPEC2006_INT-O3_LTO_PGO-master/spec2006/cur_run/nt/build/LNTBased/speccpu2006/int/445.gobmk/tools/timeit-target: error: child terminated by signal 11<br>
> ```<br>
><br>
> The backtrace is:<br>
><br>
> ```<br>
> * frame #0: 0x0000000100112f10 445.gobmk.simple`__llvm_profile_instrument_target + 132 at InstrProfilingValue.c:137<br>
>    frame #1: 0x000000010007d528 445.gobmk.simple`shapes_callback + 2352<br>
>    frame #2: 0x0000000100035b0c 445.gobmk.simple`matchpat_loop + 2088<br>
>    frame #3: 0x0000000100034b38 445.gobmk.simple`matchpat_goal_anchor + 1124<br>
>    frame #4: 0x000000010007cb0c 445.gobmk.simple`shapes + 384<br>
>    frame #5: 0x0000000100029e4c 445.gobmk.simple`do_genmove + 2344<br>
>    frame #6: 0x00000001000a5a48 445.gobmk.simple`gtp_gg_genmove + 216<br>
>    frame #7: 0x0000000100099a6c 445.gobmk.simple`gtp_main_loop + 660<br>
>    frame #8: 0x000000010009bd00 445.gobmk.simple`main + 7188<br>
> ```<br>
><br>
> In __llvm_profile_instrument_target(), it looks like we're failing the condition: CounterIndex < NumVSites.<br>
<br>
</span>I don't think these line number actually make sense when I am actually reading the assembly. It is more likely:<br>
 ValueProfNode *CurrentVNode = ValueCounters[CounterIndex];<br>
CurrentVNode is corrupted and pointed to somewhere completely unreasonable. Program segfault as soon as it gets dereferenced:<br>
 if (TargetValue == CurrentVNode->Value) {<br>
<span class="HOEnZb"><font color="#888888"><br>
Steven<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
><br>
> Do you mind taking a look?<br>
><br>
> thanks,<br>
> vedant<br>
><br>
><br>
>> On May 23, 2016, at 12:29 PM, Xinliang David Li <<a href="mailto:davidxl@google.com">davidxl@google.com</a>> wrote:<br>
>><br>
>> Fix is on the way.<br>
>><br>
>> David<br>
>><br>
>> On Mon, May 23, 2016 at 12:27 PM, Vedant Kumar <<a href="mailto:vsk@apple.com">vsk@apple.com</a>> wrote:<br>
>><br>
>>> On May 23, 2016, at 12:19 PM, Xinliang David Li <<a href="mailto:davidxl@google.com">davidxl@google.com</a>> wrote:<br>
>>><br>
>>><br>
>>><br>
>>> On Mon, May 23, 2016 at 12:15 PM, Vedant Kumar <<a href="mailto:vsk@apple.com">vsk@apple.com</a>> wrote:<br>
>>> Hi David,<br>
>>><br>
>>> I think one of the SPEC2006 tests doesn't have enough statically-allocated VP nodes per site. We're seeing:<br>
>>><br>
>>>> "Child terminated by signal 25" (SIGXFSZ) after:<br>
>>><br>
>>> Is this related?<br>
>><br>
>> I don't think so. I suspect that's happening because the device is overloaded with logging info.<br>
>><br>
>><br>
>>>><br>
>>>> LLVM Profile Warning: Running out of nodes: site_0@func_12822962448227433604, value=4295054468<br>
>>>> ...<br>
>>>> LLVM Profile Warning: Running out of nodes: site_0@func_12822962448227433604, value=4295052980<br>
>>>> LLVM Profile Warning: Running out of nodes: site_0@func_12822962/Users/buildslave/jenkins/workspace/Performance_ARM64_SPEC2006_INT-O3_LTO_PGO-master/spec2006/cur_run/nt/build/LNTBased/speccpu2006/int/458.sjeng<br>
>>><br>
>>> It seems like the fix for now is to either tweak vp-counters-per-site for the test or to set -vp-static-alloc=false.<br>
>>><br>
>>> In the long term, do you think it's worth adjusting vp-counters-per-site s.t we can run SPEC without modifications? If so, is SPEC the right testbed?<br>
>>><br>
>>> Rong had helped collecting SPEC related statistics, but looks like there is something missing.  I will investigate. In the meantime, can you try the workaround?<br>
>><br>
>> Yes, we'll do that.<br>
>><br>
>> Here's all the logging info from our bot:<br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> thanks,<br>
>> vedant<br>
>><br>
>><br>
>>><br>
>>> thanks,<br>
>>><br>
>>> David<br>
>>><br>
>>><br>
>>> thanks,<br>
>>> vedant<br>
>>><br>
>><br>
>><br>
>><br>
><br>
<br>
</div></div></blockquote></div><br></div>