[llvm-bugs] [Bug 44810] New: clang-cl (10.0.0-rc1) + MsBuild = memory hog

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Feb 6 01:44:44 PST 2020


https://bugs.llvm.org/show_bug.cgi?id=44810

            Bug ID: 44810
           Summary: clang-cl (10.0.0-rc1) + MsBuild = memory hog
           Product: clang
           Version: 10.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: andre.brand at mailbox.org
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200206/e333f3db/attachment.html>


More information about the llvm-bugs mailing list