Date: Tue, 16 Jan 1996 09:02:20 -0800 From: "Gintaras Richard Gircys (GG148)" <rich@oester.com> To: freebsd-questions@freebsd.org Subject: does freebsd still have this problem? Message-ID: <199601161702.RAA14403@kitty.oester.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199601161702.RAA14403>