From owner-freebsd-sparc64@FreeBSD.ORG Tue Jan 1 02:05:20 2013 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 148ECDBC for ; Tue, 1 Jan 2013 02:05:20 +0000 (UTC) (envelope-from cross+freebsd@distal.com) Received: from mail.distal.com (mail.distal.com [IPv6:2001:470:e24c:200::ae25]) by mx1.freebsd.org (Postfix) with ESMTP id CB6E48FC0A for ; Tue, 1 Jan 2013 02:05:19 +0000 (UTC) Received: from magrathea.distal.com (magrathea.distal.com [206.138.151.12]) (authenticated bits=0) by mail.distal.com (8.14.3/8.14.3) with ESMTP id r0125EZO000786 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 31 Dec 2012 21:05:16 -0500 (EST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: Changes to kern.geom.debugflags? From: Chris Ross In-Reply-To: <20121230032403.GA29164@pix.net> Date: Mon, 31 Dec 2012 21:05:13 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <56B28B8A-2284-421D-A666-A21F995C7640@distal.com> References: <7AA0B5D0-D49C-4D5A-8FA0-AA57C091C040@distal.com> <6A0C1005-F328-4C4C-BB83-CA463BD85127@distal.com> <20121225232507.GA47735@alchemy.franken.de> <8D01A854-97D9-4F1F-906A-7AB59BF8850B@distal.com> <6FC4189B-85FA-466F-AA00-C660E9C16367@distal.com> <20121230032403.GA29164@pix.net> To: Kurt Lidl X-Mailer: Apple Mail (2.1499) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.2 (mail.distal.com [206.138.151.250]); Mon, 31 Dec 2012 21:05:16 -0500 (EST) Cc: freebsd-sparc64@freebsd.org, Marius Strobl X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2013 02:05:20 -0000 On Dec 29, 2012, at 10:24 PM, Kurt Lidl wrote: > On Sat, Dec 29, 2012 at 03:01:55PM -0500, Chris Ross wrote: >> I'm going to guess this is a problem with dnode->dn_datablkszsec. >> Has anything changed recently in zfs_fmtdev, or more likely = zfs_get_root() >> or objset_get_dnode(), which is the callchain right before = dnode_read() ? >=20 > Well, there has been a big set of bugfixes integrated into zfs since > the 9.1-RELEASE, particularly revision r243674: >=20 > = ------------------------------------------------------------------------ > r243674 | mm | 2012-11-29 09:05:04 -0500 (Thu, 29 Nov 2012) | 223 = lines >=20 > Merge ZFS feature flags support and related bugfixes: > 236884, 237001, 237119, 237458, 237972, 238113, 238391, 238422, = 238926, > 238950, 238951, 239389, 239394, 239620, 239774, 239953, 239958, = 239967, > 239968, 240063, 240133, 240153, 240303, 240345, 240415, 240955, = 241655, > 243014, 243505, 243506 >=20 > [ long, long description elided ] > = ------------------------------------------------------------------------ >=20 > However, I think it's more likely that this revision, particularly > r239068 that is the probably cause of the issue you are seeing. > I don't particularly care for giant patches like this, where > trying to figure out exactly what piece of what patch did what, > but that's the way it goes. >=20 > So, to answer your question, "Yes, lots of stuff has changed recently > with ZFS". Okay. Well, I tried building stable/9 at revision 243673, which = didn't work, and then 243242, which also failed in the same way. So, it may be something = earlier than the suggested (if I'm reading your email correctly, and 243243 is = where the rev you mentioned was integrated to stable/9.) Thanks much for the pointers! I'll try to take a look at some of the = underlying changes, and see if anything looks more relevant. - Chris From owner-freebsd-sparc64@FreeBSD.ORG Fri Jan 4 04:27:51 2013 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B57FB937 for ; Fri, 4 Jan 2013 04:27:51 +0000 (UTC) (envelope-from cross+freebsd@distal.com) Received: from mail.distal.com (mail.distal.com [IPv6:2001:470:e24c:200::ae25]) by mx1.freebsd.org (Postfix) with ESMTP id 50B268C3 for ; Fri, 4 Jan 2013 04:27:51 +0000 (UTC) Received: from magrathea.distal.com (magrathea.distal.com [IPv6:2001:470:e24c:200:ea06:88ff:feca:960e]) (authenticated bits=0) by mail.distal.com (8.14.3/8.14.3) with ESMTP id r044RiTV012219 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Thu, 3 Jan 2013 23:27:45 -0500 (EST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: Changes to kern.geom.debugflags? From: Chris Ross In-Reply-To: <56B28B8A-2284-421D-A666-A21F995C7640@distal.com> Date: Thu, 3 Jan 2013 23:27:44 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: References: <7AA0B5D0-D49C-4D5A-8FA0-AA57C091C040@distal.com> <6A0C1005-F328-4C4C-BB83-CA463BD85127@distal.com> <20121225232507.GA47735@alchemy.franken.de> <8D01A854-97D9-4F1F-906A-7AB59BF8850B@distal.com> <6FC4189B-85FA-466F-AA00-C660E9C16367@distal.com> <20121230032403.GA29164@pix.net> <56B28B8A-2284-421D-A666-A21F995C7640@distal.com> To: "freebsd-sparc64@freebsd.org" X-Mailer: Apple Mail (2.1499) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.2 (mail.distal.com [IPv6:2001:470:e24c:200::ae25]); Thu, 03 Jan 2013 23:27:45 -0500 (EST) Cc: Kurt Lidl , Marius Strobl X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2013 04:27:51 -0000 On Dec 31, 2012, at 21:05 , Chris Ross wrote: > Okay. Well, I tried building stable/9 at revision 243673, which = didn't work, and > then 243242, which also failed in the same way. So, it may be = something earlier > than the suggested (if I'm reading your email correctly, and 243243 is = where the > rev you mentioned was integrated to stable/9.) >=20 > Thanks much for the pointers! I'll try to take a look at some of the = underlying > changes, and see if anything looks more relevant. So, now that we're past the holiday madness, and I haven't heard = anything back on this is there some other group or list I should ask the questions of = ZFS internals to figure out why the sparc64 MD boot loader code is seeing a = dn_datablkszsec of 0, and what it should be set to? Thanks. I'm happy to compose another message to include people who = might be able to help. I'm out of my "comfort zone" in ZFS. - Chris From owner-freebsd-sparc64@FreeBSD.ORG Fri Jan 4 05:19:16 2013 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 6BC37126 for ; Fri, 4 Jan 2013 05:19:16 +0000 (UTC) (envelope-from lidl@hydra.pix.net) Received: from hydra.pix.net (hydra.pix.net [IPv6:2001:470:e254::3c]) by mx1.freebsd.org (Postfix) with ESMTP id 15D66A14 for ; Fri, 4 Jan 2013 05:19:16 +0000 (UTC) Received: from hydra.pix.net (localhost [127.0.0.1]) by hydra.pix.net (8.14.5/8.14.5) with ESMTP id r045JFv1023105 for ; Fri, 4 Jan 2013 00:19:15 -0500 (EST) (envelope-from lidl@hydra.pix.net) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.97.6 at mail.pix.net Received: (from lidl@localhost) by hydra.pix.net (8.14.5/8.14.5/Submit) id r045JFrE023104 for freebsd-sparc64@freebsd.org; Fri, 4 Jan 2013 00:19:15 -0500 (EST) (envelope-from lidl) Date: Fri, 4 Jan 2013 00:19:15 -0500 From: Kurt Lidl To: freebsd-sparc64@freebsd.org Subject: smartmontools panics 9.1-RELEASE on sunfire 240 Message-ID: <20130104051914.GA22613@pix.net> MIME-Version: 1.0 Content-Type: text/plain; charset=unknown-8bit Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2013 05:19:16 -0000 Greetings all -- I recently endeavored to install the same suite of ports on my sparc64 machines as I have installed on my amd64 hosts. I installed the smartmontools from /usr/ports (it installed smartmontools-6.0), configured it thusly: echo 'DEVICESCAN -a -m somealias@example.com' > \ /usr/local/etc/smartd.conf And then when I started the daemon: /usr/local/etc/rc.d/smartd start Starting smartd. (pass0:ata2:0:0:0): ATA_IDENTIFY. ACB: ec 00 00 00 00 40 00 00 00 00 01 00 (pass0:ata2:0:0:0): CAM status: ATA Status Error (pass0:ata2:0:0:0): ATA status: 51 (DRDY SERV ERR), error: 04 (ABRT ) (pass0:ata2:0:0:0): RES: 51 04 00 00 00 00 00 00 00 01 00 And the kernel panic'd: panic: trap: memory address not aligned (kernel) cpuid = 0 KDB: stack backtrace: #0 0xc086c934 at trap+0x554 Uptime: 2h0m44s Automatic reboot in 15 seconds - press a key on the console to abort Rebooting... It's running the GENERIC kernel from 9.1-RELEASE. lidl@host-2: uname -a FreeBSD [redacted] 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243836: Tue Dec 4 15:49:34 UTC 2012 root@heller.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC sparc64 It's completely repeatable. The second time it panic'd, the machine successfully wrote a crashdump file, and savecore recovered it. Here's what kgdb had to say: root@spork-1: kgdb /boot/kernel/kernel /var/crash/vmcore.0 GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "sparc64-marcel-freebsd"... Unread portion of the kernel message buffer: panic: trap: memory address not aligned (kernel) cpuid = 0 KDB: stack backtrace: #0 0xc086c934 at trap+0x554 Uptime: 23m57s Dumping 8192 MB (4 chunks) chunk at 0: 2147483648 bytes | Reading symbols from /boot/kernel/zfs.ko...Reading symbols from /boot/kernel/zfs.ko.symbols...done. done. Loaded symbols for /boot/kernel/zfs.ko Reading symbols from /boot/kernel/opensolaris.ko...Reading symbols from /boot/kernel/opensolaris.ko.symbols...done. done. Loaded symbols for /boot/kernel/opensolaris.ko Reading symbols from /boot/kernel/geom_mirror.ko...Reading symbols from /boot/kernel/geom_mirror.ko.symbols...done. done. Loaded symbols for /boot/kernel/geom_mirror.ko Reading symbols from /boot/kernel/aio.ko...Reading symbols from /boot/kernel/aio.ko.symbols...done. done. Loaded symbols for /boot/kernel/aio.ko Reading symbols from /boot/kernel/accf_data.ko...Reading symbols from /boot/kernel/accf_data.ko.symbols...done. done. Loaded symbols for /boot/kernel/accf_data.ko Reading symbols from /boot/kernel/accf_http.ko...Reading symbols from /boot/kernel/accf_http.ko.symbols...done. done. Loaded symbols for /boot/kernel/accf_http.ko Reading symbols from /boot/kernel/pflog.ko...Reading symbols from /boot/kernel/pflog.ko.symbols...done. done. Loaded symbols for /boot/kernel/pflog.ko Reading symbols from /boot/kernel/pf.ko...Reading symbols from /boot/kernel/pf.ko.symbols...done. done. Loaded symbols for /boot/kernel/pf.ko #0 0x00000000c053199c in doadump (textdump=Variable "textdump" is not available. ) at /usr/src/sys/kern/kern_shutdown.c:259 259 savectx(&dumppcb); (kgdb) where #0 0x00000000c053199c in doadump (textdump=Variable "textdump" is not available. ) at /usr/src/sys/kern/kern_shutdown.c:259 #1 0x00000000c05323a0 in kern_reboot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:448 #2 0x00000000c053284c in panic (fmt=0xc0ab6a40 "trap: %s (kernel)") at /usr/src/sys/kern/kern_shutdown.c:636 #3 0x00000000c086c93c in trap (tf=0xea36b0b0) at /usr/src/sys/sparc64/sparc64/trap.c:411 #4 0x00000000c0099060 in tl1_trap () #5 0x00000000c012aebc in ata_pio_read (request=0xfffff80003642800, length=512) at bus.h:548 #6 0x00000000c012ae0c in ata_pio_read (request=0xfffff800053927b0, length=512) at /usr/src/sys/dev/ata/ata-lowlevel.c:838 #7 0x00000000c012c004 in ata_end_transaction (request=dwarf2_read_address: Corrupted DWARF expression. ) at /usr/src/sys/dev/ata/ata-lowlevel.c:282 #8 0x00000000c0128750 in ata_interrupt_locked (data=0xfffff80003642800) at /usr/src/sys/dev/ata/ata-all.c:586 #9 0x00000000c01287e8 in ata_interrupt (data=0xfffff80003642800) at /usr/src/sys/dev/ata/ata-all.c:549 #10 0x00000000c0130100 in ata_generic_intr (data=Variable "data" is not available. ) at /usr/src/sys/dev/ata/ata-pci.c:814 #11 0x00000000c04ff8c0 in intr_event_execute_handlers (p=0xfffff800032a2dc8, ie=0xfffff800033b3d00) at /usr/src/sys/kern/kern_intr.c:1262 #12 0x00000000c05014a4 in ithread_loop (arg=0xfffff800036a15c0) at /usr/src/sys/kern/kern_intr.c:1275 #13 0x00000000c04fc548 in fork_exit (callout=0xc05013c0 , arg=0xfffff800036a15c0, frame=0xea36b880) at /usr/src/sys/kern/kern_fork.c:992 #14 0x00000000c0099270 in fork_trampoline () #15 0x00000000c0099270 in fork_trampoline () Previous frame identical to this frame (corrupt stack?) (kgdb) up 5 #5 0x00000000c012aebc in ata_pio_read (request=0xfffff80003642800, length=512) at bus.h:548 548 bus.h: No such file or directory. in bus.h (kgdb) up 1 #6 0x00000000c012ae0c in ata_pio_read (request=0xfffff800053927b0, length=512) at /usr/src/sys/dev/ata/ata-lowlevel.c:838 838 struct ata_channel *ch = device_get_softc(request->parent); (kgdb) list 833 } 834 835 static void 836 ata_pio_read(struct ata_request *request, int length) 837 { 838 struct ata_channel *ch = device_get_softc(request->parent); 839 uint8_t *addr; 840 int size = min(request->transfersize, length); 841 int resid; 842 uint8_t buf[2]; (kgdb) p *request $1 = {dev = 0x0, parent = 0xfffff80003563400, unit = 0, u = {ata = { command = 161 '¡', feature = 0, count = 1, lba = 0}, atapi = { ccb = "¡\000\000\000\000\001\000\000\000\000\000\000\000\000\000", sense = {error = 0 '\0', segment = 0 '\0', key = 0 '\0', cmd_info = 0, sense_length = 0 '\0', cmd_specific_info = 0, asc = 0 '\0', ascq = 0 '\0', replaceable_unit_code = 0 '\0', specific = 0 '\0', specific1 = 0 '\0', specific2 = 0 '\0'}, saved_cmd = 0 '\0'}}, bytecount = 512, transfersize = 512, data = 0xdd551577 "", tag = 0, flags = 2, dma = 0x0, status = 88 'X', error = 0 '\0', donecount = 0, result = 0, callback = 0, done = {sema_mtx = {lock_object = {lo_name = 0x0, lo_flags = 0, lo_data = 0, lo_witness = 0x0}, mtx_lock = 0}, sema_cv = {cv_description = 0x0, cv_waiters = 0}, sema_waiters = 0, sema_value = 0}, retries = 0, timeout = 20, callout = {c_links = {sle = { sle_next = 0x0}, tqe = {tqe_next = 0x0, tqe_prev = 0xc1950940}}, c_time = 1456010, c_arg = 0xfffff800053927b0, c_func = 0xc012f040 , c_lock = 0xfffff80003642ac0, c_flags = 22, c_cpu = 0}, task = {ta_link = {stqe_next = 0x0}, ta_pending = 0, ta_priority = 0, ta_func = 0, ta_context = 0x0}, bio = 0x0, this = 0, composite = 0x0, driver = 0x0, chain = {tqe_next = 0x0, tqe_prev = 0x0}, ccb = 0xfffff80005375000} (kgdb) p *request->parent $2 = {ops = 0xfffff800032e8000, link = {tqe_next = 0xfffff80003563500, tqe_prev = 0xfffff800033b2b30}, devlink = {tqe_next = 0xfffff80003563500, tqe_prev = 0xfffff80003562918}, parent = 0xfffff800033b2b00, children = { tqh_first = 0x0, tqh_last = 0xfffff80003563430}, driver = 0xc0ae6620, devclass = 0xfffff800032ce900, unit = 2, nameunit = 0xfffff800036534e0 "ata2", desc = 0xc0a488d0 "ATA channel", busy = 0, state = DS_ATTACHED, devflags = 0, flags = 3, order = 0, ivars = 0x0, softc = 0xfffff80003642800, sysctl_ctx = { tqh_first = 0xfffff800036a1740, tqh_last = 0xfffff800036a1648}, sysctl_tree = 0xfffff800036bac80} (kgdb) Any tips would be appreciated :-) -Kurt From owner-freebsd-sparc64@FreeBSD.ORG Fri Jan 4 11:24:08 2013 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A6CD85B1; Fri, 4 Jan 2013 11:24:08 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from dirg.bris.ac.uk (dirg.bris.ac.uk [137.222.10.102]) by mx1.freebsd.org (Postfix) with ESMTP id 6E2FDD05; Fri, 4 Jan 2013 11:24:08 +0000 (UTC) Received: from irix.bris.ac.uk ([137.222.10.39] helo=ncs.bris.ac.uk) by dirg.bris.ac.uk with esmtp (Exim 4.72) (envelope-from ) id 1Tr5NW-0004rG-Mw; Fri, 04 Jan 2013 11:24:01 +0000 Received: from mech-cluster241.men.bris.ac.uk ([137.222.187.241]) by ncs.bris.ac.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1Tr5NW-00023T-Iz; Fri, 04 Jan 2013 11:23:58 +0000 Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.6/8.14.6) with ESMTP id r04BNwVO014118; Fri, 4 Jan 2013 11:23:58 GMT (envelope-from mexas@mech-cluster241.men.bris.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.6/8.14.6/Submit) id r04BNwTU014117; Fri, 4 Jan 2013 11:23:58 GMT (envelope-from mexas) Date: Fri, 4 Jan 2013 11:23:58 GMT From: Anton Shterenlikht Message-Id: <201301041123.r04BNwTU014117@mech-cluster241.men.bris.ac.uk> To: freebsd-current@freebsd.org, freebsd-sparc64@freebsd.org Subject: Re: installworld error: ad0: FAILURE - READ_DMA status=51 error=40 LBA=28071584 In-Reply-To: <201301041109.r04B97QU001888@mech-cluster241.men.bris.ac.uk> X-Spam-Score: -4.0 X-Spam-Level: ---- X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: mexas@bristol.ac.uk List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2013 11:24:08 -0000 Date: Fri, 4 Jan 2013 11:09:07 GMT From: Anton Shterenlikht I got this error on make installworld: ===> sbin/dhclient (install) install -s -o root -g wheel -m 555 dhclient /sbin ad0: FAILURE - READ_DMA status=51 error=40 LBA=28071584 g_vfs_done():ad0a[READ(offset=14372651008, length=16384)]error = 5 vnode_pager_getpages: I/O read error vm_fault: pager read error, pid 12794 (install) install: /sbin/dhclient: Bad address *** [_proginstall] Error code 71 Stop in /usr/src/sbin/dhclient. *** [realinstall] Error code 1 Stop in /usr/src/sbin. *** [realinstall] Error code 1 Stop in /usr/src. *** [reinstall] Error code 1 Stop in /usr/src. *** [installworld] Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. What's going on? This is on sparc64 SunBlade 1500 silver, updating to r244988. The disk is: # gpart show ad0 => 0 234432720 ad0 VTOC8 (111G) 0 41946480 1 !0 (20G) 41946480 33558000 2 !0 (16G) 75504480 158928240 4 !0 (75G) # # df Filesystem 512-blocks Used Avail Capacity Mounted on /dev/ad0a 40620236 21769888 15600732 58% / devfs 2 2 0 100% /dev # I've run fsck -p before installworld, and didn't see any problems. Is my disk dying? # fsck ** /dev/ad0a (NO WRITE) ** Last Mounted on / ** Root file system ** Phase 1 - Check Blocks and Sizes ad0: FAILURE - READ_DMA status=51 error=40 LBA=23328672 CANNOT READ BLK: 23328608 CONTINUE? [yn] Thanks Anton From owner-freebsd-sparc64@FreeBSD.ORG Fri Jan 4 14:48:55 2013 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 2FB5AA01; Fri, 4 Jan 2013 14:48:55 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-oa0-f44.google.com (mail-oa0-f44.google.com [209.85.219.44]) by mx1.freebsd.org (Postfix) with ESMTP id E6B78765; Fri, 4 Jan 2013 14:48:54 +0000 (UTC) Received: by mail-oa0-f44.google.com with SMTP id n5so15239417oag.3 for ; Fri, 04 Jan 2013 06:48:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=QSbxuWjuOsaww8eKNLi9uf5vg30QA97c2n+xREbJUDw=; b=E0WcoBERq2LWdQVDXwQizXCtwzohgwcBmFdB4Ei7UflahXtFzr3SMVN6pOFzHYS0qs 5nG6nG8aPsnDkkWmuHfTSkgyVk1qVg/U+pneiyOCDxYrF1g8ncRtPO1RDTtYJGPmVgRd lavJGZ0ZLuz/X/xcc4ajYlt09Jwql8JsC55ulJyPWApr4JxsD21j3rTMXuRYMFljqWaG e7iXJYmvM+JxLwY9jra4DQA9bfRv8SOo5ZnyQbKQrIZU/x0s3lWB2utTTjqcTTeUAx9l bParO4ipG5pymI4eP4+vOrkwmiQhBPRGRmaF1CJ3n1jTebQyksIxYv+1wgHwDp4v8OsY 5Jxw== MIME-Version: 1.0 Received: by 10.60.0.165 with SMTP id 5mr30829300oef.128.1357310928561; Fri, 04 Jan 2013 06:48:48 -0800 (PST) Received: by 10.76.143.33 with HTTP; Fri, 4 Jan 2013 06:48:48 -0800 (PST) In-Reply-To: <201301041123.r04BNwTU014117@mech-cluster241.men.bris.ac.uk> References: <201301041109.r04B97QU001888@mech-cluster241.men.bris.ac.uk> <201301041123.r04BNwTU014117@mech-cluster241.men.bris.ac.uk> Date: Fri, 4 Jan 2013 06:48:48 -0800 Message-ID: Subject: Re: installworld error: ad0: FAILURE - READ_DMA status=51 error=40 LBA=28071584 From: Garrett Cooper To: mexas@bristol.ac.uk Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-current@freebsd.org, freebsd-sparc64@freebsd.org X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2013 14:48:55 -0000 On Fri, Jan 4, 2013 at 3:23 AM, Anton Shterenlikht wrote: ... > Is my disk dying? Uncorrectable read errors suggest yes (especially because the LBA varies between the two error messages). I would definitely backup your data at the very least, and as others suggested use smartmontools [via a livecd?]. Cheers, -Garrett From owner-freebsd-sparc64@FreeBSD.ORG Fri Jan 4 23:46:36 2013 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 7740AB27 for ; Fri, 4 Jan 2013 23:46:36 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 0356FEE6 for ; Fri, 4 Jan 2013 23:46:35 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.5/8.14.5/ALCHEMY.FRANKEN.DE) with ESMTP id r04NkHvI038493; Sat, 5 Jan 2013 00:46:17 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.5/8.14.5/Submit) id r04NkGVi038492; Sat, 5 Jan 2013 00:46:16 +0100 (CET) (envelope-from marius) Date: Sat, 5 Jan 2013 00:46:16 +0100 From: Marius Strobl To: Chris Ross Subject: Re: Changes to kern.geom.debugflags? Message-ID: <20130104234616.GA37999@alchemy.franken.de> References: <7AA0B5D0-D49C-4D5A-8FA0-AA57C091C040@distal.com> <6A0C1005-F328-4C4C-BB83-CA463BD85127@distal.com> <20121225232507.GA47735@alchemy.franken.de> <8D01A854-97D9-4F1F-906A-7AB59BF8850B@distal.com> <6FC4189B-85FA-466F-AA00-C660E9C16367@distal.com> <20121230032403.GA29164@pix.net> <56B28B8A-2284-421D-A666-A21F995C7640@distal.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "freebsd-sparc64@freebsd.org" , Kurt Lidl X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2013 23:46:36 -0000 On Thu, Jan 03, 2013 at 11:27:44PM -0500, Chris Ross wrote: > > On Dec 31, 2012, at 21:05 , Chris Ross wrote: > > Okay. Well, I tried building stable/9 at revision 243673, which didn't work, and > > then 243242, which also failed in the same way. So, it may be something earlier > > than the suggested (if I'm reading your email correctly, and 243243 is where the > > rev you mentioned was integrated to stable/9.) > > > > Thanks much for the pointers! I'll try to take a look at some of the underlying > > changes, and see if anything looks more relevant. > > So, now that we're past the holiday madness, and I haven't heard anything back > on this is there some other group or list I should ask the questions of ZFS internals > to figure out why the sparc64 MD boot loader code is seeing a dn_datablkszsec > of 0, and what it should be set to? > > Thanks. I'm happy to compose another message to include people who might > be able to help. I'm out of my "comfort zone" in ZFS. > The most straightforward way is to identify the commit that broke it via a binary search and email the corresponding commit. Marius From owner-freebsd-sparc64@FreeBSD.ORG Fri Jan 4 23:53:37 2013 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B3A38B8A for ; Fri, 4 Jan 2013 23:53:37 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 4627AF04 for ; Fri, 4 Jan 2013 23:53:36 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.5/8.14.5/ALCHEMY.FRANKEN.DE) with ESMTP id r04NraDg038528; Sat, 5 Jan 2013 00:53:36 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.5/8.14.5/Submit) id r04NraXt038527; Sat, 5 Jan 2013 00:53:36 +0100 (CET) (envelope-from marius) Date: Sat, 5 Jan 2013 00:53:36 +0100 From: Marius Strobl To: Kurt Lidl Subject: Re: smartmontools panics 9.1-RELEASE on sunfire 240 Message-ID: <20130104235336.GB37999@alchemy.franken.de> References: <20130104051914.GA22613@pix.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ZPt4rx8FFjLCG7dd" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20130104051914.GA22613@pix.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-sparc64@freebsd.org X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2013 23:53:37 -0000 --ZPt4rx8FFjLCG7dd Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Fri, Jan 04, 2013 at 12:19:15AM -0500, Kurt Lidl wrote: > Greetings all -- > > I recently endeavored to install the same suite of ports on > my sparc64 machines as I have installed on my amd64 hosts. > > I installed the smartmontools from /usr/ports (it installed > smartmontools-6.0), configured it thusly: > > echo 'DEVICESCAN -a -m somealias@example.com' > \ > /usr/local/etc/smartd.conf > > And then when I started the daemon: > > /usr/local/etc/rc.d/smartd start > Starting smartd. > (pass0:ata2:0:0:0): ATA_IDENTIFY. ACB: ec 00 00 00 00 40 00 00 00 00 01 00 > (pass0:ata2:0:0:0): CAM status: ATA Status Error > (pass0:ata2:0:0:0): ATA status: 51 (DRDY SERV ERR), error: 04 (ABRT ) > (pass0:ata2:0:0:0): RES: 51 04 00 00 00 00 00 00 00 01 00 > > And the kernel panic'd: > > panic: trap: memory address not aligned (kernel) > cpuid = 0 > KDB: stack backtrace: > #0 0xc086c934 at trap+0x554 > Uptime: 2h0m44s > Automatic reboot in 15 seconds - press a key on the console to abort > Rebooting... > > It's running the GENERIC kernel from 9.1-RELEASE. > > lidl@host-2: uname -a > FreeBSD [redacted] 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243836: Tue Dec 4 15:49:34 UTC 2012 root@heller.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC sparc64 > > It's completely repeatable. The second time it panic'd, the > machine successfully wrote a crashdump file, and savecore recovered it. > Here's what kgdb had to say: > > root@spork-1: kgdb /boot/kernel/kernel /var/crash/vmcore.0 > GNU gdb 6.1.1 [FreeBSD] > Copyright 2004 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you are > welcome to change it and/or distribute copies of it under certain conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for details. > This GDB was configured as "sparc64-marcel-freebsd"... > > Unread portion of the kernel message buffer: > panic: trap: memory address not aligned (kernel) > cpuid = 0 > KDB: stack backtrace: > #0 0xc086c934 at trap+0x554 > Uptime: 23m57s > Dumping 8192 MB (4 chunks) > chunk at 0: 2147483648 bytes | > > Reading symbols from /boot/kernel/zfs.ko...Reading symbols from /boot/kernel/zfs.ko.symbols...done. > done. > Loaded symbols for /boot/kernel/zfs.ko > Reading symbols from /boot/kernel/opensolaris.ko...Reading symbols from /boot/kernel/opensolaris.ko.symbols...done. > done. > Loaded symbols for /boot/kernel/opensolaris.ko > Reading symbols from /boot/kernel/geom_mirror.ko...Reading symbols from /boot/kernel/geom_mirror.ko.symbols...done. > done. > Loaded symbols for /boot/kernel/geom_mirror.ko > Reading symbols from /boot/kernel/aio.ko...Reading symbols from /boot/kernel/aio.ko.symbols...done. > done. > Loaded symbols for /boot/kernel/aio.ko > Reading symbols from /boot/kernel/accf_data.ko...Reading symbols from /boot/kernel/accf_data.ko.symbols...done. > done. > Loaded symbols for /boot/kernel/accf_data.ko > Reading symbols from /boot/kernel/accf_http.ko...Reading symbols from /boot/kernel/accf_http.ko.symbols...done. > done. > Loaded symbols for /boot/kernel/accf_http.ko > Reading symbols from /boot/kernel/pflog.ko...Reading symbols from /boot/kernel/pflog.ko.symbols...done. > done. > Loaded symbols for /boot/kernel/pflog.ko > Reading symbols from /boot/kernel/pf.ko...Reading symbols from /boot/kernel/pf.ko.symbols...done. > done. > Loaded symbols for /boot/kernel/pf.ko > #0 0x00000000c053199c in doadump (textdump=Variable "textdump" is not available. > ) > at /usr/src/sys/kern/kern_shutdown.c:259 > 259 savectx(&dumppcb); > (kgdb) where > #0 0x00000000c053199c in doadump (textdump=Variable "textdump" is not available. > ) > at /usr/src/sys/kern/kern_shutdown.c:259 > #1 0x00000000c05323a0 in kern_reboot (howto=260) > at /usr/src/sys/kern/kern_shutdown.c:448 > #2 0x00000000c053284c in panic (fmt=0xc0ab6a40 "trap: %s (kernel)") > at /usr/src/sys/kern/kern_shutdown.c:636 > #3 0x00000000c086c93c in trap (tf=0xea36b0b0) > at /usr/src/sys/sparc64/sparc64/trap.c:411 > #4 0x00000000c0099060 in tl1_trap () > #5 0x00000000c012aebc in ata_pio_read (request=0xfffff80003642800, length=512) > at bus.h:548 > #6 0x00000000c012ae0c in ata_pio_read (request=0xfffff800053927b0, length=512) > at /usr/src/sys/dev/ata/ata-lowlevel.c:838 > #7 0x00000000c012c004 in ata_end_transaction (request=dwarf2_read_address: Corrupted DWARF expression. > ) > at /usr/src/sys/dev/ata/ata-lowlevel.c:282 > #8 0x00000000c0128750 in ata_interrupt_locked (data=0xfffff80003642800) > at /usr/src/sys/dev/ata/ata-all.c:586 > #9 0x00000000c01287e8 in ata_interrupt (data=0xfffff80003642800) > at /usr/src/sys/dev/ata/ata-all.c:549 > #10 0x00000000c0130100 in ata_generic_intr (data=Variable "data" is not available. > ) > at /usr/src/sys/dev/ata/ata-pci.c:814 > #11 0x00000000c04ff8c0 in intr_event_execute_handlers (p=0xfffff800032a2dc8, > ie=0xfffff800033b3d00) at /usr/src/sys/kern/kern_intr.c:1262 > #12 0x00000000c05014a4 in ithread_loop (arg=0xfffff800036a15c0) > at /usr/src/sys/kern/kern_intr.c:1275 > #13 0x00000000c04fc548 in fork_exit (callout=0xc05013c0 , > arg=0xfffff800036a15c0, frame=0xea36b880) > at /usr/src/sys/kern/kern_fork.c:992 > #14 0x00000000c0099270 in fork_trampoline () > #15 0x00000000c0099270 in fork_trampoline () > Previous frame identical to this frame (corrupt stack?) > (kgdb) up 5 > #5 0x00000000c012aebc in ata_pio_read (request=0xfffff80003642800, length=512) > at bus.h:548 > 548 bus.h: No such file or directory. > in bus.h > (kgdb) up 1 > #6 0x00000000c012ae0c in ata_pio_read (request=0xfffff800053927b0, length=512) > at /usr/src/sys/dev/ata/ata-lowlevel.c:838 > 838 struct ata_channel *ch = device_get_softc(request->parent); > (kgdb) list > 833 } > 834 > 835 static void > 836 ata_pio_read(struct ata_request *request, int length) > 837 { > 838 struct ata_channel *ch = device_get_softc(request->parent); > 839 uint8_t *addr; > 840 int size = min(request->transfersize, length); > 841 int resid; > 842 uint8_t buf[2]; > (kgdb) p *request > $1 = {dev = 0x0, parent = 0xfffff80003563400, unit = 0, u = {ata = { > command = 161 '¡', feature = 0, count = 1, lba = 0}, atapi = { > ccb = "¡\000\000\000\000\001\000\000\000\000\000\000\000\000\000", > sense = {error = 0 '\0', segment = 0 '\0', key = 0 '\0', cmd_info = 0, > sense_length = 0 '\0', cmd_specific_info = 0, asc = 0 '\0', > ascq = 0 '\0', replaceable_unit_code = 0 '\0', specific = 0 '\0', > specific1 = 0 '\0', specific2 = 0 '\0'}, saved_cmd = 0 '\0'}}, > bytecount = 512, transfersize = 512, data = 0xdd551577 "", tag = 0, > flags = 2, dma = 0x0, status = 88 'X', error = 0 '\0', donecount = 0, > result = 0, callback = 0, done = {sema_mtx = {lock_object = {lo_name = 0x0, > lo_flags = 0, lo_data = 0, lo_witness = 0x0}, mtx_lock = 0}, > sema_cv = {cv_description = 0x0, cv_waiters = 0}, sema_waiters = 0, > sema_value = 0}, retries = 0, timeout = 20, callout = {c_links = {sle = { > sle_next = 0x0}, tqe = {tqe_next = 0x0, tqe_prev = 0xc1950940}}, > c_time = 1456010, c_arg = 0xfffff800053927b0, > c_func = 0xc012f040 , c_lock = 0xfffff80003642ac0, > c_flags = 22, c_cpu = 0}, task = {ta_link = {stqe_next = 0x0}, > ta_pending = 0, ta_priority = 0, ta_func = 0, ta_context = 0x0}, > bio = 0x0, this = 0, composite = 0x0, driver = 0x0, chain = {tqe_next = 0x0, > tqe_prev = 0x0}, ccb = 0xfffff80005375000} Uhm, probably an userland buffer which isn't even 16-bit aligned. If that's the cause, the attached patch hopefully should at least prevent the panic. If it does, smartmontools still need to be fixed though. Marius --ZPt4rx8FFjLCG7dd Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="cam_periph.c.diff" Index: cam_periph.c =================================================================== --- cam_periph.c (revision 245046) +++ cam_periph.c (working copy) @@ -744,6 +744,9 @@ cam_periph_mapmem(union ccb *ccb, struct cam_perip if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_NONE) return(0); + if ((uintptr_t)ccb->ataio.data_ptr % sizeof(uint16_t) != 0) + return (EINVAL); + data_ptrs[0] = &ccb->ataio.data_ptr; lengths[0] = ccb->ataio.dxfer_len; dirs[0] = ccb->ccb_h.flags & CAM_DIR_MASK; --ZPt4rx8FFjLCG7dd-- From owner-freebsd-sparc64@FreeBSD.ORG Sat Jan 5 00:38:16 2013 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4EACE4A1 for ; Sat, 5 Jan 2013 00:38:16 +0000 (UTC) (envelope-from cross+freebsd@distal.com) Received: from mail.distal.com (mail.distal.com [IPv6:2001:470:e24c:200::ae25]) by mx1.freebsd.org (Postfix) with ESMTP id F3B77D6 for ; Sat, 5 Jan 2013 00:38:15 +0000 (UTC) Received: from magrathea.distal.com (magrathea.distal.com [206.138.151.12]) (authenticated bits=0) by mail.distal.com (8.14.3/8.14.3) with ESMTP id r050cA6s019709 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 4 Jan 2013 19:38:11 -0500 (EST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: Changes to kern.geom.debugflags? From: Chris Ross In-Reply-To: <20130104234616.GA37999@alchemy.franken.de> Date: Fri, 4 Jan 2013 19:38:10 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: References: <7AA0B5D0-D49C-4D5A-8FA0-AA57C091C040@distal.com> <6A0C1005-F328-4C4C-BB83-CA463BD85127@distal.com> <20121225232507.GA47735@alchemy.franken.de> <8D01A854-97D9-4F1F-906A-7AB59BF8850B@distal.com> <6FC4189B-85FA-466F-AA00-C660E9C16367@distal.com> <20121230032403.GA29164@pix.net> <56B28B8A-2284-421D-A666-A21F995C7640@distal.com> <20130104234616.GA37999@alchemy.franken.de> To: Marius Strobl X-Mailer: Apple Mail (2.1499) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.2 (mail.distal.com [206.138.151.250]); Fri, 04 Jan 2013 19:38:11 -0500 (EST) Cc: freebsd-sparc64@freebsd.org, Kurt Lidl X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2013 00:38:16 -0000 On Jan 4, 2013, at 18:46 , Marius Strobl = wrote: > On Thu, Jan 03, 2013 at 11:27:44PM -0500, Chris Ross wrote: >> So, now that we're past the holiday madness, and I haven't heard = anything back >> on this is there some other group or list I should ask the questions = of ZFS internals >> to figure out why the sparc64 MD boot loader code is seeing a = dn_datablkszsec >> of 0, and what it should be set to? >>=20 >> Thanks. I'm happy to compose another message to include people who = might >> be able to help. I'm out of my "comfort zone" in ZFS. >>=20 >=20 > The most straightforward way is to identify the commit that broke > it via a binary search and email the corresponding commit. And while that would take time, I'm happy to do it, but it's hard = given all the merges which include many other revisions from trunk. I was just hoping someone that knew what dn_datablkszsec is and/or should be would be able to help identify the fix before trying to figure = out what broke it in the first place. - Chris From owner-freebsd-sparc64@FreeBSD.ORG Sat Jan 5 01:32:26 2013 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A560EC4D for ; Sat, 5 Jan 2013 01:32:26 +0000 (UTC) (envelope-from lidl@hydra.pix.net) Received: from hydra.pix.net (hydra.pix.net [IPv6:2001:470:e254::3c]) by mx1.freebsd.org (Postfix) with ESMTP id 821D1231 for ; Sat, 5 Jan 2013 01:32:26 +0000 (UTC) Received: from hydra.pix.net (localhost [127.0.0.1]) by hydra.pix.net (8.14.5/8.14.5) with ESMTP id r051WOEl031557; Fri, 4 Jan 2013 20:32:24 -0500 (EST) (envelope-from lidl@hydra.pix.net) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.97.6 at mail.pix.net Received: (from lidl@localhost) by hydra.pix.net (8.14.5/8.14.5/Submit) id r051WOAA031556; Fri, 4 Jan 2013 20:32:24 -0500 (EST) (envelope-from lidl) Date: Fri, 4 Jan 2013 20:32:24 -0500 From: Kurt Lidl To: Marius Strobl Subject: Re: smartmontools panics 9.1-RELEASE on sunfire 240 Message-ID: <20130105013224.GA31361@pix.net> References: <20130104051914.GA22613@pix.net> <20130104235336.GB37999@alchemy.franken.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130104235336.GB37999@alchemy.franken.de> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-sparc64@freebsd.org X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2013 01:32:26 -0000 On Sat, Jan 05, 2013 at 12:53:36AM +0100, Marius Strobl wrote: > Uhm, probably an userland buffer which isn't even 16-bit aligned. > If that's the cause, the attached patch hopefully should at least > prevent the panic. If it does, smartmontools still need to be fixed > though. You patch prevents the panic from happening. When I try to start smartd now, it reports: root@host-98: /usr/local/etc/rc.d/smartd onestart Starting smartd. smartd: cam_send_ccb: Invalid argument /usr/local/etc/rc.d/smartd: WARNING: failed to start smartd I had updated the kernel on the machine to 9-STABLE, and verified that without this patch, the crash still happened with a 9-STABLE kernel, in addition to 9.1-RELEASE kernel. My kernel now identifies itself as: FreeBSD 9.1-STABLE (GENERIC) #1 r245044:245048M: Fri Jan 4 20:19:50 EST 2013 -Kurt > Index: cam_periph.c > =================================================================== > --- cam_periph.c (revision 245046) > +++ cam_periph.c (working copy) > @@ -744,6 +744,9 @@ cam_periph_mapmem(union ccb *ccb, struct cam_perip > if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_NONE) > return(0); > > + if ((uintptr_t)ccb->ataio.data_ptr % sizeof(uint16_t) != 0) > + return (EINVAL); > + > data_ptrs[0] = &ccb->ataio.data_ptr; > lengths[0] = ccb->ataio.dxfer_len; > dirs[0] = ccb->ccb_h.flags & CAM_DIR_MASK; > _______________________________________________ > freebsd-sparc64@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-sparc64 > To unsubscribe, send any mail to "freebsd-sparc64-unsubscribe@freebsd.org" From owner-freebsd-sparc64@FreeBSD.ORG Sat Jan 5 01:52:45 2013 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8108AD37; Sat, 5 Jan 2013 01:52:45 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id DD653290; Sat, 5 Jan 2013 01:52:44 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.5/8.14.5/ALCHEMY.FRANKEN.DE) with ESMTP id r051qgKg038852; Sat, 5 Jan 2013 02:52:43 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.5/8.14.5/Submit) id r051qg7I038851; Sat, 5 Jan 2013 02:52:42 +0100 (CET) (envelope-from marius) Date: Sat, 5 Jan 2013 02:52:42 +0100 From: Marius Strobl To: Kurt Lidl , mav@freebsd.org Subject: Re: smartmontools panics 9.1-RELEASE on sunfire 240 Message-ID: <20130105015242.GB26039@alchemy.franken.de> References: <20130104051914.GA22613@pix.net> <20130104235336.GB37999@alchemy.franken.de> <20130105013224.GA31361@pix.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130105013224.GA31361@pix.net> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-sparc64@freebsd.org X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jan 2013 01:52:45 -0000 On Fri, Jan 04, 2013 at 08:32:24PM -0500, Kurt Lidl wrote: > On Sat, Jan 05, 2013 at 12:53:36AM +0100, Marius Strobl wrote: > > Uhm, probably an userland buffer which isn't even 16-bit aligned. > > If that's the cause, the attached patch hopefully should at least > > prevent the panic. If it does, smartmontools still need to be fixed > > though. > > You patch prevents the panic from happening. > When I try to start smartd now, it reports: > > root@host-98: /usr/local/etc/rc.d/smartd onestart > Starting smartd. > smartd: cam_send_ccb: Invalid argument > /usr/local/etc/rc.d/smartd: WARNING: failed to start smartd > > I had updated the kernel on the machine to 9-STABLE, and > verified that without this patch, the crash still happened with > a 9-STABLE kernel, in addition to 9.1-RELEASE kernel. > > My kernel now identifies itself as: > FreeBSD 9.1-STABLE (GENERIC) #1 r245044:245048M: Fri Jan 4 20:19:50 EST 2013 > > -Kurt > > > Index: cam_periph.c > > =================================================================== > > --- cam_periph.c (revision 245046) > > +++ cam_periph.c (working copy) > > @@ -744,6 +744,9 @@ cam_periph_mapmem(union ccb *ccb, struct cam_perip > > if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_NONE) > > return(0); > > > > + if ((uintptr_t)ccb->ataio.data_ptr % sizeof(uint16_t) != 0) > > + return (EINVAL); > > + > > data_ptrs[0] = &ccb->ataio.data_ptr; > > lengths[0] = ccb->ataio.dxfer_len; > > dirs[0] = ccb->ccb_h.flags & CAM_DIR_MASK; > Alexander, are you okay with this approach or do you have a better idea how to handle this? In any case, it doesn't seem to make sense to teach the kernel how to cope with arbitrarily aligned buffers for ATA. Marius