cptofs hangs with 100% CPU usage for >64G volumes
dfordivam opened this issue · comments
The issue was observed while copying to an ext4
FS :
NixOS/nixpkgs#59867
The actual usage is in this file https://github.com/NixOS/nixpkgs/blob/1dac88dbd3d48c5706fd85d58608d8ff168424e1/nixos/lib/make-disk-image.nix#L188
I have to add that this issue was observed under QEMU to build an aarch64 image of 2033573888 bytes, i.e. < 2G.
Some log:
Creating an EXT4 image of 2033573888 bytes (numInodes=79580, numDataBlocks=337318)
mke2fs 1.45.4 (23-Sep-2019)
ext2fs_check_if_mount: Can't check if filesystem is mounted due to missing mtab file while determining whether /nix/store/lgnm1lsvw4md4gkdwilabay66iq0mzig-ext4-fs.img is mounted.
Unsupported ioctl: cmd=0xffffffff80200204
Discarding device blocks: done
Creating filesystem with 496478 4k blocks and 124160 inodes
Filesystem UUID: 44444444-4444-4444-8888-888888888888
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
Allocating group tables: done
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
(original ref: NixOS/nixpkgs#76780)
If someone is super interested, here's a full strace output right when cptofs
is executed under qemu-aarch64-static
:
https://gist.github.com/RaitoBezarius/83c565401b995df33acd31381eec345c
@RaitoBezarius isn't this another bug? The initial report is about 100% CPU usages for volumes >64G, on x86 (I guess?).
@evanjs, @dfordivam can you confirm?
@flokli You're definitely right.