From owner-freebsd-current@freebsd.org Wed Dec 6 22:04:26 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFC9FE8D44A; Wed, 6 Dec 2017 22:04:26 +0000 (UTC) (envelope-from laurent@nuxi.ca) Received: from mail.nuxi.ca (nuxi.ca [142.44.162.10]) by mx1.freebsd.org (Postfix) with ESMTP id AD4EC64455; Wed, 6 Dec 2017 22:04:26 +0000 (UTC) (envelope-from laurent@nuxi.ca) Received: from [192.168.0.174] (modemcable058.143-202-24.mc.videotron.ca [24.202.143.58]) (Authenticated sender: laurent) by mail.nuxi.ca (Postfix) with ESMTPSA id 87FD320967; Wed, 6 Dec 2017 16:54:37 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Subject: Re: rpi2 hangup during poudriere build: lots of pfault wmseg status From: Laurent Cimon In-Reply-To: <05BEA04B-249B-4E7D-855A-46DA1A0DEA16@dsl-only.net> Date: Wed, 6 Dec 2017 16:54:36 -0500 Cc: freebsd-arm@freebsd.org, freebsd-hackers@freebsd.org, freebsd-current@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <05BEA04B-249B-4E7D-855A-46DA1A0DEA16@dsl-only.net> To: Mark Millard X-Mailer: Apple Mail (2.3445.5.20) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Dec 2017 22:04:26 -0000 > On Dec 6, 2017, at 00:57, Mark Millard wrote: >=20 > I tried to build some ports on a rpi2 > (via poudriere) but it hung up: > Ethernet and normal console use. (Note: > the root file system is on a USB SSD > and the swap partition is also on that > USB SSD.) >=20 > But ~^b worked for getting to the db> > prompt on the console. >=20 > =46rom there a ps suggests that it got hung > up in pfault activity. (Possibly insufficient > RAM+swap-partition space?) But it is not > clear to me that it should end up hung up > vs. killing processes or other such. Hi, =46rom what I know the raspberry pis use the same controller for = ethernet and the USB hub on which you=E2=80=99re hosting an SSD. It seems like you = make very heavy use of the USB ports, and all of the resources used by poudriere except = for the CPU and the (very limited) memory that=E2=80=99s not in swap is attached = to them. If you really didn=E2=80=99t have enough memory and swap, the linkers = would=E2=80=99ve been stopped. I think it might just be a swap death. Poudriere compiles and fetches in = parallel a lot, ethernet and disk I/O is slow because it=E2=80=99s very limited, = so linking takes longer. You end up linking a few very big binaries at the same time, and = they all fight for the memory, to get out of swap through page faults, but = there are too many page faults, all too big, requesting for more CPU time = that=E2=80=99s allowed to them. This would explain why you have 3 linkers waiting on a page fault out of = the 4 CPUs poudriere allows builds on, on top of the awk processes. It would = also explain why you had easy access to the debugger: it was in memory = already with the kernel. I=E2=80=99d advise you to disable parallel builds and see if it happens = again, but it would make building much slower. Using makejobs would help if you can afford watching the build. Otherwise be patient, it should resolve = itself eventually, but it will take a while and it will happen again. Good luck, Laurent=