Bug 14820 - sync() hangs during mke2fs
Summary: sync() hangs during mke2fs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel
Version: 6.2
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Michael K. Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-07-28 20:07 UTC by Viraj Alankar
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-07-28 20:07:31 UTC
Embargoed:


Attachments (Terms of Use)

Description Viraj Alankar 2000-07-28 20:07:29 UTC
I was doing a mke2fs on an external 40gig hardware RAID device, and during
this mke2fs I tried to run the passwd command to change a user's password.
After entering the information (password twice), the passwd process would
just hang indefinitely.

Looking into this further, I started passwd again (removing any lock files
created in /etc) and started a strace on the passwd PID.

Interestingly, I see something like this:

...
write(6, "root:x:0:0:root:/root:/bin/bash\n"..., 748) = 748
close(6)                                = 0
munmap(0x401cb000, 4096)                = 0
rename("/etc/passwd+", "/etc/passwd")   = 0
sync(

At the sync( there is a hang and as I'm watching it now it has been like
this for over an hour. During this whole time, I have a mke2fs going in
another shell. It seems to me very odd that the kernel will not return from
this function for so long.

Any help appreciated.

Viraj.

Comment 1 Alan Cox 2000-08-22 16:56:47 UTC
sync returns when there are no blocks unwritten. If something is generating
blocks at speed then this may well happen. There is a second issue (fixed in the
2.2.16 kernel) that might be what you see where the kernel doesnt always fairly
share the disk and the mke2fs can hold off the sync for a long long time. It
causes no problems but the delay.  

The errata kernel should thus have fixed this.




Note You need to log in before you can comment on or make changes to this bug.