openzfs / zfs

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

`zfs destroy` crashes on specific dataset #16798

Open 43615 opened 3 days ago

43615 commented 3 days ago

System information

Type Version/Name
Distribution Name TrueNAS SCALE
Distribution Version 24.10.0.2
Kernel Version 6.6.44-production+truenas
Architecture x86_64
OpenZFS Version zfs-2.2.99-1

Describe the problem you're observing

I'm trying to delete a dataset that was automatically created for the Plex app by TrueNAS and didn't get deleted when uninstalling it:

# zfs list -r sto/ix-apps/app_mounts/plex
NAME                                 USED  AVAIL  REFER  MOUNTPOINT
sto/ix-apps/app_mounts/plex         2.35M  57.4T   153K  /mnt/.ix-apps/app_mounts/plex
sto/ix-apps/app_mounts/plex/config  2.10M  57.4T  1.92M  /mnt/.ix-apps/app_mounts/plex/config

This happens when running the destroy command:

# zfs destroy -Rv sto/ix-apps/app_mounts/plex
will destroy sto/ix-apps/app_mounts/plex/config@daily-2024-11-17_00-00-00
will destroy sto/ix-apps/app_mounts/plex/config@daily-2024-11-18_00-00-00
will destroy sto/ix-apps/app_mounts/plex/config@daily-2024-11-08_00-00-00
will destroy sto/ix-apps/app_mounts/plex/config@daily-2024-11-07_00-00-00
will destroy sto/ix-apps/app_mounts/plex/config@daily-2024-11-20_00-00-00
will destroy sto/ix-apps/app_mounts/plex/config@daily-2024-11-10_00-00-00
will destroy sto/ix-apps/app_mounts/plex/config@daily-2024-11-19_00-00-00
will destroy sto/ix-apps/app_mounts/plex/config@daily-2024-11-16_00-00-00
will destroy sto/ix-apps/app_mounts/plex/config@daily-2024-11-06_00-00-00
will destroy sto/ix-apps/app_mounts/plex/config@daily-2024-11-09_00-00-00
will destroy sto/ix-apps/app_mounts/plex/config@daily-2024-11-11_00-00-00
will destroy sto/ix-apps/app_mounts/plex/config@daily-2024-11-21_00-00-00
will destroy sto/ix-apps/app_mounts/plex/config@daily-2024-11-22_00-00-00
will destroy sto/ix-apps/app_mounts/plex/config@daily-2024-11-12_00-00-00
will destroy sto/ix-apps/app_mounts/plex/config@daily-2024-11-15_00-00-00
will destroy sto/ix-apps/app_mounts/plex/config@daily-2024-11-05_00-00-00
Aborted (core dumped)

The utility exits with code 134, and nothing is actually deleted. I have used the same command on other datasets with no issues.

I also can't rm -rf the files at the mountpoint, it says "Device or resource busy".

Describe how to reproduce the problem

Don't know the specific circumstances, just trying to delete a dataset.

Include any warning/errors/backtraces from the system logs

Core dump (recompressed as ZIP): core.zfs.0.d9082b294cf042da963c2e5571dcc027.716503.1732278964000000.zip