#844331 mc: file transfer hangs upon "Skip all" on io errors

Package:
mc
Source:
mc
Description:
Midnight Commander - a powerful file manager
Submitter:
Adam Borowski
Date:
2025-01-12 12:00:01 UTC
Severity:
normal
Tags:
#844331#5
Date:
2016-11-14 14:16:33 UTC
From:
To:
Hi!
When a "Copy" or "Move" operation hits an io error, it offers to "Skip" the
current file, "Skip all", "Retry", "Abort".  If you select "Skip all", it
will ask you once whether to delete the incomplete file, then hang.  The UI
is still responsive, showing an ever-increasing ETA, yet no progress is
being done.

On the other hand, mere "Skip" does work -- it asks two questions per file
(Skip then delete incomplete), which is greatly tedious but allows progress.

#844331#10
Date:
2016-11-14 16:21:45 UTC
From:
To:
Do you happen to have a reliable reproducer?
#844331#15
Date:
2016-11-14 17:08:50 UTC
From:
To:
As I can't quite mail you a physical bad disk, I've crafted a small image
that you can loop-mount.  It's formatted with btrfs (for data checksums) and
has all of the three files scribbled over so the checksums don't match.

While in the root of this filesystem, with the cursor over the only
directory, please press F5 or F6.  Select a destination, then "Skip all".

By the way, an unrelated bug: F3 over one of these files, it'll happily
claim the files are empty instead of reporting the error.  "cat", "tar" or
anything will report it correctly.


Meow!

#844331#20
Date:
2017-01-13 14:07:01 UTC
From:
To:
Note that the image I've attached to the previous mail uses btrfs, but the
problem is in no way btrfs-specific.  It's the only mainline filesystem[1]
that has data checksums, making it trivial to simulate an I/O error without
physically damaging a disk or using a block device simulator.

To use the image:
mount -oloop img.xz /mnt/somehwere

Obviously, a bad sector can hit a directory rather than a plain file, which
results in a different kind of "fun", but this reproducer does the far
more likely case of bad files.


Meow!

[1]. ZFS can do this too but is an out-of-tree module.

#844331#29
Date:
2025-01-12 11:34:43 UTC
From:
To:
Hey,

Thank you for the ingenuous reproducer and sorry for a mere 7 years delay! Unfortunately, life happened and I couldn’t look into it until now.

I can still reproduce the problem in spite of our recent fixes. I have forwarded the bug upstream, and hopefully, one day we will take care of it.

All the best,
Yury