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

Assertion error #48

Open
LoZio opened this issue Jan 16, 2021 · 12 comments
Open

Assertion error #48

LoZio opened this issue Jan 16, 2021 · 12 comments
Assignees

Comments

@LoZio
Copy link

LoZio commented Jan 16, 2021

Running code from today's repo Gen-15-2021 (dduper 0.04)

btrfs_lookup_csums search failed.icrosoft.MicrosoftOfficeHub_8wekyb3d8bbwe/AC/Microsoft/CLR_v4.0/ngen.log
 Error: btrfs_lookup_csumextent buffer leak: start 87928078336 len 16384
extent buffer leak: start 55155425280 len 16384
extent buffer leak: start 305545216 len 16384
Traceback (most recent call last):
  File "/usr/local/bin/dduper", line 575, in <module>
    main(results)
  File "/usr/local/bin/dduper", line 465, in main
    dedupe_dir(results.dir_path, results.dry_run, results.recurse)
  File "/usr/local/bin/dduper", line 456, in dedupe_dir
    dedupe_files(file_list, dry_run)
  File "/usr/local/bin/dduper", line 410, in dedupe_files
    ret = do_dedupe(src_file, dst_file, dry_run)
  File "/usr/local/bin/dduper", line 225, in do_dedupe
    assert len(out2) != 0
AssertionError

It ran half a day analyzing a path then crashed. Command line is
dduper --device /dev/sdq --dir /mypath/backup/ --analyze --recurse

@LoZio
Copy link
Author

LoZio commented Jan 16, 2021

And anothere here, on a different path, but strangely again a a CLR file

/Microsoft.MicrosoftOfficeHub_8wekyb3d8bbwe/AC/Microsoft/CLR_v4.0btrfs_lookup_csums search failed.
 Error: btrfs_lookup_csumextent buffer leak: start 87928242176 len 16384
extent buffer leak: start 55155425280 len 16384
extent buffer leak: start 305545216 len 16384
Traceback (most recent call last):
  File "/usr/local/bin/dduper", line 575, in <module>
    main(results)
  File "/usr/local/bin/dduper", line 465, in main
    dedupe_dir(results.dir_path, results.dry_run, results.recurse)
  File "/usr/local/bin/dduper", line 456, in dedupe_dir
    dedupe_files(file_list, dry_run)
  File "/usr/local/bin/dduper", line 410, in dedupe_files
    ret = do_dedupe(src_file, dst_file, dry_run)
  File "/usr/local/bin/dduper", line 225, in do_dedupe
    assert len(out2) != 0
AssertionError

@Lakshmipathi
Copy link
Owner

Can you trying on these files individually and check the status? Are you using Subvolume? I added this assert especially when dduper runs into subvolume.

@Lakshmipathi Lakshmipathi self-assigned this Jan 16, 2021
@LoZio
Copy link
Author

LoZio commented Jan 17, 2021

There was no subvolume involved here, singole partition btrfs formatted.
Currently I have no access to the server, probably next week. The other test I made was to check if files were somewhat damaged but I could download/zip/copy them with no problem.

@VTiTux
Copy link

VTiTux commented Jan 21, 2021

Same issue.
The -d "Dir" is inside a subvolume, but there is no nested subvolumes inside this Dir, and there is not snapshot anywhere in this FS.
With BTRFS, everythings are inside subvolumes. The top-level subvolume (id 5) cannot be removed.

@Lakshmipathi
Copy link
Owner

Currently I have no access to the server, probably next week

Okay, thanks. Single partition - it should. I guess its something related to file. Can you share the output or stat filename and filefrag -e filename ?

@Lakshmipathi
Copy link
Owner

Same issue.
The -d "Dir" is inside a subvolume, but there is no nested subvolumes inside this Dir, and there is not snapshot anywhere in this FS.
With BTRFS, everythings are inside subvolumes. The top-level subvolume (id 5) cannot be removed.

dduper works fine with top-level subvolume. Can you share the output for failing file.

dduper --device /dev/sda1 --files /file1 /file2 --dry-run
``

@aplund
Copy link

aplund commented Feb 8, 2021

I have the same problem. My btrfs.static has version 'btrfs-progs v5.7' and when you do the inspect-internal dump-csum on a file, there is no output to stdout, even though it returns success.

@abadger
Copy link

abadger commented Mar 28, 2021

I may be having the same issue. But I don't seem to have output from dump-csum with any file on my btrfs filesystem. I'm using the btrfs.static that is in the git repo:

