Bug 14820 - sync() hangs during mke2fs
sync() hangs during mke2fs
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Michael K. Johnson
Depends On:
  Show dependency treegraph
Reported: 2000-07-28 16:07 EDT by Viraj Alankar
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-07-28 16:07:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Viraj Alankar 2000-07-28 16:07:29 EDT
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

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.

Comment 1 Alan Cox 2000-08-22 12:56:47 EDT
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.