Subject: crash while forking a million threads
To: None <firstname.lastname@example.org>
From: David Holland <email@example.com>
Date: 11/02/2005 03:05:18
I was just doing some fairly silly timing of pthread_create, and one
of the things I tried was creating a million threads with the
pthread stacksize set to the minimum, 16k. In a 32-bit world this
obviously isn't going to succeed, but that wasn't the point and it's
not worth going into details.
This was interesting only because it crashed the system. And,
naturally, after a reboot it doesn't any more, not even after starting
a bunch of apps to chew up memory. I haven't tried running it
concurrently with twelve copies of Mozilla or anything yet, because
this is my desktop machine and I need it for work. But this isn't the
first time I've had a crash I suspected was triggered by heavy VM
load, so pounding away on a crash machine might be useful. I might try
this if I can find some time.
Platform is i386, -current from Oct. 26, uniprocessor, maxusers 32,
I686_CPU only (PIII), BUFQ_* is off.
The crash was a cold reset, which on i386 means either an MMU triple
fault or a ring 0 stack fault (right? do we have the task gate trick
for trapping stack faults? haven't looked in a while) which might be
useful to know.
I'm not filing a PR because I don't have any other particularly useful
information to offer, but I thought I'd post in case anyone's
interested in anecdotal data.
- David A. Holland / firstname.lastname@example.org