Re: HEADS UP! ATAng committed

From: Kenneth D. Merry <ken_at_kdm.org>
Date: Mon, 25 Aug 2003 20:26:04 -0600
On Mon, Aug 25, 2003 at 19:25:42 +0200, Thomas Quinot wrote:
> Le 2003-08-25, Matt ?crivait :
> 
> > db> trace
> > free_hcb(c40f1040,c03c7e40,101,c41d5800,c1528130) at free_hcb+0x2e
> > atapi_action(c40f1440,c41d5800,c0132b33,c41db000,c41d5800) at
> > atapi_action+ox56c
> 
> OK, so that presumably means we're going through action_oom, and so you
> should have had one of the following messages on the console:
> 
>             printf("cannot allocate ATAPI/CAM hcb\n");
>             printf("cannot allocate ATAPI/CAM request\n");
>                 printf("cannot allocate ATAPI/CAM buffer\n");
> 
> It would be interesting to know which, if any, of these messages you
> saw. Also, please try whether the following patch improves the
> situation:

I had the following panic (-current from today (Monday), in free_hcb()), and
didn't see either of those messages:

Timecounters tick every 10.000 msec
acpi_cpu: throttling enabled, 16 steps (100% to 6.2%), currently 100.0%
acd0: DVDR <SONY DVD RW DRU-500A> at ata0-master UDMA33
Waiting 2 seconds for SCSI devices to settle


Fatal trap 12: page fault while in kernel mode
cpuid = 0; lapic.id = 00000000
fault virtual address   = 0x0
fault code              = supervisor write, page not present
instruction pointer     = 0x8:0xc019106e
stack pointer           = 0x10:0xe5e83a24
frame pointer           = 0x10:0xe5e83a30
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, def32 1, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 19 (swi3: cambio)
kernel: type 12 trap, code=0
Stopped at      free_hcb+0x2e:  movl    %eax,0(%edx)
db> trace
free_hcb(cbd59000,c0407fe0,101,cb9d1c00,c048f880) at free_hcb+0x2e
atapi_action(cb9a2740,cb9d1c00,cb97ac18,cb97ac00,cb99cc30) at atapi_action+0xb53
xpt_run_dev_sendq(cb9a27c0,cb97ac18,5,c083ad14,c042c164) at xpt_run_dev_sendq+0x1fe
xpt_action(cb9d1c00,4,c013b720,20,cbd50600) at xpt_action+0x38c
probestart(cbd4ea80,cb9d1c00,5,c0138cb6,cb951780) at probestart+0x32f
xpt_run_dev_allocq(cb9a27c0,cb97ac08,5) at xpt_run_dev_allocq+0x1ca
xpt_schedule(cbd4ea80,5,c47aec14,c47af260,c0487720) at xpt_schedule+0x2ae
probedone(cbd4ea80,cb9d1c00,c03dfd02,0,c046f6ac) at probedone+0x55c
camisr(c046f6ac,0,c03dfcf9,215,c47aeb58) at camisr+0x2a3
ithread_loop(c47a5800,e5e83d48,c03dfb67,314,e77fffbf) at ithread_loop+0x182
fork_exit(c023b360,c47a5800,e5e83d48) at fork_exit+0xc0
fork_trampoline() at fork_trampoline+0x8
--- trap 0x1, eip = 0, esp = 0xe5e83d7c, ebp = 0 ---


> Index: atapi-cam.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/dev/ata/atapi-cam.c,v
> retrieving revision 1.20
> diff -u -r1.20 atapi-cam.c
> --- atapi-cam.c	24 Aug 2003 17:48:05 -0000	1.20
> +++ atapi-cam.c	25 Aug 2003 17:24:44 -0000
> _at__at_ -59,7 +59,7 _at__at_
>      int			lun;
>      union ccb		*ccb;
>      int			flags;
> -#define DOING_AUTOSENSE 1
> +#define QUEUED		0x0001;

I had to remove the semicolon at the end of the line above in order for
things to compile.

Now with the patch, the probe hangs here:

acpi_cpu: throttling enabled, 16 steps (100% to 6.2%), currently 100.0%
acd0: DVDR <SONY DVD RW DRU-500A> at ata0-master UDMA33
Waiting 2 seconds for SCSI devices to settle
(probe0:ata0:0:0:0): out of memory, freezing queue.

Breaking into the debugger doesn't show anything useful:

db> trace
siointr1(c4788800,0,c03f4d5d,695,e5e39ce8) at siointr1+0xd5
siointr(c4788800) at siointr+0x35
Xfastintr4() at Xfastintr4+0xba
--- interrupt, eip = 0xc03980e4, esp = 0xe5e39ce8, ebp = 0xe5e39ce8 ---
cpu_idle(c0483b40,2,c03dfcf2,5f,1be) at cpu_idle+0x24
idle_proc(0,e5e39d48,c03dfba7,314,bb14d6e) at idle_proc+0x3c
fork_exit(c023a7a0,0,e5e39d48) at fork_exit+0xc0
fork_trampoline() at fork_trampoline+0x8
--- trap 0x1, eip = 0, esp = 0xe5e39d7c, ebp = 0 ---

Ken
-- 
Kenneth Merry
ken_at_kdm.org
Received on Mon Aug 25 2003 - 17:31:36 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:20 UTC