Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 01 Oct 2014 14:14:25 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 194071] New: zfsloader broken on sparc64 since r268649
Message-ID:  <bug-194071-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
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
<sys/cdefs.h>.

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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-194071-8>