OK - the memory hog was the original error I had with our original (sadly proprietary) source code - before I added ulimit and stripped it down to the smallest possible code. In both cases the error was a seg- fault so I didn't notice when or if the memory hog went away.
I'll see what I can do to get the original code released in case there is a second bug. What compiler/linker version is used in yakkety? Also - I can't seem to install binutils-dbgsym package - does this exist? -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to binutils in Ubuntu. https://bugs.launchpad.net/bugs/1608898 Title: ld crash generating map file for c++11 auto return type inference Status in binutils package in Ubuntu: Fix Released Status in binutils source package in Xenial: New Bug description: I'm getting a crash in ld while linking C++-11 auto return type code. ld starts madly allocating memory until your memory and swap are filled, then seg-faults. Use ulimit to avoid swap thrashing while reproducing: $ ulimit -v 2147483648 # 2GB $ g++ -Wall -ggdb -O0 --std=c++11 -Werror -Wl,-Map=_timing.map _timing_ld_crash_map.cpp -o _timing collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped compilation terminated. I've reduced the input source which is attached as _timing_ld_crash_map.cpp. The following changes (on their own) make the problem "go away": 1. remove -Wl,-Map=...map from the command-line 2. stepping up to -O1 or higher. -Og fails must like -O0. 3. Making `runTest` `static` It seems likely the compiler is emitting a symbol or symbols causing binutils to choke during mapfile generation. Its possible the compiler could be partly at fault, but clearly ld shouldn't max out the memory. Wrapping the body (not the #includes) in #pragma optimisation for -O3 doesn't fix things so likely the std library symbols in <vector> are part of the problem. $ lsb_release -rd Description: Ubuntu 16.04 LTS Release: 16.04 $ apt-cache policy binutils gcc g++ binutils: Installed: 2.26.1-1ubuntu1~16.04.1 Candidate: 2.26.1-1ubuntu1~16.04.1 Version table: *** 2.26.1-1ubuntu1~16.04.1 500 500 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages 100 /var/lib/dpkg/status 2.26-8ubuntu2 500 500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages gcc: Installed: 4:5.3.1-1ubuntu1 Candidate: 4:5.3.1-1ubuntu1 Version table: *** 4:5.3.1-1ubuntu1 500 500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages 100 /var/lib/dpkg/status g++: Installed: 4:5.3.1-1ubuntu1 Candidate: 4:5.3.1-1ubuntu1 Version table: *** 4:5.3.1-1ubuntu1 500 500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages 100 /var/lib/dpkg/status To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/binutils/+bug/1608898/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp