czkawka
czkawka copied to clipboard
Out of memory (OOM) due to endless recursive scan
Desktop (please complete the following information):
- Czkawka version: 6.1.0 AppImage / gui
- OS version: Pop!_OS 22.04
Nov 12 13:40:10 rosie kernel: oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1000.slice/[email protected],task=czkawka_gui,pid=779873,uid=1000
Nov 12 13:40:10 rosie kernel: Out of memory: Killed process 779873 (czkawka_gui) total-vm:121413672kB, anon-rss:58398660kB, file-rss:52kB, shmem-rss:0kB, UID:1000 pgtables:224492kB oom_score_adj:0
Nov 12 13:40:19 rosie kernel: oom_reaper: reaped process 779873 (czkawka_gui), now anon-rss:180kB, file-rss:52kB, shmem-rss:0kB
Bug Description
I ran Czkawka on a network-shared device that has ~3TB of files. During the "Scanning" phase (dialog says Current stage: [blank]; All stages: 0%; Scanning: ... files), the app crashed after about 48 hours.
There are about 3.4M files on this drive, but when I came back, it said it had scanned about 70M files. AFAIK, there is nothing particularly unusual about this hard drive nor its contents--it's a family archive of various backed up computers we've had over the years.
Unfortunately I did not have debug enabled at the time, so I did not catch anything more specific than the OOM error. I have 64 GB of RAM and about 250 GB of free space on the system hard drive (i.e. not the external shared drive).
I don't see how app could not properly calculate number of items to scan. It uses simple algorithm to get list of all files on disk and not follows any symlinks, so it is quite suspicious that such number of files was reported.
Maybe file system may be broken?
I was able to use other tools to find the number of files, e.g. fd
and fclones
, without any changes to the file system.
Note, however, that I did not use the network mounted share this time, so I need to check whether I could do a file count over network share with these tools (to narrow it down to either Czkawa or the network share being the cause).