<div dir="ltr">Thanks, that seems to help!</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 8, 2015 at 4:09 PM, Chris Bieneman <span dir="ltr"><<a href="mailto:beanz@apple.com" target="_blank">beanz@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Sorry for the late reply on this. 10.10 and later hit a threading bug on OS X that causes a number of tests *usually equal to the number of hardware threads on your system) to fail. The workaround for this is to modify the taskgated launch daemon so that it only uses one thread. You can do so by editing the launchd plist at /System/Library/LaunchDaemons/com.apple.taskgated.plist to resemble this:<div><br></div><div><div><?xml version="1.0" encoding="UTF-8"?></div><div><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "<a href="http://www.apple.com/DTDs/PropertyList-1.0.dtd" target="_blank">http://www.apple.com/DTDs/PropertyList-1.0.dtd</a>"></div><div><plist version="1.0"></div><div><dict></div><div><span style="white-space:pre-wrap">        </span><key>POSIXSpawnType</key></div><div><span style="white-space:pre-wrap">    </span><string>Interactive</string></div><div><span style="white-space:pre-wrap"> </span><key>EnableTransactions</key></div><div><span style="white-space:pre-wrap">        </span><true/></div><div><span style="white-space:pre-wrap">    </span><key>Label</key></div><div><span style="white-space:pre-wrap">     </span><string>com.apple.taskgated</string></div><div><span style="white-space:pre-wrap"> </span><key>MachServices</key></div><div><span style="white-space:pre-wrap">      </span><dict></div><div><span style="white-space:pre-wrap">             </span><key>com.apple.taskgated</key></div><div><span style="white-space:pre-wrap">               </span><dict></div><div><span style="white-space:pre-wrap">                     </span><key>TaskSpecialPort</key></div><div><span style="white-space:pre-wrap">                   </span><integer>9</integer></div><div><span style="white-space:pre-wrap">         </span></dict></div><div><span style="white-space:pre-wrap">    </span></dict></div><div><span style="white-space:pre-wrap">    </span><key>ProgramArguments</key></div><div><span style="white-space:pre-wrap">  </span><array></div><div><span style="white-space:pre-wrap">            </span><string>/usr/libexec/taskgated</string></div><div><span style="white-space:pre-wrap">              </span><string>-s</string></div><div><span style="white-space:pre-wrap">          </span><string>-m</string></div><div><span style="white-space:pre-wrap">          </span><string>1</string></div><div><span style="white-space:pre-wrap">   </span></array></div><div></dict></div><div></plist></div><div><br></div><div>After editing the file, you’ll need to run:</div><div><br></div><div>sudo launchctl unload /System/Library/LaunchDaemons/com.apple.taskgated.plist && sudo launchctl load /System/Library/LaunchDaemons/com.apple.taskgated.plist</div><div><br></div><div>That should restart the daemon and all will work.</div><div><br></div><div>-Chris</div><div><br><div><blockquote type="cite"><div><div class="h5"><div>On Sep 4, 2015, at 2:33 PM, Filipe Cabecinhas via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:</div><br></div></div><div><div><div class="h5"><div dir="ltr">If you have:<div>llvm, clang, libcxx libcxxabi, compiler-rt, lld</div><div>Then you get around 31K tests. IIRC, those problems were arising before Chris Bieneman fixed compiler-rt tests to not test iOS arches on a Mac.</div><div><br></div><div>Right now, even enabling compiler-rt for iOS will still generate ~31K tests. But it's very close to the limit.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Regards,<br clear="all"><div><div>  Filipe<br></div></div>
<br><div class="gmail_quote">On Fri, Sep 4, 2015 at 12:49 PM, Sean Silva <span dir="ltr"><<a href="mailto:chisophugis@gmail.com" target="_blank">chisophugis@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Fri, Sep 4, 2015 at 12:46 PM, Sean Silva <span dir="ltr"><<a href="mailto:chisophugis@gmail.com" target="_blank">chisophugis@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Fri, Sep 4, 2015 at 10:27 AM, Nico Weber via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br></span><span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div><div>building 'check-all' on any of my machines running OS X 10.10 usually fails because a few tests fail due to some processes being killed by the kernel (there's always "Killed: 9" somewhere in lit's error output). Everything's fine on 10.9.</div><div><br></div><div>How do folks deal with this? Don't use 10.10 for building llvm? Is there some tweakable to tell the kernel "please don't kill my processes"?</div><div><br></div><div>Here's an example from just now:</div><div><br></div><div>FAIL: LLVM :: MC/X86/shuffle-comments.s (18589 of 28139)</div></div></blockquote><div><br></div></span><div>Btw, for the sake of having this in writing somewhere: one other thing I've run into (I was generating a huge number of lit tests for an artificial reason; wasn't during normal development) is that once you go past ~32K tests (2^15) lit's current way it queues up processes will cause it to completely hang on Mac. Essentially the problem is that it has a for loop like:</div><div><br></div><div>for t in tests:</div><div>    push_onto_threadsafe_queue(t)</div><div>... kick off worker threads that consume from the queue ...</div></div></div></div></blockquote><div><br></div></span><div>Maybe clearer:</div><span><div><br></div><div><div>for t in tests:</div><div>    push_onto_threadsafe_queue(t)</div></div><div>...</div><div>kick off worker threads that consume from the queue<br></div><div>...</div><div><br></div></span><div>i.e. It pushes all tests onto the queue before it starts kicking off jobs.</div><span><font color="#888888"><div><br></div><div>-- Sean Silva</div></font></span><span><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>unfortunately, push_onto_threadsafe_queue ups an OS semaphore and on mac there is an upper limit of ~32K. Once you hit that the push_onto_threadsafe_queue operation will block and therefore lit will be completely blocked.</div><div><br></div><div>Someday we will need to e.g. spawn off a feeder thread to do the push_onto_threadsafe_queue loop.</div><div><br></div><div>Filipe, did you say that you had actually run into the 32K limit at some point during regular development? (what combination of LLVM repos were checked out and being tested simultaneously?)</div><span><font color="#888888"><div><br></div><div>-- Sean Silva</div><div> </div></font></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span><div dir="ltr"><div>******************** TEST 'LLVM :: MC/X86/shuffle-comments.s' FAILED ********************</div><div>Script:</div><div>--</div><div>/Users/thakis/src/chromefetch/src/third_party/llvm-bootstrap/./bin/llvm-mc /Volumes/MacintoshHD2/src/chromefetch/src/third_party/llvm/test/MC/X86/shuffle-comments.s -triple=x86_64-unknown-unknown | /Users/thakis/src/chromefetch/src/third_party/llvm-bootstrap/./bin/FileCheck /Volumes/MacintoshHD2/src/chromefetch/src/third_party/llvm/test/MC/X86/shuffle-comments.s</div><div>--</div><div>Exit Code: 137</div><div><br></div><div>Command Output (stderr):</div><div>--</div><div>/Volumes/MacintoshHD2/src/chromefetch/src/third_party/llvm-bootstrap/test/MC/X86/Output/shuffle-comments.s.script: line 1: 47457 Killed: 9               /Users/thakis/src/chromefetch/src/third_party/llvm-bootstrap/./bin/llvm-mc /Volumes/MacintoshHD2/src/chromefetch/src/third_party/llvm/test/MC/X86/shuffle-comments.s -triple=x86_64-unknown-unknown</div><div>     47459                       | /Users/thakis/src/chromefetch/src/third_party/llvm-bootstrap/./bin/FileCheck /Volumes/MacintoshHD2/src/chromefetch/src/third_party/llvm/test/MC/X86/shuffle-comments.s</div><div><br></div><div><br></div><div>Thanks,</div><div>Nico</div></div>
<br></span><span>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
<br></span></blockquote></div><br></div></div>
</blockquote></span></div><br></div></div>
</blockquote></div><br></div></div></div></div>
_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br></div></blockquote></div><br></div></div></div></blockquote></div><br></div>