Date: Mon, 30 Jan 2012 15:46:58 -0500 From: Andrew Boyer <aboyer@averesystems.com> To: FreeBSD Stable Mailing List <freebsd-stable@freebsd.org>, Alexander Motin <mav@freebsd.org> Subject: Kernel panics under 8.2 due to ATA timeouts Message-ID: <76687387-92D3-4EA5-AD39-3F6820B27DCD@averesystems.com>
next in thread | raw e-mail | index | archive | help
Hello Alexander, I have a system that appears to have a flaky SATA controller (one of the = Intel ESB2 variants) and it seems to be exposing a weakness in the ATA = driver (not using ATA_CAM). If a command with ATA_R_DIRECT set times = out, the channel gets reinitialized, but from the soft interrupt = context. It panics when it tries to sleep in ata_queue_request(). Timeouts work if ATA_R_DIRECT isn't set because in that case it uses a = taskqueue to complete the request. Here is the backtrace: > #0 kdb_enter (why=3D0xffffffff80962cfa "panic", msg=3D0xa <Address = 0xa out of bounds>) at ../../../kern/subr_kdb.c:349 > #1 0xffffffff805d6d0b in panic (fmt=3DVariable "fmt" is not = available. > ) at ../../../kern/kern_shutdown.c:689 > #2 0xffffffff8061bc53 in sleepq_add (wchan=3D0xffffff00052c3e58, = lock=3D0xffffff00052c3e38, wmesg=3D0xffffffff808fa213 "ATA request = done",=20 > flags=3D1, queue=3D0) at ../../../kern/subr_sleepqueue.c:320 > #3 0xffffffff80590c95 in _cv_timedwait (cvp=3D0xffffff00052c3e58, = lock=3D0xffffff00052c3e38, timo=3D40000) at = ../../../kern/kern_condvar.c:313 > #4 0xffffffff805d61af in _sema_timedwait (sema=3D0xffffff00052c3e38, = timo=3D40000, file=3D0xffffffff808fa1f6 "../../../dev/ata/ata-queue.c",=20= > line=3D118) at ../../../kern/kern_sema.c:123 > #5 0xffffffff8028559f in ata_queue_request = (request=3D0xffffff00052c3dc0) at ../../../dev/ata/ata-queue.c:117 > #6 0xffffffff80286628 in ata_controlcmd (dev=3D0xffffff0002e83d00, = command=3D239 '?', feature=3DVariable "feature" is not available. > ) at ../../../dev/ata/ata-queue.c:153 > #7 0xffffffff8027ffd3 in ata_setmode (dev=3D0xffffff0002e83d00) at = ../../../dev/ata/ata-all.c:637 > #8 0xffffffff802a0af9 in ad_init (dev=3D0xffffff0002e83d00) at = ../../../dev/ata/ata-disk.c:405 > #9 0xffffffff802a0c29 in ad_reinit (dev=3D0xffffff0002e83d00) at = ../../../dev/ata/ata-disk.c:221 > #10 0xffffffff80280cad in ata_reinit (dev=3D0xffffff0002902800) at = ata_if.h:79 > #11 0xffffffff802856c4 in ata_completed (context=3DVariable "context" = is not available. > ) at ../../../dev/ata/ata-queue.c:313 > #12 0xffffffff80285ffb in ata_finish (request=3D0xffffff00054ec8c0) at = ../../../dev/ata/ata-queue.c:265 > #13 0xffffffff805ed419 in softclock (arg=3DVariable "arg" is not = available. > ) at ../../../kern/kern_timeout.c:430 This is very repeatable. I'm not sure what's the best fix - always use = a taskqueue on timeouts? Don't reinit if direct commands fail? -Andrew -------------------------------------------------- Andrew Boyer aboyer@averesystems.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?76687387-92D3-4EA5-AD39-3F6820B27DCD>