openzfs / zfs

OpenZFS on Linux and FreeBSD
https://openzfs.github.io/openzfs-docs
Other
10.51k stars 1.74k forks source link

`zpool list` hangs current shell and throws error in DMESG due to `/etc/modprob.d/zfs.conf`. #14610

Open aamkye opened 1 year ago

aamkye commented 1 year ago

System information

Type Version/Name
Distribution Name Ubuntu Server (minimal)
Distribution Version 22.10 (kinetic)
Kernel Version latest -> 6.2.5-060205-generic (from mainline) + 5.19.0-21-generic
Architecture amd64 under Proxmox
OpenZFS Version latest -> 2.1.9-1 (build from source from tag latest -> 2.1.9) + zfs-2.1.5-1ubuntu6

Describe the problem you're observing

> zpool list # produces error from the bottom and hangs ssh session
Killed
# should return empty list

Describe how to reproduce the problem

zpool list # on clean installation from source

Include any warning/errors/backtraces from the system logs

/etc/modprob.d/zfs.conf <<< this is the issue so far

options zfs zfs_autoimport_disable=0

build steps (no extra params added, general guide from openzfs.github.io)

./autogen.sh
./configure
make clean
make -s -j$(nproc)
make deb
apt install ./!(*devel*|*test*).deb

Installed debs

kmod-zfs-6.2.5-060205-generic_2.1.9-1_amd64.deb  libzpool5_2.1.9-1_amd64.deb      zfs-dracut_2.1.9-1_amd64.deb
libnvpair3_2.1.9-1_amd64.deb                     python3-pyzfs_2.1.9-1_amd64.deb  zfs-initramfs_2.1.9-1_amd64.deb
libuutil3_2.1.9-1_amd64.deb                      zfs_2.1.9-1_amd64.deb
libzfs5_2.1.9-1_amd64.deb                        zfs-dkms_2.1.9-1_amd64.deb

DMESG ERROR

