Date: Mon, 15 Dec 2014 15:33:02 -0600 From: Larry Rosenman <ler@lerctr.org> To: d@delphij.net Cc: freebsd-fs@freebsd.org Subject: Re: zfs diff without allow as user gets =?UTF-8?Q?coredump=3F?= Message-ID: <1b1127837b9c07378c58e9ab7ebf8229@thebighonker.lerctr.org> In-Reply-To: <548F5253.2090603@delphij.net> References: <20141215204833.GA2858@borg.lerctr.org> <548F5253.2090603@delphij.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2014-12-15 15:27, Xin Li wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > On 12/15/14 12:48, Larry Rosenman wrote: >> Should we get a better message if you try to do a zfs diff as a >> normal user, and diff hasn't been allowed? >> >> You currently get: borg.lerctr.org /home/ler $ zfs diff >> zroot/home/ler@zfs-auto-snap_hourly-2014-12-15-12h00 internal >> error: Invalid argument Abort trap (core dumped) borg.lerctr.org >> /home/ler $ > > It would be useful if you have a backtrace from the core file as I > can't reproduce on -CURRENT. > > BTW I wasn't able to reproduce the abort trap (something returned > EINVAL? how?) but found a different bug where an extra \n is sneaked > in. > > Index: cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c > =================================================================== > - --- > cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c (revision > 275812) > +++ cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c (working > copy) > @@ -524,7 +524,7 @@ > (void) snprintf(di->errbuf, sizeof (di->errbuf), > dgettext(TEXT_DOMAIN, "The diff delegated " > "permission is needed in order\nto create a " > - - "just-in-time snapshot for diffing\n")); > + "just-in-time snapshot for diffing")); > return (zfs_error(hdl, EZFS_DIFF, di->errbuf)); > } else { > (void) snprintf(di->errbuf, sizeof (di->errbuf), > > But no it doesn't fix your coredump apparently... > borg.lerctr.org /home/ler $ zfs diff zroot/home/ler@zfs-auto-snap_hourly-2014-12-15-14h00 internal error: Invalid argument Abort trap (core dumped) borg.lerctr.org /home/ler $ gdb -c zfs.core /sbin/zfs GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"...(no debugging symbols found)... Core was generated by `zfs'. Program terminated with signal 6, Aborted. Reading symbols from /lib/libgeom.so.5...(no debugging symbols found)...done. Loaded symbols for /lib/libgeom.so.5 Reading symbols from /lib/libjail.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/libjail.so.1 Reading symbols from /lib/libnvpair.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/libnvpair.so.2 Reading symbols from /lib/libumem.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/libumem.so.2 Reading symbols from /lib/libutil.so.9...(no debugging symbols found)...done. Loaded symbols for /lib/libutil.so.9 Reading symbols from /lib/libuutil.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/libuutil.so.2 Reading symbols from /lib/libzfs_core.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/libzfs_core.so.2 Reading symbols from /lib/libzfs.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/libzfs.so.2 Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done. Loaded symbols for /lib/libc.so.7 Reading symbols from /lib/libbsdxml.so.4...(no debugging symbols found)...done. Loaded symbols for /lib/libbsdxml.so.4 Reading symbols from /lib/libsbuf.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/libsbuf.so.6 Reading symbols from /lib/libmd.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/libmd.so.6 Reading symbols from /lib/libm.so.5...(no debugging symbols found)...done. Loaded symbols for /lib/libm.so.5 Reading symbols from /lib/libavl.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/libavl.so.2 Reading symbols from /lib/libthr.so.3...(no debugging symbols found)...done. Loaded symbols for /lib/libthr.so.3 Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done. Loaded symbols for /libexec/ld-elf.so.1 #0 0x0000000801a00dba in kill () from /lib/libc.so.7 [New Thread 803006400 (LWP 100916/zfs)] (gdb) bt #0 0x0000000801a00dba in kill () from /lib/libc.so.7 #1 0x00000008019ff4e9 in abort () from /lib/libc.so.7 #2 0x000000080168ead2 in zfs_standard_error_fmt () from /lib/libzfs.so.2 #3 0x000000080168e4c5 in zfs_standard_error () from /lib/libzfs.so.2 #4 0x000000080168c44c in zfs_show_diffs () from /lib/libzfs.so.2 #5 0x000000080168ac2e in zfs_show_diffs () from /lib/libzfs.so.2 #6 0x000000000040a004 in zfs_do_diff () #7 0x000000000040572f in main () (gdb) borg.lerctr.org /home/ler $ zfs allow zroot/home/ler ---- Permissions on zroot/home/ler ----------------------------------- Local+Descendent permissions: user ler destroy,mount,snapdir,snapshot borg.lerctr.org /home/ler $ borg.lerctr.org /home/ler $ uname -a FreeBSD borg.lerctr.org 11.0-CURRENT FreeBSD 11.0-CURRENT #26 r275811: Mon Dec 15 12:36:41 CST 2014 root@borg.lerctr.org:/usr/obj/usr/src/sys/VT-LER amd64 borg.lerctr.org /home/ler $ svn info /usr/src Path: /usr/src Working Copy Root Path: /usr/src URL: svn://svn.freebsd.org/base/head Relative URL: ^/head Repository Root: svn://svn.freebsd.org/base Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f Revision: 275812 Node Kind: directory Schedule: normal Last Changed Author: delphij Last Changed Rev: 275812 Last Changed Date: 2014-12-15 12:28:22 -0600 (Mon, 15 Dec 2014) if you want / need access I can arrange it :) -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 214-642-9640 E-Mail: ler@lerctr.org US Mail: 108 Turvey Cove, Hutto, TX 78634-5688
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1b1127837b9c07378c58e9ab7ebf8229>