[Bug ld/11168] ld.exe CPU time >75 hours
--- Additional Comments From jmihalicza at gmail dot com 2010-01-14 15:48 --- Created an attachment (id=4513) --> (http://sourceware.org/bugzilla/attachment.cgi?id=4513&action=view) Source producing the bug with N = 7 everything is fine -- http://sourceware.org/bugzilla/show_bug.cgi?id=11168 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/11168] ld.exe CPU time >75 hours
--- Additional Comments From hjl dot tools at gmail dot com 2010-01-14 17:55 --- ld finished in 2 seconds on Linux/Intel64 with trunk. -- http://sourceware.org/bugzilla/show_bug.cgi?id=11168 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/11168] ld.exe CPU time >75 hours
--- Additional Comments From amodra at gmail dot com 2010-01-15 02:52 --- Crazy C++ templated code take a crazy amount of time to compile/link on my memory starved machine. This is hardly a ld bug. -- What|Removed |Added Status|NEW |RESOLVED Resolution||INVALID http://sourceware.org/bugzilla/show_bug.cgi?id=11168 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/11168] ld.exe CPU time >75 hours
--- Additional Comments From jmihalicza at gmail dot com 2010-01-15 12:07 --- (In reply to comment #3) > Crazy C++ templated code take a crazy amount of time to compile/link on my Yes, I agree, this is a separated example, but such things can appear even in real applications when complex metaprograms are used. > memory starved machine. This is hardly a ld bug. Memory usage is 22 932 K, peak: 71 152 K. My problem is the lack of scalability. I get objects and assembly code with 'g++ -save-temps' for N = 7 and N = 8. For N = 8 they are cca. 4 times bigger, I would expect ld to run 4 or even 10-20 times longer, but not forever. For N = 7 it is ready in about a minute or less, actually didn't measure the ld phase in itself. For N = 8 it has been running for almost 96 hours now, which would mean a factor of 5700 as a result of 4 times more symbols. I rather believe the process is somehow stuck in an infinite loop. (I know that there can be other factors and the process is not necessarily linear, but the situation is still strange, see also the process properties listed below.) As a comparison I invoked 'nm -C' on the objects and got results in ~5.67s (N=7) and ~189s (N=8), the factor was ~33. I have two snapshots of some process properties: CPU Time 24:20:22 CPU Usage full Mem Usage22 532 K IO Read 6 458 677 777 B IO Write 69 776 456 B IO Other 1 981 332 B CPU Time 95:59:41 CPU Usage full Mem Usage22 932 K Peak 71 152 K IO Read 6 544 941 777 B IO Write149 104 922 B IO Other 1 982 612 B -- What|Removed |Added Status|RESOLVED|REOPENED Resolution|INVALID | http://sourceware.org/bugzilla/show_bug.cgi?id=11168 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/11168] ld.exe CPU time >75 hours
--- Additional Comments From amodra at gmail dot com 2010-01-15 12:39 --- Hmm, OK my guess about memory seems wrong. Please compress and attach the .s file. If you can't do this because even the compressed file is too large, please try binutils-2.20. 2.18 is quite old, and whatever problem you are hitting may already be fixed. -- http://sourceware.org/bugzilla/show_bug.cgi?id=11168 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/11168] ld.exe CPU time >75 hours
--- Additional Comments From jmihalicza at gmail dot com 2010-01-15 16:58 --- I have uploaded the asm and the object to: http://people.inf.elte.hu/pocok/main2.s.zip http://people.inf.elte.hu/pocok/main2.o.zip Both of them are <2MB. Also I updated my cygwin, from ld the following version was downloaded: GNU ld (GNU Binutils) 2.19.51.20090704 It produces the bug the same way, main2.{s,o} were generated by the updated system. Currenlty: CPU Time1:45:40 CPU Usage full Mem Usage72 228 K = peak IO Read 6 403 080 462 B IO Write 4 167 731 B IO Other 1 417 476 B For N = 7 the whole process including compilation etc completed in 15 seconds. -- http://sourceware.org/bugzilla/show_bug.cgi?id=11168 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/11168] ld.exe CPU time >75 hours
--- Additional Comments From amodra at gmail dot com 2010-01-17 14:59 --- $ grep '\.section' main2.s | sort | uniq | wc -l 48940 So, we have a large number of sections. COFF uses a 16 bit field in the file symbol structure to store section numbers. BFD code in various places tests that the value is non-negative, so we only support 32k sections. This results in a large number of symbols not being recognised properly. Symbols that are defined are seen as undefined, and the linker emits a large number of errors, eg. main2.o:main2.cpp:(.text$_ZN5ClassILi0ELi8EEC2Ev[__ZN5ClassILi0ELi8EEC2Ev]+0x8): undefined reference to `vtable for Class<0, 8>' It turns out that printing these errors takes a huge amount of time due to BFD trying to find line numbers for the error. This, and other parts of the COFF support use algorithms that are O(num_syms)^2*O(num_sections). I didn't leave my link process running long enough to see if it terminated. Obviously, we don't support more than 32k sections for COFF (and hence PE). -- http://sourceware.org/bugzilla/show_bug.cgi?id=11168 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/11168] ld.exe CPU time >75 hours
--- Additional Comments From cvs-commit at gcc dot gnu dot org 2010-01-18 07:22 --- Subject: Bug 11168 CVSROOT:/cvs/src Module name:src Changes by: amo...@sourceware.org 2010-01-18 07:21:46 Modified files: bfd: ChangeLog coffcode.h Log message: PR 11168 * coffcode.h (coff_compute_section_file_positions): Move Rs6000COFF_C block past vars in COFF_IMAGE_WITH_PE block. Report error on more than 32k sections. Patches: http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/bfd/ChangeLog.diff?cvsroot=src&r1=1.4893&r2=1.4894 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/bfd/coffcode.h.diff?cvsroot=src&r1=1.162&r2=1.163 -- http://sourceware.org/bugzilla/show_bug.cgi?id=11168 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/11168] ld.exe CPU time >75 hours
--- Additional Comments From amodra at gmail dot com 2010-01-18 07:26 --- Fixed. You'll now get an error from the assembler. -- What|Removed |Added Status|REOPENED|RESOLVED Resolution||FIXED http://sourceware.org/bugzilla/show_bug.cgi?id=11168 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/11168] ld.exe CPU time >75 hours
--- Additional Comments From jmihalicza at gmail dot com 2010-01-23 21:41 --- Thanks for the investigations and the added error message. Indeed, the process was not infinite, it ended after a week: real10495m24.092s user10470m50.838s sys 2m38.622s -- http://sourceware.org/bugzilla/show_bug.cgi?id=11168 --- You are receiving this mail because: --- You are on the CC list for the bug, or are watching someone who is. ___ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils