From owner-freebsd-current Mon Mar 18 09:13:10 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id JAA06910 for current-outgoing; Mon, 18 Mar 1996 09:13:10 -0800 (PST) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id JAA06905 for ; Mon, 18 Mar 1996 09:13:08 -0800 (PST) Received: from marble.eps.nagoya-u.ac.jp (marble.eps.nagoya-u.ac.jp [133.6.57.68]) by who.cdrom.com (8.6.12/8.6.11) with ESMTP id JAA09472 for ; Mon, 18 Mar 1996 09:13:07 -0800 Received: from marble.eps.nagoya-u.ac.jp (localhost [127.0.0.1]) by marble.eps.nagoya-u.ac.jp (8.7.4+2.6Wbeta6/3.3W9) with ESMTP id CAA00868; Tue, 19 Mar 1996 02:09:12 +0900 (JST) Message-Id: <199603181709.CAA00868@marble.eps.nagoya-u.ac.jp> To: p.richards@elsevier.co.uk Cc: freebsd-current@freebsd.org Subject: Re: Whee! Page Fault! In-Reply-To: Your message of "Mon, 18 Mar 1996 15:45:38 GMT" References: <199603181545.PAA04484@tees> X-Mailer: Mew beta version 0.96 on Emacs 19.28.1, Mule 2.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Date: Tue, 19 Mar 1996 02:09:09 +0900 From: KATO Takenori Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > but I'm not sure it's the only cause since I wasn't using the cdrom the > first time it happened. I don't access CDROM, but I also have numerous panics, and couldn't boot FreeBSD-current box. For example, After fsck in rc, my 5x86 box shows following messages: panic: freeing held page, count=1 Debugger("panic") Stopped at _Debugger+0x2a: movb $0,_in_Debugger.110 _Debugger(f0b48800,5800,1,0,f0b48864) at _Debugger+0x2a _trap_pfault(0,0,1,1,0) at _trap_pfault+0x10a (null)(10000,10,2,0,1) at 0 (null)(0,0,0,0,0) at 0 and v_page_free: pindex(14), busy(0), PG_BUSY(0) panic: vm_page_free: freeing free page I changed the code in vm_map_simplify_entry into revision 1.37 of vm_map.c by following patch: -------------------- *** vm_map.c.orig Tue Mar 19 01:15:37 1996 --- vm_map.c Tue Mar 19 01:15:20 1996 *************** *** 844,898 **** * neighbors. */ ! if (entry->is_sub_map || entry->is_a_map || entry->wired_count) return; ! prev = entry->prev; ! if (prev != &map->header) { prevsize = prev->end - prev->start; ! if ( prev->end == entry->start && ! prev->object.vm_object == entry->object.vm_object && ! prev->offset + prevsize == entry->offset && ! prev->protection == entry->protection && ! prev->max_protection == entry->max_protection && ! prev->inheritance == entry->inheritance && ! prev->needs_copy == entry->needs_copy && ! prev->copy_on_write == entry->copy_on_write && ! prev->is_a_map == FALSE && ! prev->is_sub_map == FALSE && ! prev->wired_count == 0) { ! if (map->first_free == prev) ! map->first_free = entry; ! vm_map_entry_unlink(map, prev); ! entry->start = prev->start; ! entry->offset = prev->offset; ! vm_object_deallocate(prev->object.vm_object); ! vm_map_entry_dispose(map, prev); ! } ! } ! ! next = entry->next; ! if (next != &map->header) { nextsize = next->end - next->start; esize = entry->end - entry->start; ! if (entry->end == next->start && ! next->object.vm_object == entry->object.vm_object && ! entry->offset + esize == next->offset && ! next->protection == entry->protection && ! next->max_protection == entry->max_protection && ! next->inheritance == entry->inheritance && ! next->needs_copy == entry->needs_copy && ! next->copy_on_write == entry->copy_on_write && ! next->is_a_map == FALSE && ! next->is_sub_map == FALSE && ! next->wired_count == 0) { ! if (map->first_free == next) ! map->first_free = entry; ! vm_map_entry_unlink(map, next); ! entry->end = next->end; ! vm_object_deallocate(next->object.vm_object); ! vm_map_entry_dispose(map, next); ! } } } --- 848,904 ---- * neighbors. */ ! if (entry->is_sub_map) return; + if (entry->is_a_map) { + return; + } else { + if (entry->wired_count) + return; ! prev = entry->prev; prevsize = prev->end - prev->start; ! next = entry->next; nextsize = next->end - next->start; esize = entry->end - entry->start; ! ! if (prev != &map->header && ! prev->end == entry->start && ! prev->is_a_map == FALSE && ! prev->is_sub_map == FALSE && ! prev->object.vm_object == entry->object.vm_object && ! prev->protection == entry->protection && ! prev->max_protection == entry->max_protection && ! prev->inheritance == entry->inheritance && ! prev->needs_copy == entry->needs_copy && ! prev->copy_on_write == entry->copy_on_write && ! prev->offset + prevsize == entry->offset && ! prev->wired_count == 0) { ! vm_map_entry_unlink(map, prev); ! entry->start = prev->start; ! entry->offset = prev->offset; ! vm_object_deallocate(prev->object.vm_object); ! vm_map_entry_dispose(map, prev); ! esize = entry->end - entry->start; ! } ! ! if (next != &map->header && ! entry->end == next->start && ! next->is_a_map == FALSE && ! next->is_sub_map == FALSE && ! next->object.vm_object == entry->object.vm_object && ! next->protection == entry->protection && ! next->max_protection == entry->max_protection && ! next->inheritance == entry->inheritance && ! next->needs_copy == entry->needs_copy && ! next->copy_on_write == entry->copy_on_write && ! entry->offset + esize == next->offset && ! next->wired_count == 0) { ! vm_map_entry_unlink(map, next); ! entry->end = next->end; ! vm_object_deallocate(next->object.vm_object); ! vm_map_entry_dispose(map, next); ! } } } -------------------- After applying this patch, my FreeBSD box works without panic for 12 hours until now. ---- KATO Takenori Dept. Earth Planet. Sci., Nagoya Univ., Nagoya, 464-01, Japan Voice: +81-52-789-2529 Fax: +81-52-789-3033