From owner-freebsd-bugs@FreeBSD.ORG Wed Oct 1 14:14:25 2014 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 27119777 for ; Wed, 1 Oct 2014 14:14:25 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB340CA0 for ; Wed, 1 Oct 2014 14:14:24 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id s91EEOmA058594 for ; Wed, 1 Oct 2014 14:14:24 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 194071] New: zfsloader broken on sparc64 since r268649 Date: Wed, 01 Oct 2014 14:14:25 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.1-BETA3 X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: lidl@pix.net X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 14:14:25 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194071 Bug ID: 194071 Summary: zfsloader broken on sparc64 since r268649 Product: Base System Version: 10.1-BETA3 Hardware: sparc64 OS: Any Status: Needs Triage Severity: Affects Some People Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: lidl@pix.net It took a while to track this down, but the zfsloader on sparc64 machines has been broken since r268649. That's when the lz4 compression was added to ZFS. This affects 10.1-BETA2 and 10.1-BETA3, where I did my diagnostic work. I'm sure that it also affects head. In a nutshell, the lz4 code is missing a couple of portability fixes that allow for unaligned access to some of the data structures in a compressed lz4 data stream. When attempting to boot off a zfsloader with this problem, one will see errors similar to this: >> FreeBSD/sparc64 ZFS boot block Boot path: /pci@1f,0/pci@1/scsi@8/disk@0,0:a Consoles: Open Firmware console ^M Memory Address not Aligned After bisecting the stable/10 tree over the last couple of nights, I figured out the exact revision where it failed. (r268649) Looking at the lz4 project's sources, it appears there was a portability fix introduced in this patchset: https://code.google.com/p/lz4/source/detail?r=95 In particular, the patch that is needed for sparc64 is addition of a __attribute__((packed)) to some of the data structures for the lz4 implementation. I've reduced this to use the FreeBSD __packed definition that is in . With the attached patch, recompiling stable/10 on a sparc64, I get a useable zfsloader, so I can once again boot a zfs-only sparc64 machine. Please include this patch (or equivalent) in HEAD and in the 10.1 release. This will avoid a major regression in ZFS booting between 10.0 and 10.1 releases. Thanks. -Kurt -- You are receiving this mail because: You are the assignee for the bug.