From bryan@gravy.homeunix.net  Tue May 27 05:30:47 2003
Return-Path: <bryan@gravy.homeunix.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 5000737B408
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 27 May 2003 05:30:47 -0700 (PDT)
Received: from gravy.homeunix.net (pool-151-197-48-53.phil.east.verizon.net [151.197.48.53])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 07EA343F93
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 27 May 2003 05:30:44 -0700 (PDT)
	(envelope-from bryan@gravy.homeunix.net)
Received: (from root@localhost)
	by gravy.homeunix.net (8.12.9/8.12.9) id h4RCUiAq003492;
	Tue, 27 May 2003 08:30:44 -0400 (EDT)
	(envelope-from bryan)
Message-Id: <200305271230.h4RCUiAq003492@gravy.homeunix.net>
Date: Tue, 27 May 2003 08:30:44 -0400 (EDT)
From: Bryan Liesner <bleez@verizon.net>
Reply-To: Bryan Liesner <bleez@verizon.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: changes to kern_umtx.c causes panic in cam
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         52718
>Category:       kern
>Synopsis:       changes to kern_umtx.c causes panic in cam
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jeff
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 27 05:40:12 PDT 2003
>Closed-Date:    Wed Oct 05 03:11:20 GMT 2005
>Last-Modified:  Wed Oct 05 03:11:20 GMT 2005
>Originator:     Bryan Liesner
>Release:        FreeBSD 5.1-BETA i386
>Organization:
>Environment:
System: FreeBSD gravy.homeunix.net 5.1-BETA FreeBSD 5.1-BETA #0: Mon May 26 15:49:23 EDT 2003 bryan@gravy.homeunix.net:/usr/obj/usr/src/sys/GRAVY i386


	
>Description:
The change from kern_umtx.c rev 1.2 to 1.3 brought out the following
panic on my system.  The panic does not occur if I revert back to 1.2
or if I turn off my USB hard drive (uses EHCI) and run with rev 1.3


Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0x0
fault code              = supervisor read, page not present
instruction pointer     = 0x8:0xc0135b0a7
stack pointer           = 0x10:0xd68f2c48
frame pointer           = 0x10:0xd68f2c64
code  segment           = base 0x0 limit 0xffff, type 0x1b
processor eflags        = interrupt enabled, resume, IOPL=0
current process         = 12 (swi7: tty:sio clock)
trap number             = 12
panic page fault

DDB says it was in heap_up+0x27

...

(kgdb) l *heap_up+0x27
0xc0136be7 is in heap_up (../../../cam/cam_queue.c:345).
340	 * equal too, or greater than j respectively.
341	 */
342	static __inline int
343	queue_cmp(cam_pinfo **queue_array, int i, int j)
344	{
345		if (queue_array[i]->priority == queue_array[j]->priority)
346			return (  queue_array[i]->generation
347				- queue_array[j]->generation );
348		else
349			return (  queue_array[i]->priority
(kgdb)
350				- queue_array[j]->priority );
351	}
352
353	/*
354	 * swap: Given an array of cam_pinfo* elements and indexes i and j,
355	 * exchange elements i and j.
356	 */
357	static __inline void
358	swap(cam_pinfo **queue_array, int i, int j)
359	{

>How-To-Repeat:
boot the system
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: kris 
State-Changed-When: Sat Oct 11 01:10:24 PDT 2003 
State-Changed-Why:  
Does this problem persist? 


Responsible-Changed-From-To: freebsd-bugs->jeffr 
Responsible-Changed-By: kris 
Responsible-Changed-When: Sat Oct 11 01:10:24 PDT 2003 
Responsible-Changed-Why:  
Assign to author of r1.3 

http://www.freebsd.org/cgi/query-pr.cgi?pr=52718 
Responsible-Changed-From-To: jeffr->jeff 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Aug 6 19:20:23 GMT 2005 
Responsible-Changed-Why:  
Correct assignment. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=52718 
State-Changed-From-To: feedback->closed 
State-Changed-By: rodrigc 
State-Changed-When: Wed Oct 5 03:11:03 GMT 2005 
State-Changed-Why:  
Feedback timeout 

http://www.freebsd.org/cgi/query-pr.cgi?pr=52718 
>Unformatted:
