Bug 131009 - [ext2fs] [hang] System freezes when attempting to copy from one mounted (USB-disk-resident) ext2 filesystem to another
Summary: [ext2fs] [hang] System freezes when attempting to copy from one mounted (USB-...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-fs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-26 12:20 UTC by donaldcallen
Modified: 2009-02-03 16:40 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description donaldcallen 2009-01-26 12:20:01 UTC
I have just, within the last week, migrated to FreeBSD from Gentoo Linux. I do backups/archiving using three 300 Gb SATA drives in USB shoeboxes, with homebrew scripts (using rsync and tar) and Acronis Home (for Windows partitions). All the USB drives contain a single partition with an ext2 filesystem. One of my scripts simply rsyncs one mounted drive with another, resulting in a copy. For reasons irrelevant to this report, yesterday I had to reinitialize one of the drives and do a full copy of the most current backup/archive disk to the newly initialized one. I did the initialization with FreeBSD, using mke2fs. I immediately ran into the issue with the default inode size not being supported by the kernel and could not mount the newly initialized drive. After googling revealed that problem to me, I reinitialized using mke2fs -I 128, which allowed me to mount the new filesystem. But after starting the rsync from the current drive to this one, the system would completely freeze
  perhaps 1/2 an hour and after copying perhaps 18 or 20 Gbytes of a total 127. I believe, but am not certain, that the crash occurred while transferring a particularly large file, about 22 Gbytes (an Acronis backup file). Reviving the system required power-cycling. I then had to fsck the source drive and reinitialize the destination drive. I did this twice with FreeBSD and then tried it a third time, initializing the destination drive with a circa 2007 Gentoo installation CD. All three attempts resulted in the same complete system crash. I then tried initializing the destination drive with two partitions, one 60 Gbytes (for use by Acronis), the second covering the rest of the disk (for use by my own scripts). I initialized the large partition as a UFS filesystem and performed the full rsync once again to that large partition. That rync completed normally.

There appears to be a serious error in the ext2 support.

How-To-Repeat: Rsync a large number of files, some files > 20 Gbytes, to a newly-initialized ext2 filesystem.
Comment 1 Jaakko Heinonen 2009-01-26 12:35:40 UTC
Hi,

On 2009-01-26, Don Allen wrote:
> FreeBSD sophie.comcast.net 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Thu Jan  1 08:58:
> 24 UTC 2009     root@driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
> 
> But after starting the rsync from the current drive to this one, the
> system would completely freeze

See this message (which contains a patch):

http://lists.freebsd.org/pipermail/freebsd-fs/2009-January/005546.html

The patch has been committed to head and stable/7 but it's not in
7.1-RELEASE.

-- 
Jaakko
Comment 2 donaldcallen 2009-01-26 13:11:09 UTC
On Mon, Jan 26, 2009 at 7:35 AM, Jaakko Heinonen <jh@saunalahti.fi> wrote:
>
> Hi,
>
> On 2009-01-26, Don Allen wrote:
>> FreeBSD sophie.comcast.net 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Thu Jan  1 08:58:
>> 24 UTC 2009     root@driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>>
>> But after starting the rsync from the current drive to this one, the
>> system would completely freeze
>
> See this message (which contains a patch):
>
> http://lists.freebsd.org/pipermail/freebsd-fs/2009-January/005546.html
>
> The patch has been committed to head and stable/7 but it's not in
> 7.1-RELEASE.

15 minutes after I submit the bug report, I have a fix -- another
demonstration of why open-source/software built by people who want to,
rather than *have* to, is such a wonderful thing. I go back a lot of
years with Richard Stallman at MIT, and it still amazes me how right
this is.

Thank you for the patch. Building a kernel is next on my agenda, and I
will install the fix when I do. You've also made me aware that this
problem doesn't affect i386 systems, of which I have one (and two
AMD64, all sharing the same backup/archive scheme and disks). So to
the extent I can substitute that machine for doing ext2 work (I'm
going to migrate as much of my backup scheme to UFS as I can), I will.

Thanks again --
/Don Allen

>
> --
> Jaakko
>
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2009-01-27 16:00:06 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-fs

Over to maintainer(s).
Comment 4 Jaakko Heinonen 2009-02-03 15:33:47 UTC
On 2009-01-26, Donald Allen wrote:
> Thank you for the patch. Building a kernel is next on my agenda, and I
> will install the fix when I do.

Can you confirm that the patch fixed the problem for you?

-- 
Jaakko
Comment 5 Mark Linimon freebsd_committer freebsd_triage 2009-02-03 16:39:25 UTC
State Changed
From-To: open->closed

Closed at submitter's request.