From owner-freebsd-questions Tue Jan 16 09:24:14 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id JAA26728 for questions-outgoing; Tue, 16 Jan 1996 09:24:14 -0800 (PST) Received: from who.cdrom.com (who.cdrom.com [192.216.222.3]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id JAA26664 for ; Tue, 16 Jan 1996 09:24:05 -0800 (PST) Received: from kitty.oester.com (kitty.oester.com [206.25.136.13]) by who.cdrom.com (8.6.12/8.6.11) with ESMTP id JAA28074 for ; Tue, 16 Jan 1996 09:02:27 -0800 Received: from kitty.oester.com by kitty.oester.com (8.7.3/1.37) id RAA14403; Tue, 16 Jan 1996 17:02:20 GMT Message-Id: <199601161702.RAA14403@kitty.oester.com> X-Mailer: exmh version 1.6.2 7/18/95 To: freebsd-questions@freebsd.org From: "Gintaras Richard Gircys (GG148)" X-Org: EMPaC International Corp. X-Snail: 47490 Seabridge Dr., Fremont CA. 94538 X-url: http://www.empac.com/ Subject: does freebsd still have this problem? Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 16 Jan 1996 09:02:20 -0800 Sender: owner-questions@freebsd.org Precedence: bulk freebsd-questions, hopefully someone here can answer this rather than pestering the tech lists. does freebsd suffer from the swap overallocation bug? this is, methinks, a generic 4.4 problem - bsdi used to have this bug but now they claim it is fixed. here's a short description from an old mike karels posting: --------------------------------------------------------------------------- ... The problem here is that if the process forks, and the parent modifies data pages while the child exists, it must make copies of those pages (copy-on-write after fork). If those copies are paged out, then both the copies and the originals will occupy space until the parent exits, even if the child exits. I think I described the chains of shadow objects that were accumulating, and the fact that those are supposed to get coalesced. It turns out that the code to coalesce does not work if an object has been paged out. This is the scenario that causes problems: - a long-lived program forks repeatedly, - the parent modifies data space before the child does exec or exit, and - the parent's modified pages get paged out before child does exec or exit. The only situation in which this seems to be a problem is if a login shell (or any long-running interactive shell) runs scripts by forking and running them directly. This will not happen with csh; I don't know about ksh or bash. (It does not happen with csh because it uses vfork, and re-exec's itself if running a csh script). It also does not happen if the scripts are "executable" scripts, i.e. those that start with #!/bin/sh. It is also a problem only if the script or other system activity uses enough memory for the shell to be paged out while the script is running. The bad news is that this problem is not easy to solve... However, I think there are some workarounds that can be used for the moment. --------------------------------------------------------------------------- if anyone has the status, if any, for this bug under freebsd, i would appreciate it. rich