<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - clang-cl (10.0.0-rc1) + MsBuild = memory hog"
href="https://bugs.llvm.org/show_bug.cgi?id=44810">44810</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang-cl (10.0.0-rc1) + MsBuild = memory hog
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>10.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>release blocker
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>andre.brand@mailbox.org
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>Overview: clang-cl as of 10.0.0-rc1 inside a MsBuild project consumes
significantly more memory than clang-cl 9.0.1. My Visual Studio solution that
previously ran with 6 parallel projects now uses up all my 16 GB of memory and
renders my system unusable or eventually crashes (even when I don't use
parallel projects!).
Adding -fno-integrated-cc1 fixes the problem.
I guess this affects all users of the llvm plugin in Visual Studio. That's why
I am so overly dramatic with the severity. ;-)
Steps to Reproduce:
1) Unfortunately, I cannot share the code. The setup is VS2017 with the llvm
plugin. It ran perfectly with 6 parallel projects on clang-8.0 and clang-9.0.
2) Test with clang-10.0.0-rc1 immediately slows down my whole system and the
build eventually crashes (or rather gets killed by the OS).
3) Another try with the additional -fno-integrated-cc1 and I am back to the old
performance behavior.
A summary with perfmon is attached. Please let me know if I can provide any
other kind of information that might help. Other than the source code, of
course. :-(
Because the parallel build is killed by the system early on, I profiled a build
without parallelism. The other builds that I included for comparison also use
only one processor core and take multiple hours.
I hope this issue is easy to reproduce because MsBuild passes ALL the object
files of a project (lib/dll/exe) to the compiler at once. So the clang-cl
process that does the compilation lives for a really long time in big projects.
A speculation from my part: this feels like a memory leak that was benign
before because the process got shut down anyway.
Actual Results:
All RAM of the system used up.
Expected Results:
Same memory consumption as with -fno-integrated-cc1
Build Date:
LLVM-10.0.0-rc1-win64.exe
Hardware:
Number of cores 4 (max 4)
Number of threads 8 (max 8)
Name Intel Core i7 3770
Codename Ivy Bridge
Specification Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz
Package (platform ID) Socket 1155 LGA (0x1)
CPUID 6.A.9
Extended CPUID 6.3A
Core Stepping E1/L1
Technology 22 nm
TDP Limit 77.0 Watts
Tjmax 105.0 °C
Core Speed 1599.6 MHz
Multiplier x Bus Speed 16.0 x 100.0 MHz
Base frequency (cores) 100.0 MHz
Base frequency (ext.) 100.0 MHz
Stock frequency 3400 MHz
Instructions sets MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, EM64T,
VT-x, AES, AVX
Microcode Revision 0x17
L1 Data cache 4 x 32 KBytes, 8-way set associative, 64-byte line size
L1 Instruction cache 4 x 32 KBytes, 8-way set associative, 64-byte line size
L2 cache 4 x 256 KBytes, 8-way set associative, 64-byte line
size
L3 cache 8 MBytes, 16-way set associative, 64-byte line size
Northbridge Intel Ivy Bridge rev. 09
Southbridge Intel H77 rev. 04
Graphic Interface PCI-Express
PCI-E Link Width x16
PCI-E Max Link Width x16
Memory Type DDR3
Memory Size 16 GBytes
Channels Dual
Memory Frequency 666.8 MHz (1:5)
CAS# latency (CL) 9.0
RAS# to CAS# delay (tRCD) 9
RAS# Precharge (tRP) 9
Cycle Time (tRAS) 24
Command Rate (CR) 1T
Host Bridge 0x0150</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>