Re: Kernel 2.6.4 Hang in utime() on swap file

From: Andrew Morton
Date: Sat Mar 20 2004 - 16:57:30 EST


"Michael W. Shaffer" <mwshaffer@xxxxxxxxx> wrote:
>
> I have a Debian Sarge system running a 2.6 kernel (tested with 2.6.2, 2.6.3,
> 2.6.4 with the same behavior as described here), and am seeing un-killable
> hanging processes with our particular backup product.
>
> When the backup disk agent process is running, one the the last files it
> tries to back up is a swap file at the path /swapfile00. The read of the
> file appears to work fine, but then it wants to call utime() to reset the
> atime/mtime on the file, and at this point the process becomes infinitely
> hung, doing nothing, no more output from strace, never terminating.
>
> This only occurs if the swapfile is actively in use when the backup runs. If
> I run swapoff to deactivate the swapfile, then the utime() call apparently
> completes and the process immediately finishes and exits normally. If the
> swapfile is not in use at all, everything works fine.
>

ho hum. We do this to prevent anyone from ftruncate()ing the swapfile
while it is in use. That can destroy filesystems. Let me think about it a
bit.
-
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/