Bug 119529 - [ext2fs] [patch] Freezes when compiling code on mounter ext2fs partitions
Summary: [ext2fs] [patch] Freezes when compiling code on mounter ext2fs partitions
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: 2008-01-10 13:20 UTC by Simeon
Modified: 2009-05-18 17:44 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 Simeon 2008-01-10 13:20:02 UTC
Hello,

I would like to report a strange behaviour of FreeBSD AMD64 ver.  7.0 RC1.
I installed it on a Laptop with Intel Core 2 Duo CPU.  Everything default.
I have an ext2fs partition where I store all installed compilers and
libraries. I changed directory to my ext3 (ext2fs) partition and I started
compiling one of my libraries. The system Hanged. I repeated the same
thing with several other libraries (ATLAS(BLAS), LAPACK, ...) and everytime
the system hanged. Then I copied the sources to /usr and I compiled them
there. No problem. Everything was fine there.

Best,
Simeon.

Fix: 

There was a similar problem in the past and it was supposed to be fixed
in 6.2. Maybe now for some reason it came back to life.
How-To-Repeat: It is very easy to repeat. Just mount an ext2fs partition copy some large
source code and try to compile it there.
Comment 1 Jaakko Heinonen 2009-01-04 10:55:12 UTC
Please see the following message and the patch below.

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

--- patch begins here ---
Index: sys/gnu/fs/ext2fs/ext2_bitops.h
===================================================================
--- sys/gnu/fs/ext2fs/ext2_bitops.h	(revision 186639)
+++ sys/gnu/fs/ext2fs/ext2_bitops.h	(working copy)
@@ -84,7 +84,7 @@ find_next_zero_bit(void *data, size_t sz
 		mask = ~0U << (ofs & 31);
 		bit = *p | ~mask;
 		if (bit != ~0U)
-			return (ffs(~bit) + ofs - 1);
+			return (ffs(~bit) + (ofs & ~31U) - 1);
 		p++;
 		ofs = (ofs + 31U) & ~31U;
 	}
--- patch ends here ---

Does the patch fix the problem for you?

-- 
Jaakko
Comment 2 Volker Werth freebsd_committer freebsd_triage 2009-01-18 22:53:50 UTC
State Changed
From-To: open->feedback


Note that submitter has been asked for feedback.
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2009-05-18 05:31:44 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-fs

Over to maintainer(s).
Comment 4 Konstantin Belousov freebsd_committer freebsd_triage 2009-05-18 17:44:21 UTC
State Changed
From-To: feedback->closed

The patch in the trail log was committed. 
I believe it should fix the issue.