LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.20 kernel hang with USB drive and vfat doing ftruncate
Date: Mon, 19 Feb 2007 01:10:05 +0900 [thread overview]
Message-ID: <87vehzqwf6.fsf@duaron.myhome.or.jp> (raw)
In-Reply-To: <6EF4DB85-C7D4-445B-B9B5-0D22D5D893CD@kernel.crashing.org> (Kumar Gala's message of "Fri\, 16 Feb 2007 13\:54\:20 -0600")
Kumar Gala <galak@kernel.crashing.org> writes:
> I'm seeing an issue with a stock 2.6.20 kernel running on an embedded
> PPC. I've got a usb flash drive plugged in and the filesystem on the
> drive is vfat. Running with 64M and no swap.
>
> If I execute a series of large (100M+) ftruncate() on the disk the
> kernel will hang and never return. It seems to be stuck in the idle
> loop().
>
> The following is the test program I'm running:
>
> #include <sys/mman.h>
> #include <sys/types.h>
> #include <sys/stat.h>
> #include <fcntl.h>
> #include <stdio.h>
> #include <unistd.h>
> #include <errno.h>
>
> void usage (void)
> {
> printf ("truncate_test <filename> <size>\n\n");
> }
>
> int main(int argc, char *argv[])
> {
> int fd, i;
> int ret = 0;
> unsigned int len;
>
> if (argc != 3) {
> printf("Invalid number of arguments\n\n");
> usage();
> exit(1);
> }
>
> fd = open(argv[1], O_CREAT|O_RDWR|O_TRUNC, S_IRWXU);
> len = strtoul(argv[2], NULL, 0);
>
> ret = ftruncate(fd, len);
>
> if (ret)
> printf ("ftruncate ret = %d %d\n", ret, errno);
>
> close(fd);
>
> return ret;
> }
>
> I usually run the following twice to get the hang state:
>
> time ./trunc_test bar 100000000 &
> time ./trunc_test baz 100000000 &
>
> I was wondering if anyone had any suggestions on what to poke at next
> to try and figure out what is going on.
Can you check /sys/block/xxx/stat or something to make sure there is
no outstanding IO request?
It seems to be no response from the lower layer...
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
next prev parent reply other threads:[~2007-02-18 16:10 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-16 19:54 Kumar Gala
2007-02-18 16:10 ` OGAWA Hirofumi [this message]
2007-02-19 21:58 ` Kumar Gala
2007-02-19 22:19 ` OGAWA Hirofumi
2007-02-19 22:27 ` Kumar Gala
2007-02-20 17:20 ` OGAWA Hirofumi
2007-02-19 22:06 ` Kumar Gala
2007-02-21 20:18 ` OGAWA Hirofumi
2007-02-21 20:57 ` Andrew Morton
2007-02-21 21:22 ` [linux-usb-devel] " Alan Stern
2007-02-21 21:31 ` Andrew Morton
2007-02-21 21:50 ` Alan Stern
2007-02-21 22:54 ` Andrew Morton
2007-02-22 7:40 ` Kumar Gala
2007-02-22 18:20 ` Kumar Gala
2007-02-22 21:57 ` Andrew Morton
[not found] <fa.bxsB54F+7+006rE+o/VWUj5keQk@ifi.uio.no>
2007-02-16 23:10 ` Robert Hancock
2007-02-17 5:05 ` Kumar Gala
[not found] ` <fa.zK5W70l1vhk1YNxuwxFwZ8t1uIs@ifi.uio.no>
[not found] ` <fa.qFxa41A3LU3cQ19L+5DTEFMtCEY@ifi.uio.no>
2007-02-20 5:28 ` Robert Hancock
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vehzqwf6.fsf@duaron.myhome.or.jp \
--to=hirofumi@mail.parknet.co.jp \
--cc=galak@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--subject='Re: 2.6.20 kernel hang with USB drive and vfat doing ftruncate' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).