From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4BFF6566.1070000@bouyapop.org> Date: Fri, 28 May 2010 08:40:38 +0200 From: Philippe Anel User-Agent: Thunderbird 2.0.0.24 (X11/20100318) MIME-Version: 1.0 To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [9fans] crashing 9vx Topicbox-Message-UUID: 2bdf63ee-ead6-11e9-9d60-3106f5b1d025 Could not crash with your program, but it crashed quite fast with this one: #include #include #include 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 > #include > > 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++; > } > } > > >