Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

weird occasional "Resource exhaustion" errors when linking GENERIC_KASLR



I've been using a stock 9.0 amd64 install to build my -current tree and
found it failing with a "Resource exhaustion" error (also "Out of
memory") when linking the GENERIC_KASLR kernel.

Here I leant on ^T while it built and this is the last message before it
died (with the "nbmake" lines edited out):

	[ 155166.4979147] load: 1.54  cmd: nbctfmerge 7370 [iowait 0x45fc5f/4] 46.23u 1.99s 148% 1628476k
	Out of memory

Again, but with the different error message:

	[ 155250.5722602] load: 1.41  cmd: nbctfmerge 18682 [iowait 0x45fc5f/7] 46.18u 1.43s 152% 1444080k
	ERROR: nbctfmerge: netbsd: Cannot get sect .debug_line.1 data: Resource exhaustion


Then without "warning" it will ramp up to near twice as much memory and
just work A-OK:

	[ 155591.1865138] load: 0.81  cmd: nbctfmerge 15691 [iowait 0x42522a/4] 46.28u 3.71s 142% 2382048k
	[ 155591.2765553] load: 0.81  cmd: nbctfmerge 15691 [iowait 0x42522a/4] 46.28u 3.80s 142% 2382048k
	[ 155591.3665934] load: 0.81  cmd: nbctfmerge 15691 [iowait 0x45ab1a/5] 46.28u 3.89s 142% 2076944k
	[ 155591.4566282] load: 0.81  cmd: nbctfmerge 15691 [0x45e35a/0] 46.28u 3.98s 142% 0k
	[ 155591.5466663] load: 0.81  cmd: nbctfmerge 15691 [0x45e35a/0] 46.28u 4.07s 142% 0k
	[ 155591.6467075] load: 0.82  cmd: nbctfmerge 15691 [0x45e35a/0] 46.28u 4.16s 140% 0k
	[ 155591.7367458] load: 0.82  cmd: nbctfmerge 15691 [0x45e35a/0] 46.28u 4.25s 140% 0k
	mv -f netbsd netbsd.gdb
	/build/woods/xentastic/current-amd64-amd64-tools/bin/x86_64--netbsd-strip -g -o netbsd netbsd.gdb


This did not happen with the exact same source tree when building on
either an 8.99.32 or 9.99.64 system running in a Xen domU on similar
hardware.


For the record, thinking this might be an rlimit issue, I opened things
up to the max to no avail, but even with these limits the link often
fails:

	$ ulimit -a
	time(cpu-seconds)    unlimited
	file(blocks)         unlimited
	coredump(blocks)     unlimited
	data(kbytes)         8388608
	stack(kbytes)        32768
	lockedmem(kbytes)    524288
	memory(kbytes)       2048000
	nofiles(descriptors) 3404
	processes            420
	threads              2048
	vmemory(kbytes)      2097152
	sbsize(bytes)        unlimited


Also for the record, this is 9.0/amd64 running on a bare machine with 8
cores, 32GB of RAM, and everything is on local filesystems:

NetBSD 9.0 (GENERIC) #0: Fri Feb 14 00:06:28 UTC 2020
        mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC
total memory = 32762 MB
avail memory = 31788 MB
....
Dell Inc. PowerEdge 2950
....
cpu7: Intel(R) Xeon(R) CPU           X5460  @ 3.16GHz, id 0x10676
....
mfi0: PERC 6/i Integrated version 6.3.3.0002
mfi0: logical drives 2, 256MB RAM, BBU type BBU, status good
scsibus0 at mfi0: 64 targets, 8 luns per target
....
sd0 at scsibus0 target 0 lun 0: <DELL, PERC 6/i, 1.22> disk fixed
sd0: 465 GB, 476416 cyl, 64 head, 32 sec, 512 bytes/sect x 975699968 sectors
....
sd1 at scsibus0 target 1 lun 0: <DELL, PERC 6/i, 1.22> disk fixed
sd1: 544 GB, 557568 cyl, 64 head, 32 sec, 512 bytes/sect x 1141899264 sectors



--
					Greg A. Woods <gwoods%acm.org@localhost>

Kelowna, BC     +1 250 762-7675           RoboHack <woods%robohack.ca@localhost>
Planix, Inc. <woods%planix.com@localhost>     Avoncote Farms <woods%avoncote.ca@localhost>

Attachment: pgpKIS36jZJM0.pgp
Description: OpenPGP Digital Signature



Home | Main Index | Thread Index | Old Index