Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZFS grinds to a halt on Asahi while generating machine id when using luks device #13431

Open
derzahla opened this issue May 6, 2022 · 14 comments
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@derzahla
Copy link

derzahla commented May 6, 2022

Arch

System information

Type Version/Name
Distribution Name Asahi Arch Linux
Distribution Version Latest
Kernel Version default 5.17 and latest 5.18 from git
Architecture aarch64
OpenZFS Version latest git from today, git from 04-18-2022 and 2.1.4
`zfs-2.1.99-1136_ge77d59ebb2
zfs-kmod-2.1.99-1`

5.17.0-rc7-asahi-next-20220310-5-2-ARCH

Describe the problem you're observing

ZFS grinds to a halt while attempting to install on it when using a zpool on LUKS device

Describe how to reproduce the probleminsta

cryptsetup luksFormat /dev/nvme0n1p5
cryptsetup open /dev/nvme0n1p5 zroot

zpool create -f  \
	-O acltype=posixacl \
	-O relatime=on \
	-O xattr=sa \
	-O dnodesize=legacy \
	-O normalization=formD \
	-O mountpoint=none \
	-O canmount=off \dnodesize=legacy
	-O devices=off \
	-R /mnt \
	-O compression=lz4 \
      	z \
	/dev/mapper/zroot 
zfs create -o mountpoint=none z/ROOT
zfs create -o mountpoint=none z/DATA
zfs create -o mountpoint=/  z/ROOT/default
zfs create -o mountpoint=/home z/DATA/home
zfs create -o mountpoint=/root z/DATA/home/root
zfs create -o mountpoint=/var -o canmount=off z/var
zfs create -o canmount=off z/var/lib
zfs create -o canmount=off z/var/cache
zfs create z/var/log
zfs create z/var/lib/containers
zfs create z/var/cache/pacman

pacstrap /mnt

Include any warning/errors/backtraces from the system logs

