Re: 2.6.18 mmap hangs unrelated apps
From: Trond Myklebust
Date: Fri Dec 15 2006 - 11:25:24 EST
On Thu, 2006-12-14 at 20:30 -0600, Michal Sabala wrote:
> Hello LKML,
>
> I am observing processes entering uninterruptible sleep apparently due
> to an unrelated application using mmap over nfs. Applications in
> "uninterruptible sleep" hang indefinitely while other applications
> continue working properly.
>
> The code causing the mmap nfs hangs does the following:
> (as replicated by the included test-mmap.c file)
>
> 1. create file on nfs (file_A, descr_A)
> 2. make file_A a sparse 200MB file
> 3. mmap descr_A
> 4. close descr_A
> 5. unlink file_A
> 6. memcpy 200MB to mmaped buffer
> 7. create a second file on nfs (file_B, descr_B)
> 8. write() 200MB from mmaped buffer to descr_B
> 9. close descr_B
> 10. munmap first file
>
> This code may need to be ran tens to hundred runs to trigger the condition.
>
> During the execution of the above code, unrelated applications enter
> uninterruptible sleep (D) - usually firefox2.0, Xorg/XFree86, gimp2.2, gconfd
> or bash; probably the most active processes.
>
> `dmesg` shows nothing of interest.
>
> `free` shows anywhere between 1MB and 80MB of memory still remaining
> free when the problem occurs.
>
> `cat /proc/*PID*/wchan` for all hanging processes contains page_sync.
Have you tried an 'echo t >/proc/sysrq-trigger' on a client with one of
these hanging processes? If so, what does the output look like?
Cheers
Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/