From owner-freebsd-arm@freebsd.org Fri Jan 8 21:43:27 2016 Return-Path: Delivered-To: freebsd-arm@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 6B72CA6707C for ; Fri, 8 Jan 2016 21:43:27 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51BFB1C35 for ; Fri, 8 Jan 2016 21:43:27 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u08LhRaA082495 for ; Fri, 8 Jan 2016 21:43:27 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-arm@FreeBSD.org Subject: [Bug 206048] 11.0-CURRENT -r293227 (and others) arm (rpi2/BeagleBone Black): swapfile usage hangs; swap partition works Date: Fri, 08 Jan 2016 21:43:27 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: arm X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: markmi@dsl-only.net X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-arm@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2016 21:43:27 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206048 Bug ID: 206048 Summary: 11.0-CURRENT -r293227 (and others) arm (rpi2/BeagleBone Black): swapfile usage hangs; swap partition works Product: Base System Version: 11.0-CURRENT Hardware: arm OS: Any Status: New Severity: Affects Some People Priority: --- Component: arm Assignee: freebsd-arm@FreeBSD.org Reporter: markmi@dsl-only.net Description for my rpi2 based context: Using a swap partion on the sdcard o= r on an extern SSD both work fine (recently discovered). But using a fast extern= al SSD for the root file system with a /swapfile0 would eventually hang when normal root-file-system IO was mixed with /swapfile0 IO, such as using gcc49 (from pkg install) to build something like devel/gcc5 (ports). This has been going on since I started with arm but only recently did I manage to get any evidence about the hangs and find a configuration that avoids them. I've al= so had hangs during svnlite status and svnlite diff and other things that woul= d do lots of file activity. Evidence from a rpi2 context taken from various hangs while using /swapfile= 0 as the swap space: Note: a process such as top or gstat running over the serial console connec= tion continues to update its display so long as it is not disturbed. I was also = able to get into ddb. These were my limited window into seeing the following evidence about the hangs when /swapfile0 was the swap-space. An example top display showed after the hang: Mem: 764M Active 12M Inact 141M Wired 98M Buf 8k free Swap: 2048M Total 29M Used 2019 Free 1% in use The unusual STATEs for processes seemed to be (for the specific hang): STATE COMMANDs pfault [ld] [ld] /usr/sbin/syslogd vmwait [ld] [md0] [kernel] wswbuf [pagedaemon] Those same 3 states seem to always be involved. Some of the processes vary = from one hang to the next: the prior hang had build/genautoma , /usr/sbin/moused= , and /usr/sbin/ntpd instead of 3 [ld]'s. /usr/sbin/syslogd sometimes looked normal for its state. [md0], [kernel], and [pagedaemon] and their states did not vary from one ha= ng to the next. After a hang and waiting an hour+: "gstat -cod" showed exactly one non-zero figure in its grid: L(q) for "md0" showed a 4. After a hang ddb's "ps" showed (my presentation order and formating): [pagedaemon] had wmesg wswbuf0 and state D [swapper] had wmesg vmwait and state D [md0] had wmesg vmwait and state DL [usb]'s threads: [usb0] had wmesg - and state D (all 5 such lines) [smsc0] had wmesg - and state D "show pageq" listed: pq_free 2 pq_cache 0 dom 0 page_cnt 234761 free 2 pq_act 164873 pq_inact 18563 pass 2 "show freepages" listed only one non-zero "NUMBER POOL 0": ORDER (SIZE) NUMBER POOL 0 01 (000008k) 000001 (gstat and those last two are from Ian Lepore's suggestions for what to look at. But he was not sure either. Hans Petter Selasky had asked about usb process/thread related information.) Non-RPI2 notes/summaries from others: Ian Lepore reported similar symptoms but I'm unsure of the swapfile vs. swap partition status for his context(s). (He was attributing problems to slow IO devices when he wrote of having similar symptoms.) I expect that Ian has ot= her arm systems involved than rpi2 and BeagleBone Black but I do not know the details, other than he mentioned arm64 examples. Paul Mather reported that for BeagleBone Black ( https://lists.freebsd.org/pipermail/freebsd-arm/2016-January/013015.html ): This meshes with recent experience I have been having with CURRENT on a BeagleBone Black. I use a swapfile on the SD card (which also hosts all th= e OS file systems) and the system would regularly lock up, with GEOM complaining= on the console about I/O errors to the mmcsd0 device. In the past, too, I have experienced panics (on all my arm systems) when the system attempts to page in from swap. For now, on the BeagleBone Black, I have attached an external USB hard drive and am using a swap partition on there to see if it "solves" the swap probl= em.=20 The good news is that it hasn't locked up so far. (Usually, the nightly periodic jobs are enough to provoke the problem.) --=20 You are receiving this mail because: You are the assignee for the bug.=