# pacstrap -c /mnt
==> Creating install root at /mnt
==> Installing packages to /mnt
:: Synchronizing package databases...
 asahi                                                     4.2 KiB  6.36 KiB/s 00:01 [################################################] 100%
 core                                                    245.6 KiB   551 KiB/s 00:00 [################################################] 100%
 extra                                                     2.7 MiB  1437 KiB/s 00:02 [################################################] 100%
 community                                                 5.9 MiB  3.61 MiB/s 00:02 [################################################] 100%
 alarm                                                    51.0 KiB   311 KiB/s 00:00 [################################################] 100%
 aur                                                       8.9 KiB  86.6 KiB/s 00:00 [################################################] 100%
 privacyshark                                             10.7 KiB  16.5 KiB/s 00:01 [################################################] 100%
resolving dependencies...
looking for conflicting packages...

Packages (112) acl-2.3.1-2  archlinuxarm-keyring-20140119-1  argon2-20190702-4  attr-2.5.1-2  audit-3.0.8-1  bash-5.1.016-1  brotli-1.0.9-8
               bzip2-1.0.8-4  ca-certificates-20210603-1  ca-certificates-mozilla-3.78-1  ca-certificates-utils-20210603-1  coreutils-9.1-1
               cryptsetup-2.4.3-2  curl-7.83.0-1  dbus-1.14.0-1  device-mapper-2.03.15-1  e2fsprogs-1.46.5-3  expat-2.4.8-1  file-5.41-1
               filesystem-2021.12.07-1  findutils-4.9.0-1  gawk-5.1.1-1  gcc-libs-11.2.0-3  gdbm-1.23-1  gettext-0.21-2  glib2-2.72.1-1
               glibc-2.35-2  gmp-6.2.1-1  gnupg-2.2.35-1  gnutls-3.7.4-2  gpgme-1.17.1-1  grep-3.7-1  gzip-1.12-1  hwdata-0.358-1
               iana-etc-20220427-1  icu-71.1-1  iproute2-5.17.0-3  iptables-1:1.8.7-1  iputils-20211215-1  json-c-0.16-1  kbd-2.4.0-2
               keyutils-1.6.3-1  kmod-29-3  krb5-1.19.3-1  less-1:590-1  libarchive-3.6.1-1  libassuan-2.5.5-1  libbpf-0.7.0-1
               libcap-2.64-1  libcap-ng-0.8.3-1  libelf-0.187-1  libffi-3.4.2-5  libgcrypt-1.10.1-1  libgpg-error-1.45-1  libidn2-2.3.2-1
               libksba-1.6.0-1  libldap-2.6.1-1  libmnl-1.0.5-1  libnetfilter_conntrack-1.0.9-1  libnfnetlink-1.0.2-1  libnftnl-1.2.1-1
               libnghttp2-1.47.0-1  libnl-3.6.0-3  libp11-kit-0.24.1-1  libpcap-1.10.1-2  libpsl-0.21.1-1  libsasl-2.1.28-1
               libseccomp-2.5.4-1  libsecret-0.20.5-2  libssh2-1.10.0-1  libsysprof-capture-3.44.0-1  libtasn1-4.18.0-1  libtirpc-1.3.2-1
               libunistring-0.9.10-3  libxcrypt-4.4.28-2  libxml2-2.9.13-2  licenses-20220125-1  linux-api-headers-5.16.8-1  lz4-1:1.9.3-2
               mpfr-4.1.0.p13-2  ncurses-6.3-3  nettle-3.7.3-1.1  npth-1.6-3  openssl-1.1.1.o-1  p11-kit-0.24.1-1  pacman-6.0.1-4
               pacman-mirrorlist-20220329-1  pam-1.5.2-1  pambase-20211210-1  pciutils-3.8.0-1  pcre-8.45-1  pcre2-10.40-1
               pinentry-1.2.0-1  popt-1.18-3  procps-ng-3.3.17-1  psmisc-23.4-1  readline-8.1.002-1  sed-4.8-1  shadow-4.11.1-1
               sqlite-3.38.4-1  systemd-250.5-1  systemd-libs-250.5-1  systemd-sysvcompat-250.5-1  tar-1.34-1  tpm2-tss-3.2.0-1
               tzdata-2022a-1  util-linux-2.38-1  util-linux-libs-2.38-1  xz-5.2.5-3  zlib-1:1.2.12-2  zstd-1.5.2-3  base-2-2

Total Download Size:    57.46 MiB
Total Installed Size:  466.06 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 gettext-0.21-2-aarch64                                 1696.6 KiB  2.43 MiB/s 00:01 [################################################] 100%
 bash-5.1.016-1-aarch64                                 1566.1 KiB  2.06 MiB/s 00:01 [################################################] 100%
 gcc-libs-11.2.0-3-aarch64                                26.5 MiB  12.9 MiB/s 00:02 [################################################] 100%
 glibc-2.35-2-aarch64                                      8.9 MiB  4.31 MiB/s 00:02 [################################################] 100%
 kbd-2.4.0-2-aarch64                                    1174.9 KiB   829 KiB/s 00:01 [################################################] 100%
 shadow-4.11.1-1-aarch64                                1156.5 KiB  1128 KiB/s 00:01 [################################################] 100%
 linux-api-headers-5.16.8-1-any                         1106.9 KiB   804 KiB/s 00:01 [################################################] 100%
 gawk-5.1.1-1-aarch64                                   1102.4 KiB  1573 KiB/s 00:01 [################################################] 100%
 e2fsprogs-1.46.5-3-aarch64                             1100.1 KiB  1196 KiB/s 00:01 [################################################] 100%
 pcre-8.45-1-aarch64                                     875.7 KiB  1206 KiB/s 00:01 [################################################] 100%
 pacman-6.0.1-4-aarch64                                  818.6 KiB   915 KiB/s 00:01 [################################################] 100%
 tar-1.34-1-aarch64                                      744.9 KiB  1078 KiB/s 00:01 [################################################] 100%
 tpm2-tss-3.2.0-1-aarch64                                722.4 KiB   773 KiB/s 00:01 [################################################] 100%
 pam-1.5.2-1-aarch64                                     553.8 KiB   823 KiB/s 00:01 [################################################] 100%
 cryptsetup-2.4.3-2-aarch64                              539.9 KiB   571 KiB/s 00:01 [################################################] 100%
 libunistring-0.9.10-3-aarch64                           500.3 KiB   765 KiB/s 00:01 [################################################] 100%
 procps-ng-3.3.17-1-aarch64                              485.0 KiB   532 KiB/s 00:01 [################################################] 100%
 findutils-4.9.0-1-aarch64                               430.5 KiB   618 KiB/s 00:01 [################################################] 100%
 nettle-3.7.3-1.1-aarch64                                422.0 KiB   475 KiB/s 00:01 [################################################] 100%
 gpgme-1.17.1-1-aarch64                                  415.2 KiB   607 KiB/s 00:01 [################################################] 100%
 iptables-1:1.8.7-1-aarch64                              408.4 KiB   469 KiB/s 00:01 [################################################] 100%
 zstd-1.5.2-3-aarch64                                    392.8 KiB   534 KiB/s 00:01 [################################################] 100%
 gmp-6.2.1-1-aarch64                                     367.4 KiB   434 KiB/s 00:01 [################################################] 100%
 tzdata-2022a-1-aarch64                                  367.3 KiB   501 KiB/s 00:01 [################################################] 100%
 libp11-kit-0.24.1-1-aarch64                             354.0 KiB   430 KiB/s 00:01 [################################################] 100%
 file-5.41-1-aarch64                                     336.1 KiB   477 KiB/s 00:01 [################################################] 100%
 readline-8.1.002-1-aarch64                              302.1 KiB   353 KiB/s 00:01 [################################################] 100%
 mpfr-4.1.0.p13-2-aarch64                                298.5 KiB   432 KiB/s 00:01 [################################################] 100%
 dbus-1.14.0-1-aarch64                                   293.3 KiB   535 KiB/s 00:01 [################################################] 100%
 device-mapper-2.03.15-1-aarch64                         265.2 KiB   334 KiB/s 00:01 [################################################] 100%
 libldap-2.6.1-1-aarch64                                 263.2 KiB   307 KiB/s 00:01 [################################################] 100%
 libpcap-1.10.1-2-aarch64                                259.2 KiB   275 KiB/s 00:01 [################################################] 100%
 gdbm-1.23-1-aarch64                                     252.8 KiB   308 KiB/s 00:01 [################################################] 100%
 grep-3.7-1-aarch64                                      225.8 KiB   239 KiB/s 00:01 [################################################] 100%
 sed-4.8-1-aarch64                                       216.6 KiB   293 KiB/s 00:01 [################################################] 100%
 libssh2-1.10.0-1-aarch64                                204.6 KiB   213 KiB/s 00:01 [################################################] 100%
 psmisc-23.4-1-aarch64                                   177.1 KiB   222 KiB/s 00:01 [################################################] 100%
 libtirpc-1.3.2-1-aarch64                                169.4 KiB   167 KiB/s 00:01 [################################################] 100%
 p11-kit-0.24.1-1-aarch64                                142.1 KiB   185 KiB/s 00:01 [################################################] 100%
 acl-2.3.1-2-aarch64                                     132.1 KiB   121 KiB/s 00:01 [################################################] 100%
 libksba-1.6.0-1-aarch64                                 126.1 KiB   187 KiB/s 00:01 [################################################] 100%
 libidn2-2.3.2-1-aarch64                                 125.0 KiB   116 KiB/s 00:01 [################################################] 100%
 iputils-20211215-1-aarch64                              124.7 KiB   191 KiB/s 00:01 [################################################] 100%
 libtasn1-4.18.0-1-aarch64                               122.6 KiB   155 KiB/s 00:01 [################################################] 100%
 pinentry-1.2.0-1-aarch64                                111.5 KiB   135 KiB/s 00:01 [################################################] 100%
 lz4-1:1.9.3-2-aarch64                                   110.1 KiB   133 KiB/s 00:01 [################################################] 100%
 less-1:590-1-aarch64                                    109.8 KiB   136 KiB/s 00:01 [################################################] 100%
 libassuan-2.5.5-1-aarch64                               101.1 KiB   124 KiB/s 00:01 [################################################] 100%
 keyutils-1.6.3-1-aarch64                                100.2 KiB   116 KiB/s 00:01 [################################################] 100%
 libnghttp2-1.47.0-1-aarch64                              88.0 KiB   111 KiB/s 00:01 [################################################] 100%
 libxcrypt-4.4.28-2-aarch64                               85.8 KiB   108 KiB/s 00:01 [################################################] 100%
 libpsl-0.21.1-1-aarch64                                  74.7 KiB   104 KiB/s 00:01 [################################################] 100%
 licenses-20220125-1-any                                  66.7 KiB   122 KiB/s 00:01 [################################################] 100%
 attr-2.5.1-2-aarch64                                     64.6 KiB  82.0 KiB/s 00:01 [################################################] 100%
 popt-1.18-3-aarch64                                      63.9 KiB  80.7 KiB/s 00:01 [################################################] 100%
 libnftnl-1.2.1-1-aarch64                                 60.7 KiB  77.0 KiB/s 00:01 [################################################] 100%
 bzip2-1.0.8-4-aarch64                                    54.7 KiB  75.1 KiB/s 00:01 [################################################] 100%
 argon2-20190702-4-aarch64                                30.2 KiB  28.6 KiB/s 00:01 [################################################] 100%
 filesystem-2021.12.07-1-aarch64                          13.7 KiB  23.9 KiB/s 00:01 [################################################] 100%
 npth-1.6-3-aarch64                                       22.7 KiB  19.8 KiB/s 00:01 [################################################] 100%
 archlinuxarm-keyring-20140119-1-any                      12.2 KiB  20.9 KiB/s 00:01 [################################################] 100%
 ca-certificates-utils-20210603-1-any                      8.1 KiB  8.16 KiB/s 00:01 [################################################] 100%
 pambase-20211210-1-any                                    3.0 KiB  5.30 KiB/s 00:01 [################################################] 100%
 base-2-2-any                                              2.2 KiB  2.13 KiB/s 00:01 [################################################] 100%
 ca-certificates-20210603-1-any                         2020.0   B  3.50 KiB/s 00:01 [################################################] 100%
 Total (65/65)                                            57.5 MiB  2.82 MiB/s 00:20 [################################################] 100%
(112/112) checking keys in keyring                                                   [################################################] 100%
(112/112) checking package integrity                                                 [################################################] 100%
(112/112) loading package files                                                      [################################################] 100%
(112/112) checking for file conflicts                                                [################################################] 100%
(112/112) checking available disk space                                              [################################################] 100%
:: Processing package changes...
(  1/112) installing iana-etc                                                        [################################################] 100%
(  2/112) installing filesystem                                                      [################################################] 100%
warning: directory permissions differ on /mnt/root/
filesystem: 755  package: 750
(  3/112) installing linux-api-headers                                               [################################################] 100%
(  4/112) installing tzdata                                                          [################################################] 100%
(  5/112) installing glibc                                                           [################################################] 100%
Optional dependencies for glibc
    gd: for memusagestat
(  6/112) installing gcc-libs                                                        [################################################] 100%
(  7/112) installing ncurses                                                         [################################################] 100%
Optional dependencies for ncurses
    bash: for ncursesw6-config [pending]
(  8/112) installing readline                                                        [################################################] 100%
(  9/112) installing bash                                                            [################################################] 100%
Optional dependencies for bash
    bash-completion: for tab completion
( 10/112) installing attr                                                            [################################################] 100%
( 11/112) installing acl                                                             [################################################] 100%
( 12/112) installing gmp                                                             [################################################] 100%
( 13/112) installing util-linux-libs                                                 [################################################] 100%
( 14/112) installing e2fsprogs                                                       [################################################] 100%
( 15/112) installing gdbm                                                            [################################################] 100%
( 16/112) installing openssl                                                         [################################################] 100%
Optional dependencies for openssl
    ca-certificates [pending]
    perl
( 17/112) installing libsasl                                                         [################################################] 100%
( 18/112) installing libldap                                                         [################################################] 100%
( 19/112) installing keyutils                                                        [################################################] 100%
( 20/112) installing krb5                                                            [################################################] 100%
( 21/112) installing libtirpc                                                        [################################################] 100%
( 22/112) installing pambase                                                         [################################################] 100%
( 23/112) installing libcap-ng                                                       [################################################] 100%
( 24/112) installing audit                                                           [################################################] 100%
( 25/112) installing libxcrypt                                                       [################################################] 100%
( 26/112) installing pam                                                             [################################################] 100%
( 27/112) installing libcap                                                          [################################################] 100%
( 28/112) installing coreutils                                                       [################################################] 100%
( 29/112) installing zlib                                                            [################################################] 100%
( 30/112) installing xz                                                              [################################################] 100%
( 31/112) installing bzip2                                                           [################################################] 100%
( 32/112) installing file                                                            [################################################] 100%
( 33/112) installing findutils                                                       [################################################] 100%
( 34/112) installing mpfr                                                            [################################################] 100%
( 35/112) installing gawk                                                            [################################################] 100%
( 36/112) installing pcre                                                            [################################################] 100%
( 37/112) installing grep                                                            [################################################] 100%
( 38/112) installing libgpg-error                                                    [################################################] 100%
( 39/112) installing libgcrypt                                                       [################################################] 100%
( 40/112) installing libtasn1                                                        [################################################] 100%
( 41/112) installing libffi                                                          [################################################] 100%
( 42/112) installing libp11-kit                                                      [################################################] 100%
( 43/112) installing lz4                                                             [################################################] 100%
( 44/112) installing zstd                                                            [################################################] 100%
( 45/112) installing systemd-libs                                                    [################################################] 100%
( 46/112) installing procps-ng                                                       [################################################] 100%
( 47/112) installing sed                                                             [################################################] 100%
( 48/112) installing tar                                                             [################################################] 100%
( 49/112) installing libunistring                                                    [################################################] 100%
( 50/112) installing icu                                                             [################################################] 100%
( 51/112) installing libxml2                                                         [################################################] 100%
Optional dependencies for libxml2
    python: Python bindings
( 52/112) installing gettext                                                         [################################################] 100%
Optional dependencies for gettext
    git: for autopoint infrastructure updates
( 53/112) installing hwdata                                                          [################################################] 100%
( 54/112) installing kmod                                                            [################################################] 100%
( 55/112) installing pciutils                                                        [################################################] 100%
( 56/112) installing psmisc                                                          [################################################] 100%
( 57/112) installing shadow                                                          [################################################] 100%
( 58/112) installing util-linux                                                      [################################################] 100%
Optional dependencies for util-linux
    python: python bindings to libmount
    words: default dictionary for look
( 59/112) installing pcre2                                                           [################################################] 100%
( 60/112) installing less                                                            [################################################] 100%
( 61/112) installing gzip                                                            [################################################] 100%
( 62/112) installing licenses                                                        [################################################] 100%
( 63/112) installing expat                                                           [################################################] 100%
( 64/112) installing libarchive                                                      [################################################] 100%
( 65/112) installing p11-kit                                                         [################################################] 100%
( 66/112) installing ca-certificates-utils                                           [################################################] 100%
( 67/112) installing ca-certificates-mozilla                                         [################################################] 100%
( 68/112) installing ca-certificates                                                 [################################################] 100%
( 69/112) installing brotli                                                          [################################################] 100%
( 70/112) installing libidn2                                                         [################################################] 100%
( 71/112) installing libnghttp2                                                      [################################################] 100%
( 72/112) installing libpsl                                                          [################################################] 100%
( 73/112) installing libssh2                                                         [################################################] 100%
( 74/112) installing curl                                                            [################################################] 100%
( 75/112) installing npth                                                            [################################################] 100%
( 76/112) installing libksba                                                         [################################################] 100%
( 77/112) installing libassuan                                                       [################################################] 100%
( 78/112) installing libsysprof-capture                                              [################################################] 100%
( 79/112) installing glib2                                                           [################################################] 100%
Optional dependencies for glib2
    python: gdbus-codegen, glib-genmarshal, glib-mkenums, gtester-report
    libelf: gresource inspection tool [pending]
    gvfs: most gio functionality
( 80/112) installing json-c                                                          [################################################] 100%
( 81/112) installing tpm2-tss                                                        [################################################] 100%
( 82/112) installing libsecret                                                       [################################################] 100%
Optional dependencies for libsecret
    org.freedesktop.secrets: secret storage backend
( 83/112) installing pinentry                                                        [################################################] 100%
Optional dependencies for pinentry
    gtk2: gtk2 backend
    qt5-base: qt backend
    gcr: gnome3 backend
( 84/112) installing nettle                                                          [################################################] 100%
( 85/112) installing gnutls                                                          [################################################] 100%
Optional dependencies for gnutls
    guile: for use with Guile bindings
( 86/112) installing sqlite                                                          [################################################] 100%
( 87/112) installing gnupg                                                           [################################################] 100%
Optional dependencies for gnupg
    libldap: gpg2keys_ldap [installed]
    libusb-compat: scdaemon
    pcsclite: scdaemon
( 88/112) installing gpgme                                                           [################################################] 100%
( 89/112) installing pacman-mirrorlist                                               [################################################] 100%
( 90/112) installing archlinuxarm-keyring                                            [################################################] 100%
( 91/112) installing pacman                                                          [################################################] 100%
Optional dependencies for pacman
    perl-locale-gettext: translation support in makepkg-template
( 92/112) installing device-mapper                                                   [################################################] 100%
( 93/112) installing popt                                                            [################################################] 100%
( 94/112) installing argon2                                                          [################################################] 100%
( 95/112) installing cryptsetup                                                      [################################################] 100%
( 96/112) installing dbus                                                            [################################################] 100%
( 97/112) installing libmnl                                                          [################################################] 100%
( 98/112) installing libnftnl                                                        [################################################] 100%
( 99/112) installing libnl                                                           [################################################] 100%
(100/112) installing libpcap                                                         [################################################] 100%
(101/112) installing libnfnetlink                                                    [################################################] 100%
(102/112) installing libnetfilter_conntrack                                          [################################################] 100%
(103/112) installing iptables                                                        [################################################] 100%
(104/112) installing kbd                                                             [################################################] 100%
(105/112) installing libelf                                                          [################################################] 100%
(106/112) installing libseccomp                                                      [################################################] 100%
(107/112) installing systemd                                                         [################################################] 100%
Initializing machine ID from random generator.




g
dzf
zb
df




^ pacstrap hangs forever on initializing machine id

journald is murdered by zio logs at thousands of lines per second. Small sample below

May 06 15:12:43 tyr kernel: zio pool=z vdev=/dev/mapper/zroot error=5 type=2 offset=3293896704 size=24576 flags=188881
May 06 15:12:43 tyr kernel: zio pool=z vdev=/dev/mapper/zroot error=5 type=2 offset=3294015488 size=28672 flags=188881
May 06 15:12:43 tyr kernel: zio pool=z vdev=/dev/mapper/zroot error=5 type=2 offset=3293921280 size=24576 flags=188881
May 06 15:12:43 tyr kernel: zio pool=z vdev=/dev/mapper/zroot error=5 type=2 offset=3294081024 size=28672 flags=188881
May 06 15:12:43 tyr kernel: zio pool=z vdev=/dev/mapper/zroot error=5 type=2 offset=3293945856 size=28672 flags=188881
May 06 15:12:43 tyr kernel: zio pool=z vdev=/dev/mapper/zroot error=5 type=2 offset=3294294016 size=24576 flags=188881
May 06 15:12:43 tyr kernel: zio pool=z vdev=/dev/mapper/zroot error=5 type=2 offset=3293716480 size=24576 flags=184880
May 06 15:12:43 tyr kernel: zio pool=z vdev=/dev/mapper/zroot error=5 type=2 offset=3293741056 size=24576 flags=184880
May 06 15:12:43 tyr kernel: zio pool=z vdev=/dev/mapper/zroot error=5 type=2 offset=3293765632 size=53248 flags=40080c80
May 06 15:12:43 tyr kernel: zio pool=z vdev=/dev/mapper/zroot error=5 type=2 offset=3291570176 size=32768 flags=40080c80
May 06 15:12:43 tyr kernel: zio pool=z vdev=/dev/mapper/zroot error=5 type=2 offset=3292196864 size=32768 flags=184880
May 06 15:12:43 tyr kernel: zio pool=z vdev=/dev/mapper/zroot error=5 type=2 offset=3292065792 size=131072 flags=40080c80
May 06 15:12:43 tyr kernel: zio pool=z vdev=/dev/mapper/zroot error=5 type=2 offset=3293716480 size=24576 flags=188881
May 06 15:12:43 tyr kernel: zio pool=z vdev=/dev/mapper/zroot error=5 type=2 offset=3293741056 size=24576 flags=188881
May 06 15:12:43 tyr kernel: zio pool=z vdev=/dev/mapper/zroot error=5 type=2 offset=3293794304 size=24576 flags=188881
May 06 15:12:43 tyr kernel: zio pool=z vdev=/dev/mapper/zroot error=5 type=2 offset=3293949952 size=122880 flags=40080c80
May 06 15:12:43 tyr kernel: zio pool=z vdev=/dev/mapper/zroot error=5 type=2 offset=3293818880 size=131072 flags=40080c80
May 06 15:12:43 tyr kernel: zio pool=z vdev=/dev/mapper/zroot error=5 type=2 offset=3291570176 size=16384 flags=188881
May 06 15:12:43 tyr kernel: zio pool=z vdev=/dev/mapper/zroot error=5 type=2 offset=3291586560 size=16384 flags=188881
May 06 15:12:43 tyr kernel: zio pool=z vdev=/dev/mapper/zroot error=5 type=2 offset=3292164096 size=32768 flags=188881
May 06 15:12:43 tyr kernel: zio pool=z vdev=/dev/mapper/zroot error=5 type=2 offset=3292196864 size=32768 flags=188881
May 06 15:12:43 tyr kernel: zio pool=z vdev=/dev/mapper/zroot error=5 type=2 offset=3293880320 size=24576 flags=188881
May 06 15:12:43 tyr kernel: zio pool=z vdev=/dev/mapper/zroot error=5 type=2 offset=3293904896 size=24576 flags=188881
May 06 15:12:43 tyr kernel: zio pool=z vdev=/dev/mapper/zroot error=5 type=2 offset=3293949952 size=28672 flags=188881
May 06 15:12:43 tyr kernel: zio pool=z vdev=/dev/mapper/zroot error=5 type=2 offset=3293978624 size=28672 flags=188881
May 06 15:12:43 tyr kernel: zio pool=z vdev=/dev/mapper/zroot error=5 type=2 offset=3294007296 size=28672 flags=188881
May 06 15:12:43 tyr kernel: zio pool=z vdev=/dev/mapper/zroot error=5 type=2 offset=3294183424 size=110592 flags=40080c80
May 06 15:12:43 tyr kernel: zio pool=z vdev=/dev/mapper/zroot error=5 type=2 offset=3294294016 size=86016 flags=40080c80
May 06 15:12:43 tyr kernel: zio pool=z vdev=/dev/mapper/zroot error=5 type=2 offset=3294322688 size=24576 flags=188881
May 06 15:12:43 tyr kernel: zio pool=z vdev=/dev/mapper/zroot error=5 type=2 offset=3294240768 size=24576 flags=188881

This happening:

root        5137    5136  0 14:46 pts/0    00:00:11 pacman -r /mnt -Sy base --noconfirm
root        5178    5137  0 14:46 pts/0    00:00:00 [gpgconf] <defunct>
root        5180    5137  0 14:46 pts/0    00:00:00 [gpgconf] <defunct>
root        5182    5137  0 14:46 pts/0    00:00:00 [gpg] <defunct>
root        5184    5137  0 14:46 pts/0    00:00:00 [gpgsm] <defunct>
root        5186    5137  0 14:46 pts/0    00:00:00 [gpgconf] <defunct>
root        5188    5137  0 14:46 pts/0    00:00:00 [gpg] <defunct>
root        5190    5137  0 14:46 pts/0    00:00:00 [gpg] <defunct>
root        5192    5137  0 14:46 pts/0    00:00:00 [gpg] <defunct>
root        5194    5137  0 14:46 pts/0    00:00:00 [gpg] <defunct>
root        5196    5137  0 14:46 pts/0    00:00:00 [gpg] <defunct>
root        5198    5137  0 14:46 pts/0    00:00:00 [gpg] <defunct>
root        5200    5137  0 14:46 pts/0    00:00:00 [gpg] <defunct>
root        5235       2  2 14:46 ?        00:01:02 [kworker/u16:9-kcryptd/252:1]
root        5243    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5245    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5247    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5249    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5251    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5253    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5255    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5257    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5259    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5261    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5263    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5265    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5267    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5269    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5271    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5273    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5275    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5277    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5279    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5281    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5283    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5285    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5287    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5289    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5291    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5293    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5295    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5297    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5299    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5301    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5303    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5305    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5307    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5309    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5311    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5313    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5315    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5317    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5319    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5321    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5323    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5325    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5327    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5329    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5331    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5333    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5335    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5337    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5339    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5341    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5343    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5345    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5347    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5349    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5351    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5353    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5355    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5357    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5359    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5361    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5363    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5365    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5367    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5369    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5371    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5373    5137  0 1I4:47 pts/0    00:00:00 [gpg] <defunct>
root        5375    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5377    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5379    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5381    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>
root        5383    5137  0 14:47 pts/0    00:00:00 [gpg] <defunct>

I get similar results if I attempt to rsync a large amount of files rather than using pacstrap.

@derzahla derzahla added the Type: Defect Incorrect behavior (e.g. crash, hang) label May 6, 2022
@rincebrain
Copy link
Contributor

rincebrain commented May 7, 2022

Seems to be reporting a lot of ...I think 5 is checksum?...errors from the LUKS device.

Does it do that if you hand it a non-LUKS device?

I am not running Asahi on my M1, but the AArch64 VM on it has been humming along perfectly fine for a bit. I'll give it a go with LUKS, but I would suspect I may have trouble reproducing this inside a VM on there, no matter how HW assisted.

e: Nah, 5 is just generic EIO.

@derzahla
Copy link
Author

derzahla commented May 9, 2022

No. zfs alone works just fine. zfs + native encryption works. Id think it was a dm-crypt issue, but I can put btrfs and ext4 on the luks device without any problem. Then the error messages lead me to believe more its a ZFS bug.

@rincebrain
Copy link
Contributor

Here's a fun one - if you have a LUKS device on the machine and a zpool not on that LUKS device, do ZFS and/or the FS on the LUKS device throw errors if you do a bunch of IO to both at once?

My completely wild guess would be if the SIMD enable/disable dance is not sufficiently saving/restoring state and having two kernel-land consumers is stepping on each other. Let me see if I can see anything obviously awry...worst case, I just boot Asahi on my M1 and play with it.

@zfsbot
Copy link

zfsbot commented May 10, 2022

something tells me it's related to the M1 primitives for crypto. can you run with software decryption? i'm assuming any hardware support exists at all.

@rincebrain
Copy link
Contributor

rincebrain commented May 10, 2022

Just the generic AArch64 CPU that using the acceleration interface in macOS on an M1 provides has a bunch of the normal ARM crypto extensions, so yes, I'd say that's a safe bet.

Features        : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 asimddp sha512 asimdfhm dit uscat ilrcpc flagm sb dcpodp flagm2 frint

@jittygitty
Copy link

jittygitty commented May 11, 2022

@derzahla I think Luks uses acceleration as well as zfs, what Kernel version does Asashi have? Do you mind trying to compile zfs by telling it its GPL (so it doesn't use simd/fpu etc workarounds) as per #11357 ?

@derzahla
Copy link
Author

derzahla commented May 15, 2022

@jittygitty I am running the latest git kernel 5.18. S just use the grep/sed loop thats posted before running configure? Ill give it a shot. What other effects does setting the license to GPL have? Any downsides?

@derzahla
Copy link
Author

derzahla commented May 15, 2022

@jittygitty Assuming I did this correctly, swapping CDDL with GPL did not make a differece here. Is there a way to verify that acceleration is disabled? To be clear, are you are suggesting that there may be some overlap with ZFS trying to use acceleration "on top" of what LUKS has already done? Note: I am not trying to use ZFS native encryption on top of LUKS. Where else would ZFS be using acceleration then, checksumming? Sorry if I am misunderstanding

@jittygitty
Copy link

@derzahla In your case since you tried building as GPL and it made no difference it likely isn't related, "or" the code doesn't check for Kernel acceleration paths for ARM, or Linux kernel doesn't make good use of available ARM hardware acceleration?

(Building module as GPL should not disable acceleration, it should technically give you the best path to acceleration without having to do the "workarounds" forced on us explained in arstechnica article below. And yes far as I know LUKS definitely could be SLOW if its not using acceleration for its encryption. ZFS even if not using native encryption on top, might still use some acceleration for compression or checksums or other, I'm not expert as to where/how. Anyway I just noticed #13431 (comment) so seems he was thinking similar initially at least.)

But maybe read the article below to get an idea about how "workarounds" implemented to avoid certain "GPL-only" exports (export_symbol_gpl), can cause various problems: "Removing access to that symbol therefore requires module developers to reinvent their own state-preservation code individually. This increases the likelihood of catastrophic error within the kernel itself, since improperly restored state could cause a later kernel operation to crash."

https://arstechnica.com/gadgets/2020/01/linus-torvalds-zfs-statements-arent-right-heres-the-straight-dope/
(That's related to why I had opened issue: #11357 and no there's "no downsides".)

In your case you may want to take a look at:
#12171

In fact read @rincebrain 's own comments in that thread since they may be helpful to you.

@jittygitty
Copy link

@rincebrain Do you know if building as gpl as Brian mentioned in 11357, if it removes "all" workarounds and any outside of kernel system state preservation/restoration etc? Or is there still some zfs state management?

@rincebrain
Copy link
Contributor

I don't actually think that mattered on AArch64 - I think it was only on x86 that they moved the FPU save/restore calls outside of the visible symbol set.

@zfsbot
Copy link

zfsbot commented May 17, 2022

aarch64's issue with GPL symbols was in preemptable kernels (#8545)

and @jittygitty no offense intended but this extra noise you're putting everywhere about things you don't fully understand is quite irritating, you ask about Btrfs and other simple issues without even doing a basic level of research

@jittygitty
Copy link

jittygitty commented May 17, 2022

@zfsbot Initially I had a similar thought to @rincebrain whose comment I linked, after response from @derzahla I concluded and told him that likely it wasn't some strange "state" issue. So I don't think our initial thoughts would have been completely impossible, and of course I admit I'm no 'expert' on FPU and RCU etc but I did think the kernel may have been built as preempt.

#9745

But apologies if I somehow somewhere missed that this was definitely not preempt. (I thought it was quite common these days even with desktop installations, for low latency audio etc.) (Sorry I can't recall what too simple btrfs question I asked, where?)

@codyps
Copy link

codyps commented Feb 27, 2023

@derzahla, for checking if this is similar to #14533, checking the sector size of your luks mapper device would be helpful. blockdev --report /dev/mapper/zroot will include it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

No branches or pull requests

5 participants