Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZFS diff - Unable to determine path or stats for object #7678

Closed
dguskovv opened this issue Jul 4, 2018 · 3 comments · Fixed by #9343
Closed

ZFS diff - Unable to determine path or stats for object #7678

dguskovv opened this issue Jul 4, 2018 · 3 comments · Fixed by #9343

Comments

@dguskovv
Copy link

dguskovv commented Jul 4, 2018

System information

Type Version/Name
Distribution Name Debian
Distribution Version 9.4
Linux Kernel 4.9.0-7-amd64 #1 SMP Debian 4.9.107-1 (2018-06-13)
Architecture x86_64
ZFS Version 0.7.9
SPL Version 0.7.9

Describe the problem you're observing

I have dataset shared via samba.

Some non default settings:

store/share  xattr                 sa                     local
store/share  utf8only              on                     -
store/share  normalization         formD                  -
store/share  casesensitivity       insensitive            -
store/share  dnodesize             auto                   inherited from store
store/share  relatime              on                     local

samba settings for this share

   ea support = yes

    vfs objects = catia fruit streams_xattr

    fruit:aapl = yes
    fruit:resource = file
    fruit:metadata = netatalk
    fruit:locking = none
    fruit:encoding = native

    streams_xattr:prefix = user.
    streams_xattr:store_stream_type = no

I use zfs-auto-snapshot scrip for create daily snapshots

If I save file form Safari browser directly to mounted fileshare and the try to use zfs diff , I get error "Unable to determine path or stats for object".

For example file - extrafiles.dms

zfs diff store/share@zfs-auto-snap_daily-2018-07-04-1215

M /store/share/Files
Unable to determine path or stats for object 754017 in store/share@zfs-diff-10119-000000010b75f5ed: File exists

let's see inodes for this folder

  #ls -i

753760 3.7.6.602.rar  754010 c3_release.iso  754016 extrafiles.dms
zdb -dddd store/share 754016
Dataset store/share [ZPL], ID 259, cr_txg 95, 6.93T, 731938 objects, rootbp DVA[0]=<0:2606b60b000:3000> DVA[1]=<0:da74abe6000:3000> [L0 DMU objset] fletcher4 uncompressed LE contiguous unique double size=800L/800P birth=758772L/758772P fill=731938 cksum=b5fa96a45:d354563e380:9e8171a1b70be:599ac129e35f908
    Object  lvl   iblk   dblk  dsize  dnsize  lsize   %full  type
    754016    2   128K   128K   136K      1K   384K  100.00  ZFS plain file
                                               688   bonus  System attributes
	dnode flags: USED_BYTES USERUSED_ACCOUNTED USEROBJUSED_ACCOUNTED
	dnode maxblkid: 2
	uid     502
	gid     1000
	atime	Wed Jul  4 21:55:43 2018
	mtime	Wed Jul  4 21:55:43 2018
	ctime	Wed Jul  4 21:55:44 2018
	crtime	Wed Jul  4 21:55:43 2018
	gen	758768
	mode	100664
	size	269379
	parent	754120
	links	1
	pflags	40800000004
	SA xattrs: 512 bytes, 4 entries

		user.com.apple.quarantine = 0083;5b3d182f;Safari;D5A92F02-E5E6-44CF-B8F6-C2C6D6E50DC4\000
		user.com.apple.lastuseddate#PS = 0\030=[\000\000\000\000\177a\302\000\000\000\000\000\000
		user.com.apple.metadata:kMDItemWhereFroms = bplist00\242\001\002_\020'http://ftp.debian.org/debian/extrafiles_\020\035http://ftp.debian.org/debian/\010\0135\000\000\000\000\000\000\001\001\000\000\000\000\000\000\000\003\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000U\000
		user.com.apple.metadata:kMDItemDownloadedDate = bplist00\241\0013A\300v\247\330\010r\031\010\012\000\000\000\000\000\000\001\001\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\023\000

The object id for file with xattr - 754016, "problematic" object id - 754017

If I understand correctly ID 754017 must not be used, because dnode size is 1K

