From owner-freebsd-scsi@FreeBSD.ORG Sun Jan 8 19:20:54 2006 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 44B4016A41F for ; Sun, 8 Jan 2006 19:20:54 +0000 (GMT) (envelope-from mjacob@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id EC73643D46 for ; Sun, 8 Jan 2006 19:20:53 +0000 (GMT) (envelope-from mjacob@FreeBSD.org) Received: from freefall.freebsd.org (mjacob@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k08JKrhQ097180 for ; Sun, 8 Jan 2006 19:20:53 GMT (envelope-from mjacob@freefall.freebsd.org) Received: (from mjacob@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k08JKrYg097179 for freebsd-scsi@freebsd.org; Sun, 8 Jan 2006 19:20:53 GMT (envelope-from mjacob) Date: Sun, 8 Jan 2006 19:20:53 GMT From: Matt Jacob Message-Id: <200601081920.k08JKrYg097179@freefall.freebsd.org> To: freebsd-scsi@freebsd.org Subject: O_NDELAY open in FreeBSD tape driver X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2006 19:20:54 -0000 The Bacula folks convinced me to try a bit harder to emulate Linux and Solaris tape open behaviour which allows an open to succeed with no tape iff the mode is O_NONBLOCK. The patch below seems to do the trick- and still preserves the FreeBSD semantics in that an O_NONBLOCK open with an samount that fails leaves the tape 'open', but 'open pending mount' so that attempts to actually *do* anything with a tape retries the samount (returning an error if failed, otherwise transitioning to full open state). An open without O_NONBLOCK works just as it did before. At the same time, I also threw in a check for rdonly opens so that we don't allow a filemark to be written to a tape that was opened O_RDONLY. The advantage, other than similarity to Linux or Solaris, is that a pending open is useful for backup packages that open the tape and then wait for the robotics to catch up and insert that tape. Personally, I would have just kept retrying the open until it succeeded, but it *is* true that a number of packages do it the O_NONBLOCK way. I checked the FreeBSD source tree and amanda, and I didn't see them using O_NONBLOCK, so this change shouldn't affect them. Comments? -matt Index: scsi_sa.c =================================================================== RCS file: /home/ncvs/src/sys/cam/scsi/scsi_sa.c,v retrieving revision 1.105 diff -u -r1.105 scsi_sa.c --- scsi_sa.c 1 Jul 2005 15:21:30 -0000 1.105 +++ scsi_sa.c 8 Jan 2006 19:08:02 -0000 @@ -44,6 +44,7 @@ #ifdef _KERNEL #include #endif +#include #include #ifndef _KERNEL @@ -255,8 +256,10 @@ * Misc other flags/state */ u_int32_t - : 31, - ctrl_mode : 1; /* control device open */ + : 29, + open_rdonly : 1, /* open read-only */ + open_pending_mount : 1, /* open pending mount */ + ctrl_mode : 1; /* control device open */ }; struct sa_quirk_entry { @@ -468,23 +471,37 @@ cam_periph_unlock(periph); return (ENXIO); } + if (SA_IS_CTRL(dev)) { softc->ctrl_mode = 1; cam_periph_unlock(periph); return (0); } - if (softc->flags & SA_FLAG_OPEN) { error = EBUSY; } else if (softc->flags & SA_FLAG_INVALID) { error = ENXIO; } else { /* + * Preserve whether this is a read_only open. + */ + softc->open_rdonly = (flags & O_RDWR) == O_RDONLY; + + /* * The function samount ensures media is loaded and ready. * It also does a device RESERVE if the tape isn't yet mounted. + * + * If the mount fails and this was a non-blocking open, + * make this a 'open_pending_mount' action. */ error = samount(periph, flags, dev); + if (error && (flags & O_NONBLOCK)) { + softc->flags |= SA_FLAG_OPEN; + softc->open_pending_mount = 1; + cam_periph_unlock(periph); + return (0); + } } if (error) { @@ -521,6 +538,7 @@ return (error); } + softc->open_rdonly = 0; if (SA_IS_CTRL(dev)) { softc->ctrl_mode = 0; cam_periph_release(periph); @@ -528,6 +546,14 @@ return (0); } + if (softc->open_pending_mount) { + softc->flags &= ~SA_FLAG_OPEN; + softc->open_pending_mount = 0; + cam_periph_release(periph); + cam_periph_unlock(periph); + return (0); + } + /* * Were we writing the tape? */ @@ -681,10 +707,32 @@ return; } + /* + * This should actually never occur as the write(2) + * system call traps attempts to write to a read-only + * file descriptor. + */ + if (bp->bio_cmd == BIO_WRITE && softc->open_rdonly) { + splx(s); + biofinish(bp, NULL, EBADF); + return; + } + splx(s); + if (softc->open_pending_mount) { + int error = samount(periph, 0, bp->bio_dev); + if (error) { + biofinish(bp, NULL, ENXIO); + return; + } + saprevent(periph, PR_PREVENT); + softc->open_pending_mount = 0; + } + + /* - * If it's a null transfer, return immediatly + * If it's a null transfer, return immediately */ if (bp->bio_bcount == 0) { biodone(bp); @@ -756,6 +804,17 @@ return; } + +#define PENDING_MOUNT_CHECK(softc, periph, dev) \ + if (softc->open_pending_mount) { \ + error = samount(periph, 0, dev); \ + if (error) { \ + break; \ + } \ + saprevent(periph, PR_PREVENT); \ + softc->open_pending_mount = 0; \ + } + static int saioctl(struct cdev *dev, u_long cmd, caddr_t arg, int flag, struct thread *td) { @@ -865,7 +924,7 @@ * If this isn't the control mode device, actually go out * and ask the drive again what it's set to. */ - if (!SA_IS_CTRL(dev)) { + if (!SA_IS_CTRL(dev) && !softc->open_pending_mount) { u_int8_t write_protect; int comp_enabled, comp_supported; error = sagetparams(periph, SA_PARAM_ALL, @@ -962,7 +1021,8 @@ bcopy((caddr_t) &softc->last_ctl_cdb, sep->ctl_cdb, sizeof (sep->ctl_cdb)); - if (SA_IS_CTRL(dev) == 0 || didlockperiph) + if ((SA_IS_CTRL(dev) == 0 && softc->open_pending_mount) || + didlockperiph) bzero((caddr_t) &softc->errinfo, sizeof (softc->errinfo)); error = 0; @@ -973,8 +1033,11 @@ struct mtop *mt; int count; + PENDING_MOUNT_CHECK(softc, periph, dev); + mt = (struct mtop *)arg; + CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("saioctl: op=0x%x count=0x%x\n", mt->mt_op, mt->mt_count)); @@ -1067,6 +1130,7 @@ break; } case MTREW: /* rewind */ + PENDING_MOUNT_CHECK(softc, periph, dev); (void) sacheckeod(periph); error = sarewind(periph); /* see above */ @@ -1076,12 +1140,14 @@ softc->filemarks = 0; break; case MTERASE: /* erase */ + PENDING_MOUNT_CHECK(softc, periph, dev); error = saerase(periph, count); softc->flags &= ~(SA_FLAG_TAPE_WRITTEN|SA_FLAG_TAPE_FROZEN); softc->flags &= ~SA_FLAG_ERR_PENDING; break; case MTRETENS: /* re-tension tape */ + PENDING_MOUNT_CHECK(softc, periph, dev); error = saretension(periph); softc->flags &= ~(SA_FLAG_TAPE_WRITTEN|SA_FLAG_TAPE_FROZEN); @@ -1089,6 +1155,8 @@ break; case MTOFFL: /* rewind and put the drive offline */ + PENDING_MOUNT_CHECK(softc, periph, dev); + (void) sacheckeod(periph); /* see above */ softc->flags &= ~SA_FLAG_TAPE_WRITTEN; @@ -1119,6 +1187,8 @@ case MTSETBSIZ: /* Set block size for device */ + PENDING_MOUNT_CHECK(softc, periph, dev); + error = sasetparams(periph, SA_PARAM_BLOCKSIZE, count, 0, 0, 0); if (error == 0) { @@ -1161,6 +1231,8 @@ } break; case MTSETDNSTY: /* Set density for device and mode */ + PENDING_MOUNT_CHECK(softc, periph, dev); + if (count > UCHAR_MAX) { error = EINVAL; break; @@ -1170,6 +1242,7 @@ } break; case MTCOMP: /* enable compression */ + PENDING_MOUNT_CHECK(softc, periph, dev); /* * Some devices don't support compression, and * don't like it if you ask them for the @@ -1193,15 +1266,19 @@ error = 0; break; case MTIOCRDSPOS: + PENDING_MOUNT_CHECK(softc, periph, dev); error = sardpos(periph, 0, (u_int32_t *) arg); break; case MTIOCRDHPOS: + PENDING_MOUNT_CHECK(softc, periph, dev); error = sardpos(periph, 1, (u_int32_t *) arg); break; case MTIOCSLOCATE: + PENDING_MOUNT_CHECK(softc, periph, dev); error = sasetpos(periph, 0, (u_int32_t *) arg); break; case MTIOCHLOCATE: + PENDING_MOUNT_CHECK(softc, periph, dev); error = sasetpos(periph, 1, (u_int32_t *) arg); break; case MTIOCGETEOTMODEL: @@ -3147,6 +3224,8 @@ int error, nwm = 0; softc = (struct sa_softc *)periph->softc; + if (softc->open_rdonly) + return (EBADF); ccb = cam_periph_getccb(periph, 1); /* @@ -3364,6 +3443,8 @@ int error; softc = (struct sa_softc *)periph->softc; + if (softc->open_rdonly) + return (EBADF); ccb = cam_periph_getccb(periph, 1); From owner-freebsd-scsi@FreeBSD.ORG Mon Jan 9 11:02:42 2006 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2E7F016A41F for ; Mon, 9 Jan 2006 11:02:42 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E4A2843D46 for ; Mon, 9 Jan 2006 11:02:41 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k09B2f6h066238 for ; Mon, 9 Jan 2006 11:02:41 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k09B2eCb066232 for freebsd-scsi@freebsd.org; Mon, 9 Jan 2006 11:02:40 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 9 Jan 2006 11:02:40 GMT Message-Id: <200601091102.k09B2eCb066232@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-scsi@FreeBSD.org Cc: Subject: Current problem reports assigned to you X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2006 11:02:42 -0000 Current FreeBSD problem reports Critical problems Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2001/05/03] kern/27059 scsi [sym] SCSI subsystem hangs under heavy lo o [2001/06/29] kern/28508 scsi problems with backup to Tandberg SLR40 st o [2002/06/17] kern/39388 scsi ncr/sym drivers fail with 53c810 and more o [2002/07/22] kern/40895 scsi wierd kernel / device driver bug o [2003/05/24] kern/52638 scsi [panic] SCSI U320 on SMP server won't run s [2003/09/30] kern/57398 scsi [mly] Current fails to install on mly(4) o [2003/12/26] kern/60598 scsi wire down of scsi devices conflicts with o [2003/12/27] kern/60641 scsi [sym] Sporadic SCSI bus resets with 53C81 s [2004/01/10] kern/61165 scsi [panic] kernel page fault after calling c o [2004/12/02] kern/74627 scsi [ahc] [hang] Adaptec 2940U2W Can't boot 5 o [2005/06/04] kern/81887 scsi [aac] Adaptec SCSI 2130S aac0: GetDeviceP o [2005/12/12] kern/90282 scsi [sym] SCSI bus resets cause loss of ch de 12 problems total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2000/12/06] kern/23314 scsi aic driver fails to detect Adaptec 1520B o [2001/08/15] kern/29727 scsi [amr] [patch] amr_enquiry3 structure in a o [2002/02/23] kern/35234 scsi World access to /dev/pass? (for scanner) o [2002/06/02] kern/38828 scsi [feature request] DPT PM2012B/90 doesn't o [2002/10/29] kern/44587 scsi dev/dpt/dpt.h is missing defines required o [2003/10/01] kern/57469 scsi [scsi] [patch] Quirk for Conner CP3500 o [2005/01/12] kern/76178 scsi [ahd] Problem with ahd and large SCSI Rai 7 problems total. From owner-freebsd-scsi@FreeBSD.ORG Mon Jan 9 18:59:14 2006 Return-Path: X-Original-To: scsi@freebsd.org Delivered-To: freebsd-scsi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EE3A316A41F; Mon, 9 Jan 2006 18:59:14 +0000 (GMT) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id C2CCF43D45; Mon, 9 Jan 2006 18:59:14 +0000 (GMT) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 958B71A3C27; Mon, 9 Jan 2006 10:59:14 -0800 (PST) Date: Mon, 9 Jan 2006 10:59:14 -0800 From: Alfred Perlstein To: vkashyap@freebsd.org Message-ID: <20060109185914.GD81914@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Cc: scsi@freebsd.org Subject: 3ware 9500 locks up on 6.0-stable! X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2006 18:59:15 -0000 Hello. I was running a 3ware 9500 controller: //max> /c0 show driver /c0 Driver Version = 3.50.00.016 //max> /c0 show model /c0 Model = 9500S-4LP //max> /c0 show firmware /c0 Firmware Version = FE9X 2.06.00.009 //max> /c0 show bios /c0 Bios Version = BE9X 2.03.01.051 I recently upgraded it to 6.x and experienced many hard lockups. What I see in the logs looks like this: Jan 9 13:14:50 max kernel: (da0:twa0:0:0:0): Request Requeued Jan 9 13:14:50 max kernel: (da0:twa0:0:0:0): Retrying Command Jan 9 13:14:50 max kernel: (da0:twa0:0:0:0): Request Requeued Jan 9 13:14:50 max kernel: (da0:twa0:0:0:0): Retrying Command Jan 9 13:14:50 max kernel: (da0:twa0:0:0:0): Request Requeued Jan 9 13:14:50 max kernel: (da0:twa0:0:0:0): Retrying Command Jan 9 13:17:25 max kernel: twa0: INFO: (0x04: 0x000c): Initialize started: unit=0 Under FreeBSD 6.0 is seems to lock up shortly after the "Initialize started" message. Under 5.4 I get more of these messages: Jan 9 13:18:27 max kernel: (da0:twa0:0:0:0): Request Requeued Jan 9 13:18:27 max kernel: (da0:twa0:0:0:0): Retrying Command Jan 9 13:18:42 max kernel: (da0:twa0:0:0:0): Request Requeued Jan 9 13:18:42 max kernel: (da0:twa0:0:0:0): Retrying Command ... And things seem fine... for now... there is currently a rebuild and it's 12% complete. Additionally it seems that under FreeBSD 5.4 and 6.0 the 3dm web tool does not function. Anyhow, I would love to be of help to get this resolved so that 3ware works on 6.x. I can make time in late evenings EST (after 5 or 6 PM) to run any diagnostics or patches. Please let me know! thank you, -- - Alfred Perlstein From owner-freebsd-scsi@FreeBSD.ORG Mon Jan 9 20:35:40 2006 Return-Path: X-Original-To: scsi@freebsd.org Delivered-To: freebsd-scsi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 839FF16A41F for ; Mon, 9 Jan 2006 20:35:40 +0000 (GMT) (envelope-from vinodrk@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.207]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64A7F43D4C for ; Mon, 9 Jan 2006 20:35:39 +0000 (GMT) (envelope-from vinodrk@gmail.com) Received: by zproxy.gmail.com with SMTP id 8so4083497nzo for ; Mon, 09 Jan 2006 12:35:38 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=EmbMi9PuCi5Xw4StChRj+cXa0rXE0UKZhwoW9gLUB4f+AnCXcwxTFZRpopNqtSBDxo1khR83nH8jZijXcl3ai2HiJtqiB3zjqiEn0JxJ37CK7xoGBS6TBc9ujTn8/OZNQHNkePZd85QPo0dGn5jqgaJ0p7qKhzuyqSkO56INZcc= Received: by 10.36.146.15 with SMTP id t15mr13538484nzd; Mon, 09 Jan 2006 12:35:38 -0800 (PST) Received: by 10.36.5.12 with HTTP; Mon, 9 Jan 2006 12:35:38 -0800 (PST) Message-ID: Date: Mon, 9 Jan 2006 12:35:38 -0800 From: Vinod R Kashyap To: Alfred Perlstein In-Reply-To: <20060109185914.GD81914@elvis.mu.org> MIME-Version: 1.0 References: <20060109185914.GD81914@elvis.mu.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: tcumming@amcc.com, scsi@freebsd.org Subject: Re: 3ware 9500 locks up on 6.0-stable! X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2006 20:35:40 -0000 On 1/9/06, Alfred Perlstein wrote: > > Hello. > > I was running a 3ware 9500 controller: > > //max> /c0 show driver > /c0 Driver Version =3D 3.50.00.016 > > //max> /c0 show model > /c0 Model =3D 9500S-4LP > > //max> /c0 show firmware > /c0 Firmware Version =3D FE9X 2.06.00.009 > > //max> /c0 show bios > /c0 Bios Version =3D BE9X 2.03.01.051 > > I recently upgraded it to 6.x and experienced many hard lockups. > > What I see in the logs looks like this: > > Jan 9 13:14:50 max kernel: (da0:twa0:0:0:0): Request Requeued > Jan 9 13:14:50 max kernel: (da0:twa0:0:0:0): Retrying Command > Jan 9 13:14:50 max kernel: (da0:twa0:0:0:0): Request Requeued > Jan 9 13:14:50 max kernel: (da0:twa0:0:0:0): Retrying Command > Jan 9 13:14:50 max kernel: (da0:twa0:0:0:0): Request Requeued > Jan 9 13:14:50 max kernel: (da0:twa0:0:0:0): Retrying Command > Jan 9 13:17:25 max kernel: twa0: INFO: (0x04: 0x000c): Initialize > started: unit=3D0 > > Under FreeBSD 6.0 is seems to lock up shortly after the "Initialize > started" message. > > Under 5.4 I get more of these messages: > Jan 9 13:18:27 max kernel: (da0:twa0:0:0:0): Request Requeued > Jan 9 13:18:27 max kernel: (da0:twa0:0:0:0): Retrying Command > Jan 9 13:18:42 max kernel: (da0:twa0:0:0:0): Request Requeued > Jan 9 13:18:42 max kernel: (da0:twa0:0:0:0): Retrying Command > ... These messages are normal under heavy loads if you have bootverbose on, and should not cause any lockups. You might want to turn bootverbose off if you are seeing a lot of these. You seem to be using a 5.x driver versio= n (3.50.xx.xxx) on 6.0. You might want to move to a 6.x version (3.60.xx.xxx ). I have moved out of maintaining the 3ware driver. Please contact 3ware Support if you have problems. And things seem fine... for now... there is currently a rebuild > and it's 12% complete. > > Additionally it seems that under FreeBSD 5.4 and 6.0 the 3dm web > tool does not function. 3dm should work both on 5.4 & 6.0. Contact 3ware Support if you have problems. Anyhow, I would love to be of help to get this resolved so that > 3ware works on 6.x. I can make time in late evenings EST (after 5 > or 6 PM) to run any diagnostics or patches. > > Please let me know! > > thank you, > -- > - Alfred Perlstein > From owner-freebsd-scsi@FreeBSD.ORG Mon Jan 9 21:06:53 2006 Return-Path: X-Original-To: scsi@freebsd.org Delivered-To: freebsd-scsi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E78C216A41F for ; Mon, 9 Jan 2006 21:06:53 +0000 (GMT) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE78F43D46 for ; Mon, 9 Jan 2006 21:06:53 +0000 (GMT) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 87E071A3C24; Mon, 9 Jan 2006 13:06:53 -0800 (PST) Date: Mon, 9 Jan 2006 13:06:53 -0800 From: Alfred Perlstein To: Vinod R Kashyap Message-ID: <20060109210653.GG81914@elvis.mu.org> References: <20060109185914.GD81914@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Cc: tcumming@amcc.com, scsi@freebsd.org Subject: Re: 3ware 9500 locks up on 6.0-stable! X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2006 21:06:54 -0000 * Vinod R Kashyap [060109 12:35] wrote: > > On 1/9/06, Alfred Perlstein <[1]alfred@freebsd.org> wrote: > > These messages are normal under heavy loads if you have bootverbose > on, > and should not cause any lockups. You might want to turn bootverbose > off > if you are seeing a lot of these. You seem to be using a 5.x driver > version (3.50.xx.xxx) on 6.0. You might want to move to a 6.x version > (3.60.xx.xxx). 1.) I am not really under any heavy load, the machine is pretty idle. 2.) that information was pasted from a 5.x machine, so I was running the correct driver with the correct OS. :) > > I have moved out of maintaining the 3ware driver. Please contact > 3ware Support if you have problems. > > And things seem fine... for now... there is currently a rebuild > and it's 12% complete. > Additionally it seems that under FreeBSD 5.4 and 6.0 the 3dm web > tool does not function. > > > 3dm should work both on 5.4 & 6.0. Contact 3ware Support if you have > problems. Know a name I can ask for? I'm a kernel-type guy so I can really give good diagnostics if the person is interested. I just would like to avoid jumping through a lot of lower level support channels if possible. -- - Alfred Perlstein From owner-freebsd-scsi@FreeBSD.ORG Mon Jan 9 22:00:32 2006 Return-Path: X-Original-To: scsi@freebsd.org Delivered-To: freebsd-scsi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B889216A41F for ; Mon, 9 Jan 2006 22:00:32 +0000 (GMT) (envelope-from vinodrk@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id AEBCC43D46 for ; Mon, 9 Jan 2006 22:00:31 +0000 (GMT) (envelope-from vinodrk@gmail.com) Received: by zproxy.gmail.com with SMTP id 8so4100667nzo for ; Mon, 09 Jan 2006 14:00:30 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=ayUIclNxYJRX3/0trJSWgLNmMdkE3IYEn3koME5V0eM/llckitZGqTtporT5Verf9D1Uc7fSAsvrKyUhxZiFPXr9RZvfqXooL7tOSCnCpFEaPjRoqTGtCdaYMAg6bfSessc4K0OrI4VDEIW2Q8P+iPFUfidtSQxuAbTP5xDX0Ik= Received: by 10.37.20.49 with SMTP id x49mr13666114nzi; Mon, 09 Jan 2006 14:00:30 -0800 (PST) Received: by 10.36.5.12 with HTTP; Mon, 9 Jan 2006 14:00:30 -0800 (PST) Message-ID: Date: Mon, 9 Jan 2006 14:00:30 -0800 From: Vinod R Kashyap To: Alfred Perlstein In-Reply-To: <20060109210653.GG81914@elvis.mu.org> MIME-Version: 1.0 References: <20060109185914.GD81914@elvis.mu.org> <20060109210653.GG81914@elvis.mu.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: tcumming@amcc.com, scsi@freebsd.org Subject: Re: 3ware 9500 locks up on 6.0-stable! X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2006 22:00:32 -0000 On 1/9/06, Alfred Perlstein wrote: > > * Vinod R Kashyap [060109 12:35] wrote: > > > > On 1/9/06, Alfred Perlstein <[1]alfred@freebsd.org> wrote: > > > > These messages are normal under heavy loads if you have bootverbose > > on, > > and should not cause any lockups. You might want to turn bootverbos= e > > off > > if you are seeing a lot of these. You seem to be using a 5.x driver > > version (3.50.xx.xxx) on 6.0. You might want to move to a 6.xversio= n > > (3.60.xx.xxx). > > 1.) I am not really under any heavy load, the machine is pretty idle. > 2.) that information was pasted from a 5.x machine, so I was running > the correct driver with the correct OS. :) > > > > > I have moved out of maintaining the 3ware driver. Please contact > > 3ware Support if you have problems. > > > > And things seem fine... for now... there is currently a rebuild > > and it's 12% complete. > > Additionally it seems that under FreeBSD 5.4 and 6.0 the 3dm web > > tool does not function. > > > > > > 3dm should work both on 5.4 & 6.0. Contact 3ware Support if you hav= e > > problems. > > Know a name I can ask for? I'm a kernel-type guy so I can really give > good diagnostics if the person is interested. I just would like to > avoid jumping through a lot of lower level support channels if possible. Unfortunately, I cannot give you any names. You will have to contact Support, and one of the Support personnel should help you. -- > - Alfred Perlstein > From owner-freebsd-scsi@FreeBSD.ORG Thu Jan 12 23:27:53 2006 Return-Path: X-Original-To: scsi@freebsd.org Delivered-To: freebsd-scsi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1D83516A41F for ; Thu, 12 Jan 2006 23:27:53 +0000 (GMT) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id F38F743D72 for ; Thu, 12 Jan 2006 23:27:44 +0000 (GMT) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 8B3171A3C30; Thu, 12 Jan 2006 15:27:44 -0800 (PST) Date: Thu, 12 Jan 2006 15:27:44 -0800 From: Alfred Perlstein To: Tom Cumming Message-ID: <20060112232744.GF72376@elvis.mu.org> References: <20060109185914.GD81914@elvis.mu.org> <20060109210653.GG81914@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Cc: Vinod R Kashyap , tcumming@amcc.com, scsi@freebsd.org Subject: Re: 3ware 9500 locks up on 6.0-stable! X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2006 23:27:53 -0000 * Tom Cumming [060112 15:20] wrote: > > When it says it's initializing (and you said 12%). Does the > initializing make forward progress, or is it stuck at 12%? > Why I'm asking, is that Vinode says you'd see these messages under > heavy load, and initializing + any load might be a, "heavy" load. > It still doesn't explain a hard lockup. The messages above are similar > to a SCSI "busy" status... that's normal. > There's some more things to check using the cli, I have to look try'm > here first. > Do you know of any specific steps you can do to reliably reproduce the > lockups? I get the impression there should be. > tom.c It seems fine on 5-stable. I have the following plans: .) upgrade the device's firmware. .) turn off questionable devices in the system BIOS (nvidia ethernet+APCI) .) re-try with 6.x I'll let you know what I figure out. thank you! -- - Alfred Perlstein From owner-freebsd-scsi@FreeBSD.ORG Fri Jan 13 02:10:15 2006 Return-Path: X-Original-To: scsi@freebsd.org Delivered-To: freebsd-scsi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9054A16A41F for ; Fri, 13 Jan 2006 02:10:15 +0000 (GMT) (envelope-from tcumming123@gmail.com) Received: from uproxy.gmail.com (uproxy.gmail.com [66.249.92.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2E78243D62 for ; Fri, 13 Jan 2006 02:10:05 +0000 (GMT) (envelope-from tcumming123@gmail.com) Received: by uproxy.gmail.com with SMTP id j3so54907ugf for ; Thu, 12 Jan 2006 18:10:04 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=Jl0+wfhT1+VY80SQ32D25jAI8ScXTYsdHQxmpVp2X7LuhaARFKVxLnVI1U8gPE211etOWSjTvdXN1CwMqC0FN64mHdLS+dApBSMK8Oph6+p1n98EJmShueB/c+y6yKI/UdJjhMTlpOJ1aEhSLfIqG5zHw/MECVml7lTwHSF7jzE= Received: by 10.48.202.9 with SMTP id z9mr15059nff; Thu, 12 Jan 2006 12:34:50 -0800 (PST) Received: by 10.48.14.8 with HTTP; Thu, 12 Jan 2006 12:34:49 -0800 (PST) Message-ID: Date: Thu, 12 Jan 2006 12:34:49 -0800 From: Tom Cumming To: Vinod R Kashyap In-Reply-To: MIME-Version: 1.0 References: <20060109185914.GD81914@elvis.mu.org> <20060109210653.GG81914@elvis.mu.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Alfred Perlstein , tcumming@amcc.com, scsi@freebsd.org Subject: Re: 3ware 9500 locks up on 6.0-stable! X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2006 02:10:15 -0000 When it says it's initializing (and you said 12%). Does the initializing make forward progress, or is it stuck at 12%? Why I'm asking, is that Vinode says you'd see these messages under heavy load, and initializing + any load might be a, "heavy" load. It still doesn't explain a hard lockup. The messages above are similar to a SCSI "busy" status... that's normal. There's some more things to check using the cli, I have to look try'm here first. Do you know of any specific steps you can do to reliably reproduce the lockups? I get the impression there should be. tom.c From owner-freebsd-scsi@FreeBSD.ORG Fri Jan 13 23:36:00 2006 Return-Path: X-Original-To: scsi@freebsd.org Delivered-To: freebsd-scsi@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B82816A41F; Fri, 13 Jan 2006 23:36:00 +0000 (GMT) (envelope-from myself@rojer.pp.ru) Received: from hermes.hw.ru (hermes.hw.ru [80.68.240.91]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0708743D46; Fri, 13 Jan 2006 23:35:58 +0000 (GMT) (envelope-from myself@rojer.pp.ru) Received: from [213.141.131.116] (account rojer@rbc.ru HELO [192.168.10.3]) by hermes.hw.ru (CommuniGate Pro SMTP 4.1.8) with ESMTP-TLS id 103538577; Sat, 14 Jan 2006 02:35:57 +0300 Message-ID: <43C8395C.9010608@rojer.pp.ru> Date: Sat, 14 Jan 2006 02:35:56 +0300 From: Rojer User-Agent: Thunderbird 1.6a1 (X11/20060112) MIME-Version: 1.0 To: Tom Cumming References: <20060109185914.GD81914@elvis.mu.org> <20060109210653.GG81914@elvis.mu.org> In-Reply-To: Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: Vinod R Kashyap , Alfred Perlstein , tcumming@amcc.com, scsi@freebsd.org Subject: Re: 3ware 9500 locks up on 6.0-stable! X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2006 23:36:00 -0000 Tom Cumming wrote: > It still doesn't explain a hard lockup. The messages above are similar to a > SCSI "busy" status... that's normal. i can confirm that there seems to be a problem with 3ware controllers on 6-STABLE, including a recent one (january 12th). i started getting lockups on a server that was running smoothly on 4-STABLE, but now it locks up regularly, about once a day. the array is not rebuilding, and i don't get any messages in the logs. my controller is also a different model, namely 8506 (twe driver). so far i don't see any correlation with controller activity. i had lockups on a fairly loaded (~50% disk load) controller, and on almost idle (1-5%). nothing is printed to the console and system is unresponsive, except for pings. strange thing is, usually when there is a disk problem, some activity is still possible - e.g., if you have a running shell, you can still at least type or even use commands/work with files in cache. not in this situation, though. i will try to investigate further, maybe try downgrading to 5.x dmesg output: http://pastebin.com/504721 -- Deomid Ryabkov aka Rojer myself@rojer.pp.ru rojer@sysadmins.ru ICQ: 8025844 From owner-freebsd-scsi@FreeBSD.ORG Fri Jan 13 23:43:59 2006 Return-Path: X-Original-To: freebsd-scsi@hub.freebsd.org Delivered-To: freebsd-scsi@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 034AE16A41F; Fri, 13 Jan 2006 23:43:59 +0000 (GMT) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B0B9443D45; Fri, 13 Jan 2006 23:43:58 +0000 (GMT) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (jkim@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k0DNhwcj043949; Fri, 13 Jan 2006 23:43:58 GMT (envelope-from jkim@freefall.freebsd.org) Received: (from jkim@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k0DNhwRc043945; Fri, 13 Jan 2006 23:43:58 GMT (envelope-from jkim) Date: Fri, 13 Jan 2006 23:43:58 GMT From: Jung-uk Kim Message-Id: <200601132343.k0DNhwRc043945@freefall.freebsd.org> To: jkim@FreeBSD.org, freebsd-scsi@FreeBSD.org, jkim@FreeBSD.org Cc: Subject: Re: kern/29727: [amr] [patch] amr_enquiry3 structure in amrreg.h is incorrect. X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2006 23:43:59 -0000 Synopsis: [amr] [patch] amr_enquiry3 structure in amrreg.h is incorrect. Responsible-Changed-From-To: freebsd-scsi->jkim Responsible-Changed-By: jkim Responsible-Changed-When: Fri Jan 13 23:43:03 UTC 2006 Responsible-Changed-Why: Since nobody seems to be interested, I will take this. http://www.freebsd.org/cgi/query-pr.cgi?pr=29727