Personal tools
You are here: Home Issue tracker 'zfs get all' core dumps if /mypool/a is bind mounted

#44 — 'zfs get all' core dumps if /mypool/a is bind mounted

State Resolved
Version: 0.6.9
Area Functionality
Issue type Bug
Severity Medium
Submitted by Seth Heeren
Submitted on May 22, 2010
Responsible Seth Heeren
Target release: 0.7.0
Return to tracker
Last modified on Sep 19, 2010 by Seth Heeren
Steps to reproduce:
Simple test case:

1. Create a pool called mypool. Let's assume its mounted at /mypool
2. Create a filesystem mypool/a and mount it at /mypool/a
3. Bind mount /mypool/a at /mnt/temp with 'mkdir -p /mnt/temp &&
mount -o bind /mypool/a /mnt/temp'
4. 'zfs get all mypool/a' dumps core.
5. umount /mnt/temp.
6. 'zfs get all mypool/a' does not dump core.
Added by Seth Heeren on May 22, 2010 04:56 AM
Cannot reproduce.

Can you state specifics?

git log -1
uname -a
gcc -v
fusermount -V

contents of /etc/zfs/zfsrc

zfs-fuse launch command (e.g. startup controlled with --no-kstat-mount -a 0 -e 0 --no-daemon)

HERE IS MY TESTRUN:
-----------------------------------
root@karmic:~# ./devsk.sh
forced clean relaunch of zfs-fuse
======== building pool l named mypool at /tmp/mypool_blk =================================
zpool create -O mountpoint=/mypool mypool /tmp/mypool_blk/za1
  pool: mypool
 state: ONLINE
 scrub: none requested
config:

    NAME STATE READ WRITE CKSUM
    mypool ONLINE 0 0 0
      /tmp/mypool_blk/za1 ONLINE 0 0 0

errors: No known data errors
NAME USED AVAIL REFER MOUNTPOINT
mypool 76.5K 1.95G 18K /mypool
root@karmic:~# zfs create mypool/a
root@karmic:~# zfs mount -a
root@karmic:~# mkdir -p /mnt/temp && mount -o bind /mypool/a /mnt/temp
root@karmic:~# zfs get all | wc -l
85
root@karmic:~# zfs get all mypool/a | wc -l
43
root@karmic:~# zpool status
  pool: mypool
 state: ONLINE
 scrub: none requested
config:

    NAME STATE READ WRITE CKSUM
    mypool ONLINE 0 0 0
      /tmp/mypool_blk/za1 ONLINE 0 0 0

errors: No known data errors
root@karmic:~# mount | tail -3
mypool on /mypool type fuse (rw,allow_other)
mypool/a on /mypool/a type fuse (rw,allow_other)
/mypool/a on /mnt/temp type none (rw,bind)
root@karmic:~#
Added by Seth Heeren on May 22, 2010 05:07 AM
Issue state: unconfirmedopen
Severity: LowMedium
Target release: None0.6.9
cannot reproduce with 0.5.0 or 0.6.0, or testing.

I _did_ reproduce it with 0.6.9_beta2:

[...]
root@karmic:~# zfs get all | wc -l
zfs: lib/libavl/avl.c:634: avl_add: Assertion `0' failed.
7
root@karmic:~# zfs get all mypool/a | wc -l
zfs: lib/libavl/avl.c:634: avl_add: Assertion `0' failed.

I can confirm this to be a duplicate of issue #42 and as such has been fixed in the testing branch. Kindly retest with that version
Added by Seth Heeren on May 22, 2010 05:16 AM
Issue state: openresolved
Closing after posting back to the list
Added by Seth Heeren on May 22, 2010 09:13 AM
Issue state: resolvedopen
though the symptoms cannot be reproduced since cc745d5b84, it is agreed that this one warrants more investigation.

Emmanuel has a fix that addresses a more direct cause for the bug (3973ae03391cc6359d80383143dbe54e23075f6b)
Added by Seth Heeren on May 26, 2010 06:59 PM
Emmanuel was right: the problem was still occurring (but I apparently tested using debug=0 so I didn't see it because I wasn't crashing the daemon anymore)

His patch is going to be included in testing as of tomorrow - pending his review of my latest dev branch

It is here for the moment
http://zfs-fuse.sehe.nl/[…]/sehe
Added by Seth Heeren on Sep 19, 2010 04:46 PM
Issue state: openresolved
Target release: 0.6.90.7.0
fixed in 0.7.0 (also in 0.6.9-maint)