If I remove all xattr from file with "attr -r ..." - some time it's solve problem, some time no.

UPD:
When I set dnodesize to "legacy" - it's no any problem with xattr and SA.

What dnodesize I must choose for samba sharing dataset ?

Describe how to reproduce the problem

make dataset

zfs create -o utf8only=on -o atime=on -o checksum=fletcher4 -o compression=off -o xattr=sa -o dedup=off -o sync=disabled -o relatime=on zpool/test

set dnode size

zfs set dnodesize=auto zpool/test

make test file (non zero size file is important)

dd if=/dev/zero of=/zpool/test/file.test count=10 bs=1M

make snapshot

zfs snapshot zpool/test@test

create an attr similar to those used in mac os

attr -s "user.com.apple.metadata:_kMDItemUserTagf#" -V "bplist00\241\001WGreen\0122\010\012\000\000\000\000\000\000\001\001\000\000\000\000\000\000\000\002\000\000\000\000\000\000\000\000\000\000\000\000\\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000000\000\000\022\000" file.test

run zfs diff

zfs diff zpool/test@test
zfs diff store/test@test
M	/store/test/file.test
Unable to determine path or stats for object 3 in store/test@test: File exists

Include any warning/errors/backtraces from the system logs

@vivo75
Copy link

vivo75 commented Aug 27, 2019

Also happen with encryption in 0.8.1

leb ~/cron # modinfo zfs | grep version:
version: 0.8.1-1ubuntu7
srcversion: A253AC98C8B411B821150CC
leb ~/cron # zfs get all P000201/gentoo/repos
NAME PROPERTY VALUE SOURCE
P000201/gentoo/repos type filesystem -
P000201/gentoo/repos creation Fri Aug 23 18:07 2019 -
P000201/gentoo/repos used 2.76G -
P000201/gentoo/repos available 3.39T -
P000201/gentoo/repos referenced 1.69G -
P000201/gentoo/repos compressratio 1.03x -
P000201/gentoo/repos mounted yes -
P000201/gentoo/repos quota none default
P000201/gentoo/repos reservation none default
P000201/gentoo/repos recordsize 128K default
P000201/gentoo/repos mountpoint /srv/gentoo/repos inherited from P000201/gentoo
P000201/gentoo/repos sharenfs off default
P000201/gentoo/repos checksum fletcher4 inherited from P000201
P000201/gentoo/repos compression lz4 inherited from P000201
P000201/gentoo/repos atime off inherited from P000201
P000201/gentoo/repos devices off inherited from P000201
P000201/gentoo/repos exec on default
P000201/gentoo/repos setuid on default
P000201/gentoo/repos readonly off default
P000201/gentoo/repos zoned off default
P000201/gentoo/repos snapdir hidden default
P000201/gentoo/repos aclinherit restricted default
P000201/gentoo/repos createtxg 2982 -
P000201/gentoo/repos canmount on default
P000201/gentoo/repos xattr sa inherited from P000201
P000201/gentoo/repos copies 1 default
P000201/gentoo/repos version 5 -
P000201/gentoo/repos utf8only off -
P000201/gentoo/repos normalization none -
P000201/gentoo/repos casesensitivity sensitive -
P000201/gentoo/repos vscan off default
P000201/gentoo/repos nbmand off default
P000201/gentoo/repos sharesmb off default
P000201/gentoo/repos refquota none default
P000201/gentoo/repos refreservation none default
P000201/gentoo/repos guid 8631773260852749862 -
P000201/gentoo/repos primarycache all default
P000201/gentoo/repos secondarycache all default
P000201/gentoo/repos usedbysnapshots 1.08G -
P000201/gentoo/repos usedbydataset 1.69G -
P000201/gentoo/repos usedbychildren 0B -
P000201/gentoo/repos usedbyrefreservation 0B -
P000201/gentoo/repos logbias latency default
P000201/gentoo/repos objsetid 1212 -
P000201/gentoo/repos dedup off default
P000201/gentoo/repos mlslabel none default
P000201/gentoo/repos sync standard default
P000201/gentoo/repos dnodesize auto inherited from P000201
P000201/gentoo/repos refcompressratio 1.03x -
P000201/gentoo/repos written 0 -
P000201/gentoo/repos logicalused 1.38G -
P000201/gentoo/repos logicalreferenced 987M -
P000201/gentoo/repos volmode default default
P000201/gentoo/repos filesystem_limit none default
P000201/gentoo/repos snapshot_limit none default
P000201/gentoo/repos filesystem_count none default
P000201/gentoo/repos snapshot_count none default
P000201/gentoo/repos snapdev hidden default
P000201/gentoo/repos acltype posixacl inherited from P000201
P000201/gentoo/repos context none default
P000201/gentoo/repos fscontext none default
P000201/gentoo/repos defcontext none default
P000201/gentoo/repos rootcontext none default
P000201/gentoo/repos relatime on inherited from P000201
P000201/gentoo/repos redundant_metadata all default
P000201/gentoo/repos overlay on inherited from P000201
P000201/gentoo/repos encryption aes-256-gcm -
P000201/gentoo/repos keylocation none default
P000201/gentoo/repos keyformat passphrase -
P000201/gentoo/repos pbkdf2iters 342K -
P000201/gentoo/repos encryptionroot P000201 -
P000201/gentoo/repos keystatus available -
P000201/gentoo/repos special_small_blocks 0 default