[   45.175881] BUG: kernel NULL pointer dereference, address: 0000000000000980
[   45.175906] #PF: supervisor write access in kernel mode
[   45.175916] #PF: error_code(0x0002) - not-present page
[   45.175926] PGD 0 P4D 0
[   45.175934] Oops: 0002 [#1] PREEMPT SMP PTI
[   45.175944] CPU: 10 PID: 2333 Comm: zpool Tainted: P           OE      6.2.5-060205-generic #202303110831
[   45.175960] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
[   45.175977] RIP: 0010:mutex_lock+0x1d/0x50
[   45.175996] Code: 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1f 44 00 00 55 48 89 e5 53 48 89 fb e8 0e ce ff ff 31 c0 65 48 8b 14 25 00 0f 03 00 <f0> 48 0f b1 13 75 10 48 8b 5d f8 c9 31 c0 31 d2 31 ff c3 cc cc cc
[   45.176023] RSP: 0018:ffffbf9b44c0fad0 EFLAGS: 00010246
[   45.176034] RAX: 0000000000000000 RBX: 0000000000000980 RCX: 0000000000000000
[   45.176045] RDX: ffff9e88fcf1e000 RSI: 0000000000000000 RDI: 0000000000000980
[   45.176057] RBP: ffffbf9b44c0fad8 R08: 0000000000000000 R09: 0000000000000000
[   45.176068] R10: ffff9e88cd969480 R11: 0000000000000000 R12: ffffffffc1ef8908
[   45.176080] R13: 00000000000009a0 R14: 0000000000000980 R15: ffffbf9b44c0fd28
[   45.176092] FS:  00007f676d2587c0(0000) GS:ffff9ec30f680000(0000) knlGS:0000000000000000
[   45.176105] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   45.176115] CR2: 0000000000000980 CR3: 0000000119862000 CR4: 00000000000006e0
[   45.176145] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   45.176157] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[   45.176168] Call Trace:
[   45.176178]  <TASK>
[   45.176187]  rrw_enter_read_impl+0x21/0x190 [zfs]
[   45.176372]  rrw_enter+0x26/0x40 [zfs]
[   45.176493]  dsl_pool_config_enter+0x1d/0x30 [zfs]
[   45.176606]  spa_prop_get+0xce/0xe10 [zfs]
[   45.176802]  zfs_ioc_pool_get_props+0x87/0x190 [zfs]
[   45.176939]  zfsdev_ioctl_common+0x8fd/0xa50 [zfs]
[   45.177107]  ? __kmalloc_large_node+0xbb/0x160
[   45.177119]  ? check_heap_object+0x5d/0x1b0
[   45.177135]  ? __check_object_size.part.0+0x72/0x150
[   45.177146]  zfsdev_ioctl+0x57/0xf0 [zfs]
[   45.177261]  __x64_sys_ioctl+0xa0/0xe0
[   45.177271]  do_syscall_64+0x5b/0x90
[   45.177280]  ? handle_mm_fault+0x119/0x330
[   45.177290]  ? do_user_addr_fault+0x1e8/0x720
[   45.177301]  ? exit_to_user_mode_prepare+0x30/0xb0
[   45.177312]  ? irqentry_exit_to_user_mode+0x9/0x20
[   45.177322]  ? irqentry_exit+0x43/0x50
[   45.177330]  ? exc_page_fault+0x91/0x1b0
[   45.177338]  entry_SYSCALL_64_after_hwframe+0x72/0xdc
[   45.177351] RIP: 0033:0x7f676d512d8f
[   45.177359] Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 18 48 8b 44 24 18 64 48 2b 04 25 28 00 00
[   45.177385] RSP: 002b:00007ffe8399f0e0 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[   45.177398] RAX: ffffffffffffffda RBX: 00007ffe8399f140 RCX: 00007f676d512d8f
[   45.177797] RDX: 00007ffe8399f140 RSI: 0000000000005a27 RDI: 0000000000000003
[   45.178183] RBP: 00007ffe839a2720 R08: 00007f676d5f7440 R09: 00007f676d5f7440
[   45.178501] R10: 0000000000000000 R11: 0000000000000246 R12: 00005649d80d1540
[   45.178816] R13: 00005649d80e29c0 R14: 00007ffe839a27d0 R15: 0000000000001000
[   45.179129]  </TASK>
[   45.179445] Modules linked in: xt_conntrack nft_chain_nat xt_MASQUERADE nf_nat nf_conntrack_netlink nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xfrm_user xfrm_algo xt_addrtype nft_compat nf_tables nfnetlink br_netfilter bridge stp llc overlay cfg80211 binfmt_misc zfs(POE) zunicode(POE) zzstd(OE) zlua(OE) zavl(POE) icp(POE) input_leds joydev serio_raw vmgenid zcommon(POE) znvpair(POE) spl(OE) mac_hid dm_multipath scsi_dh_rdac scsi_dh_emc scsi_dh_alua ramoops msr reed_solomon pstore_blk pstore_zone efi_pstore qemu_fw_cfg ip_tables x_tables autofs4 btrfs blake2b_generic raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear bochs drm_vram_helper drm_ttm_helper ttm ses enclosure drm_kms_helper syscopyarea hid_generic sysfillrect sysimgblt usbhid nvme mpt3sas hid virtio_net drm nvme_core raid_class ahci psmouse net_failover failover scsi_transport_sas i2c_piix4 libahci nvme_common pata_acpi floppy
[   45.182164] CR2: 0000000000000980
[   45.182514] ---[ end trace 0000000000000000 ]---
[   45.183023] RIP: 0010:mutex_lock+0x1d/0x50
[   45.183438] Code: 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1f 44 00 00 55 48 89 e5 53 48 89 fb e8 0e ce ff ff 31 c0 65 48 8b 14 25 00 0f 03 00 <f0> 48 0f b1 13 75 10 48 8b 5d f8 c9 31 c0 31 d2 31 ff c3 cc cc cc
[   45.184124] RSP: 0018:ffffbf9b44c0fad0 EFLAGS: 00010246
[   45.184469] RAX: 0000000000000000 RBX: 0000000000000980 RCX: 0000000000000000
[   45.184947] RDX: ffff9e88fcf1e000 RSI: 0000000000000000 RDI: 0000000000000980
[   45.185389] RBP: ffffbf9b44c0fad8 R08: 0000000000000000 R09: 0000000000000000
[   45.185788] R10: ffff9e88cd969480 R11: 0000000000000000 R12: ffffffffc1ef8908
[   45.186205] R13: 00000000000009a0 R14: 0000000000000980 R15: ffffbf9b44c0fd28
[   45.186565] FS:  00007f676d2587c0(0000) GS:ffff9ec30f680000(0000) knlGS:0000000000000000
[   45.186917] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   45.187278] CR2: 0000000000000980 CR3: 0000000119862000 CR4: 00000000000006e0
[   45.187648] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   45.188003] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

(clean) dmesg | grep zfs

empty
stale[bot] commented 6 months ago

This issue has been automatically marked as "stale" because it has not had any activity for a while. It will be closed in 90 days if no further activity occurs. Thank you for your contributions.

vitlav commented 5 months ago

I have the same issue when /etc/modprobe.d/zfs.conf has options zfs zfs_autoimport_disable=0 Tested with kernel 5.10.213 and 6.1.85, zfs 2.1.9 and zfs 2.2.2.