From: Philippe Anel <xigh@bouyapop.org>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] crashing 9vx
Date: Fri, 28 May 2010 08:40:38 +0200 [thread overview]
Message-ID: <4BFF6566.1070000@bouyapop.org> (raw)
In-Reply-To: <AANLkTik6dc_WGvObAH_fWSdnHuDY8hBM0ElT5Yw7bzl4@mail.gmail.com>
Could not crash with your program, but it crashed quite fast with this one:
#include <u.h>
#include <libc.h>
#include <thread.h>
enum {
NPROC=10,
};
void
crproc(void * p)
{
int i = (int)p;
while (1) {
int fd;
char *name = smprint("/tmp/%d", i);
fd = create(name, OWRITE, 0666);
if (fd < 0) exits(nil);
// free(name);
close(fd);
i += NPROC;
}
}
void
threadmain(int, char**)
{
for (int n = 0; n < NPROC-1; n++)
proccreate(crproc, (void *)n, 4096);
crproc((void *) (NPROC-1));
}
ron minnich wrote:
> I'm trying to create a reproducer. This little gem does crash it
> frequently. Note that tar and mk install are doing lots of creates too
> -- you're welcome to try this.
>
> term% cat lotsafiles.c
> #include <u.h>
> #include <libc.h>
>
> void
> main(int, char**)
> {
> int i = 0;
> while (1) {
> int fd;
> char *name = smprint("/tmp/%d", i);
> fd = create(name, OWRITE, 0666);
> if (fd < 0) exits(nil);
> close(fd);
> i++;
> }
> }
>
>
>
next prev parent reply other threads:[~2010-05-28 6:40 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-28 4:10 ron minnich
2010-05-28 6:40 ` Philippe Anel [this message]
2010-05-28 8:13 ` Philippe Anel
2010-05-28 8:24 ` Philippe Anel
2010-05-28 15:10 ` ron minnich
2010-05-28 15:15 ` Philippe Anel
2010-05-28 15:24 ` ron minnich
2010-05-28 18:36 ` Charles Forsyth
2010-05-28 19:31 ` Philippe Anel
2010-05-28 20:46 ` ron minnich
2010-05-28 21:00 ` erik quanstrom
2010-05-29 3:39 ` ron minnich
2010-05-29 4:05 ` EBo
2010-05-29 5:13 ` ron minnich
2010-05-29 5:45 ` EBo
2010-05-29 4:09 ` erik quanstrom
2010-05-29 5:10 ` ron minnich
2010-05-30 14:46 ` Brian L. Stuart
2010-05-30 15:52 ` ron minnich
2010-05-30 15:59 ` Philippe Anel
2010-05-30 16:30 ` erik quanstrom
2010-05-31 1:33 ` Brian L. Stuart
2010-05-30 17:08 ` Bakul Shah
2010-05-31 1:14 ` Brian L. Stuart
2010-05-31 2:01 ` ron minnich
2010-05-31 16:32 ` ron minnich
2010-05-31 17:48 ` jake
2010-05-31 18:16 ` EBo
2010-05-31 20:46 ` Jorden M
2010-06-01 11:14 ` Charles Forsyth
2010-06-02 16:40 ` ron minnich
2010-05-29 5:47 ` EBo
2010-10-28 14:00 yy
2010-10-28 14:47 ` Lucio De Re
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=4BFF6566.1070000@bouyapop.org \
--to=xigh@bouyapop.org \
--cc=9fans@9fans.net \
/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;
as well as URLs for NNTP newsgroup(s).