Bug #2400
closedZFS: Current "zfs" command (as of mid-Feb 2012) does not destroy snapshots
100%
Description
Since recently, my troublesome home NAS is running a privately built illumos-gate as fetched from source in mid-February (2012-02-12 or so).
I tried to incorporate some fixes (i.e. succesfully eluding the kernel panic due to duplicate DDT entries and NULL pointer dereferences as discussed in the zfs-discuss list).
I noted today that the "/sbin/zfs" command refuses to destroy snapshots, instantly exiting with error-code "1".
It does destroy filesystems (recursively with the said snapshots).
I did not look deeper into the problem, since I did not change anything in the "zfs" command sources, and rebuilding the gate on my build VM takes a few days.
I did check, however, that the /sbin/zfs binary from original oi_151a works as expected with the same kernel/libs that I've built. Tested on two different pools.
Just my 2c about a possible regresion in the bleeding-edge code.
The trace looks like this:
[root@bofh-sol:~]# truss zfs destroy rpool/test@1 execve("/sbin/zfs", 0x080479D8, 0x080479E8) argc = 3 sysinfo(SI_MACHINE, "i86pc", 257) = 6 mmap(0x00000000, 32, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEFB0000 mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEFA0000 mmap(0x00000000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEF90000 mmap(0x00000000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEF80000 memcntl(0xFEFB6000, 32244, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0 memcntl(0x08050000, 17912, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0 resolvepath("/usr/lib/ld.so.1", "/lib/ld.so.1", 1023) = 12 resolvepath("/sbin/zfs", "/sbin/zfs", 1023) = 9 sysconfig(_CONFIG_PAGESIZE) = 4096 stat64("/sbin/zfs", 0x08047610) = 0 open("/var/ld/ld.config", O_RDONLY) = 3 fstat64(3, 0x080471A0) = 0 mmap(0x00000000, 128, PROT_READ, MAP_SHARED, 3, 0) = 0xFEF70000 close(3) = 0 mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEF60000 stat64("/lib/libumem.so.1", 0x08046DC0) = 0 resolvepath("/lib/libumem.so.1", "/lib/libumem.so.1", 1023) = 17 open("/lib/libumem.so.1", O_RDONLY) = 3 mmapobj(3, MMOBJ_INTERPRET, 0xFEF60308, 0x08046E2C, 0x00000000) = 0 close(3) = 0 memcntl(0xFEAB0000, 29304, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0 stat64("/lib/libc.so.1", 0x08046DC0) = 0 resolvepath("/lib/libc.so.1", "/lib/libc.so.1", 1023) = 14 open("/lib/libc.so.1", O_RDONLY) = 3 mmapobj(3, MMOBJ_INTERPRET, 0xFEF60910, 0x08046E2C, 0x00000000) = 0 close(3) = 0 memcntl(0xFEE20000, 179324, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0 mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEE10000 mmap(0x00010000, 24576, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFEE00000 getcontext(0x08047470) getrlimit(RLIMIT_STACK, 0x08047468) = 0 getpid() = 101615 [101614] lwp_private(0, 1, 0xFEE02A40) = 0x000001C3 setustack(0xFEE02AA0) sysconfig(_CONFIG_PAGESIZE) = 4096 sysi86(SI86FPSTART, 0xFEF59C58, 0x0000133F, 0x00001F80) = 0x00000001 sysconfig(_CONFIG_NPROC_ONLN) = 2 issetugid() = 0 issetugid() = 0 brk(0x0808A000) = 0 brk(0x0809A000) = 0 brk(0x080AA000) = 0 brk(0x080BA000) = 0 brk(0x080CA000) = 0 stat64("/lib/libzfs.so.1", 0x08046F00) = 0 resolvepath("/lib/libzfs.so.1", "/lib/libzfs.so.1", 1023) = 16 open("/lib/libzfs.so.1", O_RDONLY) = 3 mmapobj(3, MMOBJ_INTERPRET, 0xFEE10748, 0x08046F6C, 0x00000000) = 0 close(3) = 0 memcntl(0xFED50000, 35416, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0 stat64("/usr/lib/fm//libtopo.so", 0x080469B0) = 0 resolvepath("/usr/lib/fm//libtopo.so", "/usr/lib/fm/libtopo.so.1", 1023) = 24 open("/usr/lib/fm//libtopo.so", O_RDONLY) = 3 mmapobj(3, MMOBJ_INTERPRET, 0xFEE10F00, 0x08046A1C, 0x00000000) = 0 close(3) = 0 mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFED00000 memcntl(0xFED10000, 40688, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0 stat64("/lib/libxml2.so.2", 0x080465B0) = 0 resolvepath("/lib/libxml2.so.2", "/lib/libxml2.so.2", 1023) = 17 open("/lib/libxml2.so.2", O_RDONLY) = 3 mmapobj(3, MMOBJ_INTERPRET, 0xFED008A0, 0x0804661C, 0x00000000) = 0 close(3) = 0 memcntl(0xFE830000, 182432, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0 stat64("/lib/libpthread.so.1", 0x080464F0) = 0 resolvepath("/lib/libpthread.so.1", "/lib/libpthread.so.1", 1023) = 20 open("/lib/libpthread.so.1", O_RDONLY) = 3 mmapobj(3, MMOBJ_INTERPRET, 0xFED00EE0, 0x0804655C, 0x00000000) = 0 close(3) = 0 mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFECF0000 stat64("/lib/libz.so.1", 0x080464F0) = 0 resolvepath("/lib/libz.so.1", "/lib/libz.so.1", 1023) = 14 open("/lib/libz.so.1", O_RDONLY) = 3 mmapobj(3, MMOBJ_INTERPRET, 0xFECF04B8, 0x0804655C, 0x00000000) = 0 close(3) = 0 memcntl(0xFE800000, 7320, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0 stat64("/lib/libm.so.2", 0x080464F0) = 0 resolvepath("/lib/libm.so.2", "/lib/libm.so.2", 1023) = 14 open("/lib/libm.so.2", O_RDONLY) = 3 mmapobj(3, MMOBJ_INTERPRET, 0xFECF0A98, 0x0804655C, 0x00000000) = 0 close(3) = 0 memcntl(0xFEBA0000, 39464, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0 stat64("/lib/libsocket.so.1", 0x080464F0) = 0 resolvepath("/lib/libsocket.so.1", "/lib/libsocket.so.1", 1023) = 19 open("/lib/libsocket.so.1", O_RDONLY) = 3 mmapobj(3, MMOBJ_INTERPRET, 0xFEFFDF08, 0x0804655C, 0x00000000) = 0 close(3) = 0 mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFECE0000 memcntl(0xFE7E0000, 16524, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0 stat64("/lib/libnsl.so.1", 0x080464F0) = 0 resolvepath("/lib/libnsl.so.1", "/lib/libnsl.so.1", 1023) = 16 open("/lib/libnsl.so.1", O_RDONLY) = 3 mmapobj(3, MMOBJ_INTERPRET, 0xFECE0540, 0x0804655C, 0x00000000) = 0 close(3) = 0 memcntl(0xFEAF0000, 78568, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0 sigfillset(0xFEF590F8) = 0 stat64("/usr/lib//libshare.so.1", 0x080469B0) = 0 resolvepath("/usr/lib//libshare.so.1", "/usr/lib/libshare.so.1", 1023) = 22 open("/usr/lib//libshare.so.1", O_RDONLY) = 3 mmapobj(3, MMOBJ_INTERPRET, 0xFECE0E50, 0x08046A1C, 0x00000000) = 0 close(3) = 0 mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFECA0000 memcntl(0xFECB0000, 24216, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0 open("/dev/zfs", O_RDWR) = 3 fstat64(3, 0x080477B0) = 0 stat64("/dev/pts/0", 0x08047840) = 0 open("/etc/mnttab", O_RDONLY) = 4 fstat64(4, 0x08047750) = 0 open("/etc/dfs/sharetab", O_RDONLY) = 5 fstat64(5, 0x08047750) = 0 stat64("/lib/libavl.so.1", 0x08046EC0) = 0 resolvepath("/lib/libavl.so.1", "/lib/libavl.so.1", 1023) = 16 open("/lib/libavl.so.1", O_RDONLY) = 6 mmapobj(6, MMOBJ_INTERPRET, 0xFECA0960, 0x08046F2C, 0x00000000) = 0 close(6) = 0 memcntl(0xFEC80000, 2436, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0 open("/etc/mnttab", O_RDONLY) = 6 fstat64(6, 0x08047760) = 0 stat64("/lib/libnvpair.so.1", 0x08046E60) = 0 resolvepath("/lib/libnvpair.so.1", "/lib/libnvpair.so.1", 1023) = 19 open("/lib/libnvpair.so.1", O_RDONLY) = 7 mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEC70000 mmapobj(7, MMOBJ_INTERPRET, 0xFEC70018, 0x08046ECC, 0x00000000) = 0 close(7) = 0 memcntl(0xFEB80000, 16180, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0 brk(0x080DA000) = 0 ioctl(3, ZFS_IOC_OBJSET_STATS, 0x08045F10) = 0 brk(0x080EA000) = 0 brk(0x080FB000) = 0 ioctl(3, ZFS_IOC_POOL_STATS, 0x08044890) = 0 brk(0x0810B000) = 0 ioctl(3, ZFS_IOC_OBJSET_STATS, 0x08045FA0) = 0 llseek(6, 0, SEEK_CUR) = 0 close(6) = 0 close(3) = 0 llseek(4, 0, SEEK_CUR) = 0 close(4) = 0 llseek(5, 0, SEEK_CUR) = 0 close(5) = 0 _exit(1)
Updated by Milan Jurik about 10 years ago
- Status changed from New to Feedback
It is necessary to know head changeset you use in your private build. Can it be afftecd by https://www.illumos.org/issues/2067 ?
If you want, I could build newer bits for you with set of your patches to verify it.
Updated by Jim Klimov about 10 years ago
Quite possibly, that is it.
My original source-code checkout was done in January (2012-01-25), and the bug #2067 was closed after that.
Despite my expectations, subsequent runs of "hg update" did not pull any new code, so I never got the bleeding edge's fix when trying to rebuild:
[admin@bofh-solv /code/illumos-gate]$ hg up 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
Thanks for making me note this ;)
I'll try to pull the current sources and test if this problem is gone.
Updated by Jim Klimov about 10 years ago
Quite possibly, that is it.
My original source-code checkout was done in January (2012-01-25), and the bug #2067 was closed after that.
Despite my expectations, subsequent runs of "hg update" did not pull any new code, so I never got the bleeding edge's fix when trying to rebuild:
[admin@bofh-solv /code/illumos-gate]$ hg up 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
Thanks for making me note this ;)
I'll try to pull the current sources and test if this problem is gone.
Updated by Jim Klimov about 10 years ago
- % Done changed from 0 to 100
Seems my report was a duplicate of #2067, and the problem does not show up in oi_151a3 and later.
Trying to close this bug...