Dr Watson fails with more than 25 threads on windows 2003 web server edition?



Is this a known fault in Dr Watson/ Windows 2003 web sever edition?

Using this sample code, if an application
has more than 25 threads it fails to generate dr watson
information. The Dr Watson log just contains:

D:\>del c:\windows\drwtsn32.log
D:\>threads 29
Creating 29 threads
D:\>type c:\windows\drwtsn32.log

Microsoft (R) DrWtsn32
Copyright (C) 1985-2002 Microsoft Corp. All rights reserved.


And that's it, no back trace, the same code with 10 threads works
perfectly and generates a full stack back trace in the dr watson log

Is this a known dr watson fault in windows 2003 ? Or is it a setting
somewhere ? Or ... have I done something wrong below. I'm really
mystified, surely someone else has wanted to debug an application with
more than 25 threads on windows 2003 :)

Here is the code sample:

#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <windows.h>
#include <process.h>

int __stdcall fn(void *x)
for (;TRUE;) {
} // lost handle but never exits so this is ok.

int th_new(int (__stdcall *fn)(void *p1), void *arg)
unsigned long h;
if (_beginthreadex(NULL,64000, (LPTHREAD_START_ROUTINE) fn ,(void *)
arg,0,&h)==0) {
printf("Thread creation failed %s\n",strerror(errno));
return FALSE;
} return TRUE;
int main(int argc, char *argv[])
int k;
char *s=NULL;
int n = atoi(argv[1]);
if (n==0) n = 30;
printf("Creating %d threads\n",n);
for (k=0; k<n; k++) th_new(fn,NULL);
*s = 1;


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question