From: stanojr@blackhole.websupport.sk
To: linux-kernel@vger.kernel.org
Subject: quota deadlock
Date: Fri, 12 Nov 2004 18:31:18 +0100 [thread overview]
Message-ID: <20041112173118.GC17928@blackhole.websupport.sk> (raw)
dear developers,
my english sucks, so i'll be brief.
heavy write access to partition with quota enabled causes deadlock. if
processes try to access the deadlocked partition they
simply have no response and cannot be killed with SIGKILL. i've been
testing with reiserfs and ext2 on 2.6.9 kernel.
i made this little code to reproduce the problem:
--
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
int main(int ac,char *av[]) {
int procs,size,i;
procs=atoi(av[1]);
size=atoi(av[2]);
for(i=0;i<procs;i++) {
if (fork()==0) {
int fd;
char buf[65535];
setuid(i);
snprintf(buf,65535,"tmp/%d",i);
fd=open(buf,O_RDWR|O_CREAT|O_TRUNC|O_APPEND,S_IRWXU);
while (1) {
write(fd,buf,size);
}
}
}
}
--
use:
mkdir tmp;chmod 777 tmp;./a 20 4096
this creates 20 processes and every one has setuid to 0..20 trying to
write to tmp/0..20 4096k of crap in loop. after writing some MBs, all
processes just lock.
here is my task list dumped via sysrq and .config file from kernel
2.6.9
http://blackhole.websupport.sk/~stanojr/quotadeadlock/
stanojr
next reply other threads:[~2004-11-12 17:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-12 17:31 stanojr [this message]
2004-11-15 12:20 ` Jan Kara
2004-11-15 13:46 ` stanojr
2004-11-30 0:18 ` Andrew Morton
2004-11-30 12:48 ` stanojr
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=20041112173118.GC17928@blackhole.websupport.sk \
--to=stanojr@blackhole.websupport.sk \
--cc=linux-kernel@vger.kernel.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®