(run) [root@camelback bin]# btrfs inspect-internal dump-csum /bin/more /dev/mapper/luks-90a6412f-c588-46ca-9118-5aca35943d25
(run) [root@camelback bin]# stat more
  File: more
  Size: 45248           Blocks: 96         IO Block: 4096   regular file
Device: 23h/35d Inode: 105399      Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Context: system_u:object_r:bin_t:s0
Access: 2021-03-28 10:50:30.171868026 -0400
Modify: 2021-01-07 05:21:36.000000000 -0500
Change: 2021-03-28 04:20:54.485295462 -0400
 Birth: 2021-03-28 04:20:54.485295462 -0400
(run) [root@camelback bin]# filefrag -e more
Filesystem type is: 9123683e
File size of more is 45248 (12 blocks of 4096 bytes)
 ext:     logical_offset:        physical_offset: length:   expected: flags:
   0:        0..      11:    6781429..   6781440:     12:             last,encoded,eof
more: 1 extent found
(run) [root@camelback bin]# mount |grep '/ '
/dev/mapper/luks-90a6412f-c588-46ca-9118-5aca35943d25 on / type btrfs (rw,relatime,seclabel,compress=zstd:3,ssd,space_cache,subvolid=256,subvol=/root)

Something that may be helpful: I ran the test/verify.sh script and it worked. So I modified the script to keep the loopback btrfs img mounted. I then entered that directory and observed the following:

(run) [root@camelback btrfs_mnt]# cp /bin/more .
(run) [root@camelback btrfs_mnt]# btrfs inspect-internal dump-csum /tmp/btrfs_mnt/more /dev/loop1
(run) [root@camelback btrfs_mnt]# sync
(run) [root@camelback btrfs_mnt]# btrfs inspect-internal dump-csum /tmp/btrfs_mnt/more /dev/loop1
cc2b2ca9 817f228e d39b1b93 27ea92ed 836a09df 3340f8bc b89342ae 6950ff3 
60936024 c576f12b 2cd90fa3 49c1878e (run) [root@camelback btrfs_mnt]#

I thought that it might be one of the mount options on my main filesystem that is causing this but mounting with these options doesn't appear to have made a difference:

(run) [root@camelback tmp]# mount /tmp/img /tmp/btrfs_mnt/ -orw,relatime,seclabel,compress=zstd:3,ssd,space_cache
(run) [root@camelback tmp]# cd btrfs_mnt/
(run) [root@camelback btrfs_mnt]# cp /bin/more .
(run) [root@camelback btrfs_mnt]# btrfs inspect-internal dump-csum /tmp/btrfs_mnt/more /dev/loop1
(run) [root@camelback btrfs_mnt]# sync
(run) [root@camelback btrfs_mnt]# btrfs inspect-internal dump-csum /tmp/btrfs_mnt/more /dev/loop1
7414aaf2 d953ad9d 841da37f 15906a01 2e82545 6add4ec4 fffffff6 ffffffff 
d0600080 3 3f8300 1800 (run) [root@camelback btrfs_mnt]#

My main filesystem is on a luks2 device but I haven't tested whether using luks2 with a loop back device will reproduce this problem.

@bugsyb
Copy link

bugsyb commented Apr 17, 2024

More errors like this, as I did run into it too and reported issue here:
#69 (comment)

Did run couple of tests:

  • works: folder in root volume (/mnt/root-volume/test-folder)
  • doesn't work: folder in subvolume, though subvolume mounted (/mnt/subvolume-mnt-point)
  • doesn't work: folder in subvolume, root volume mounted (/mnt/root-volume/@subvolume)

For all tests BTRFS sits on LUKS2 and it is aarch64 (OSCM/Debian based distro).

@bugsyb
Copy link

bugsyb commented Apr 17, 2024

Further investigation shows that for file located on root volume, csum can be obtained and for the file on subvolume it doesn't return anything.

@Lakshmipathi
Copy link
Owner

@bugsyb : Subvolume issue listed here https://github.com/Lakshmipathi/dduper?tab=readme-ov-file#known-issues Sorry I was unable to figure out the issue, its been years passed. I'll see whether I can allocate sometime on this issue.

@bugsyb
Copy link

bugsyb commented Apr 17, 2024

Appreciate it. Yes whilst doing research did end up on Known Issues though hopes were created as under one of the tickets you've mentioned that work is being done on it and... it is more and more common to use subvolumes.

Thanks!

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

No branches or pull requests

6 participants