myl driver failing during server shutdown

Scott Long scottl at samsco.org
Sat Aug 12 03:27:29 UTC 2006


Jo Rhett wrote:
> So I had thought that my motherboard didn't honor the acpi reset or  
> power down command.  It turns out that it does just fine -- but the  
> shutdown is failing/hanging.  Attaching a serial console to it, I see  
> this:
> 
> Waiting (max 60 seconds) for system process `syncer' to stop...
> Syncing disks, vnodes remaining...3 0 2 0 0 done
> All buffers synced.
> Uptime: 6d18h12m6s
> (da0:mly0:1:0:0): Synchronize cache failed, status == 0xb, scsi  status 
> == 0x0
> mly0: flushing cache...kernel trap 12 with interrupts disabled
> 
> 
> Fatal trap 12: page fault while in kernel mode
> fault virtual address   = 0x0
> fault code              = supervisor read, page not present
> instruction pointer     = 0x20:0x0
> stack pointer           = 0x28:0xe25c1ac0
> frame pointer           = 0x28:0x0
> code segment            = base 0x0, limit 0xfffff, type 0x1b
>                         = DPL 0, pres 1, def32 1, gran 1
> processor eflags        = resume, IOPL = 0
> current process         = 1 (init)
> trap number             = 12
> panic: page fault
> Uptime: 6d19h12m38s
> (da0:mly0:1:0:0): Synchronize cache failed, status == 0xb, scsi  status 
> == 0x0
> Dumping 991 MB (2 chunks)
> Aborting dump due to I/O error.
> status == 0xb, scsi status == 0x0
> 
> ** DUMP FAILED (ERROR 5) **
> 
> This is 100% reproducable.  Anyone have any ideas where to start on  
> this problem?  What does this error mean?
> 
> Note: if you want to debug this, I can provide root access.  It's  just 
> a personal box :-)
> 

Give this (untested) patch a try.  If that doesn't work, it's going to
need a lot more digging, and I unfortunately don't have the time for
that right now.

Scott

-------------- next part --------------
Index: mly.c
===================================================================
RCS file: /usr/ncvs/src/sys/dev/mly/mly.c,v
retrieving revision 1.39
diff -u -r1.39 mly.c
--- mly.c	8 Aug 2005 12:23:26 -0000	1.39
+++ mly.c	10 Aug 2006 11:57:54 -0000
@@ -1128,9 +1128,12 @@
 	    mc->mc_data = *data;
 	    mc->mc_flags |= MLY_CMD_DATAOUT;
 	}
-	mc->mc_length = datasize;
-	mc->mc_packet->generic.data_size = datasize;
+    } else if (datasize != 0) {
+	error = EINVAL;
+	goto out;
     }
+    mc->mc_length = datasize;
+    mc->mc_packet->generic.data_size = datasize;
     
     /* run the command */
     if ((error = mly_immediate_command(mc)))


More information about the freebsd-scsi mailing list