behlendorf pushed a commit that referenced this issue Sep 24, 2019
Trying to 'zfs diff' a snapshot with large dnodes will incorrectly try
to access its interior slots when dnodesize > sizeof(dnode_phys_t).
This is normally not an issue because the interior slots are
zero-filled, which report_dnode() handles calling
report_free_dnode_range(). However this is not the case for encrypted
large dnodes or filesystem using many SA based xattrs where the extra
data past the legacy dnode size boundary is interpreted as a
dnode_phys_t.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tom Caputi <tcaputi@datto.com>
Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #7678 
Closes #8931 
Closes #9343
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Dec 24, 2019
Trying to 'zfs diff' a snapshot with large dnodes will incorrectly try
to access its interior slots when dnodesize > sizeof(dnode_phys_t).
This is normally not an issue because the interior slots are
zero-filled, which report_dnode() handles calling
report_free_dnode_range(). However this is not the case for encrypted
large dnodes or filesystem using many SA based xattrs where the extra
data past the legacy dnode size boundary is interpreted as a
dnode_phys_t.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tom Caputi <tcaputi@datto.com>
Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes openzfs#7678
Closes openzfs#8931
Closes openzfs#9343
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Dec 27, 2019
Trying to 'zfs diff' a snapshot with large dnodes will incorrectly try
to access its interior slots when dnodesize > sizeof(dnode_phys_t).
This is normally not an issue because the interior slots are
zero-filled, which report_dnode() handles calling
report_free_dnode_range(). However this is not the case for encrypted
large dnodes or filesystem using many SA based xattrs where the extra
data past the legacy dnode size boundary is interpreted as a
dnode_phys_t.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tom Caputi <tcaputi@datto.com>
Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes openzfs#7678
Closes openzfs#8931
Closes openzfs#9343
@mailinglists35
Copy link

mailinglists35 commented Dec 30, 2019

this occurs on 0.8.2, no encryption

is it only fixed in master?

@tilpner
Copy link

tilpner commented Dec 30, 2019

@mailinglists35 d359e99 appears to be in master only

tonyhutter pushed a commit that referenced this issue Jan 23, 2020
Trying to 'zfs diff' a snapshot with large dnodes will incorrectly try
to access its interior slots when dnodesize > sizeof(dnode_phys_t).
This is normally not an issue because the interior slots are
zero-filled, which report_dnode() handles calling
report_free_dnode_range(). However this is not the case for encrypted
large dnodes or filesystem using many SA based xattrs where the extra
data past the legacy dnode size boundary is interpreted as a
dnode_phys_t.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tom Caputi <tcaputi@datto.com>
Reviewed-by: Ryan Moeller <ryan@ixsystems.com>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #7678
Closes #8931
Closes #9343
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants