<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Oct 1, 2015 at 9:35 AM, Hal Finkel <span dir="ltr"><<a href="mailto:hfinkel@anl.gov" target="_blank">hfinkel@anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Rui, et al.,<br>
<br>
I was experimenting yesterday with building lld on my POWER7 PPC64/Linux machine, and ran into an unfortunate problem. When running the regressions tests under lit, almost all of the tests fail like this:<br>
<br>
terminate called after throwing an instance of 'std::system_error'<br>
  what():  Resource temporarily unavailable<br>
...<br>
5  libc.so.6       0x00000080b7847238 abort + 4293480680<br>
6  libstdc++.so.6  0x00000fff94f0f004 __gnu_cxx::__verbose_terminate_handler() + 4294099316<br>
7  libstdc++.so.6  0x00000fff94f0bc84<br>
8  libstdc++.so.6  0x00000fff94f0bccc std::terminate() + 4294087956<br>
9  libstdc++.so.6  0x00000fff94f0c0c4 __cxa_throw + 4294088780<br>
10 libstdc++.so.6  0x00000fff94f816e0 std::__throw_system_error(int) + 4294526808<br>
11 libstdc++.so.6  0x00000fff94f83d30 std::thread::_M_start_thread(std::shared_ptr<std::thread::_Impl_base>) + 4294534936<br>
12 lld             0x000000001002a278<br>
...<br>
<br>
which seems to indicate a core problem here with dealing with thread-resource exhaustion. For almost all tests, running them individually (or using lit -j 1) works without a problem. We could deal with this by limiting the number of threads lld uses when running regression tests, or limit the number of threads that lit uses when running lld tests (as we currently do with the OpenMP runtime tests), but I'm somewhat concerned that users will run into this program regardless with heavily-parallelized builds.<br>
<br>
We could try to catch exceptions that otherwise come from ThreadPoolExecutor's constructor, but do we compile with exceptions enabled?<br></blockquote><div><br></div><div>I guess we do not want to enable exceptions to deal with the issue. Are COFF tests failing, or just ELF tests? If ELF tests for the old LLD are failing, the best way would be to not use threads in the old LLD. It has lingering threading issues.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Thanks again,<br>
Hal<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Hal Finkel<br>
Assistant Computational Scientist<br>
Leadership Computing Facility<br>
Argonne National Laboratory<br>
</font></span></blockquote></div><br></div></div>