[Mono-bugs] [Bug 323666] Mono WAPI exceptions (Mono 1.2.3) on Linux

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Nov 1 16:04:01 EDT 2007


https://bugzilla.novell.com/show_bug.cgi?id=323666#c1


Fred Leitz <fred.leitz at gmail.com> changed:

           What    |Removed                                         |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                                        |ASSIGNED
      Info Provider|psingh at fnfr.com                                 |




--- Comment #1 from Fred Leitz <fred.leitz at gmail.com>  2007-11-01 14:04:01 MST ---
Created an attachment (id=181711)
 --> (https://bugzilla.novell.com/attachment.cgi?id=181711)
Test case to create bug

[root at XXXX XXXXX]# cat /etc/redhat-release
CentOS release 4.4 (Final)


 mono --wapi=hps mono-thread-test.exe
collection: 3 sem: 0x4d0297e1
Fileshare hwm: 0

mono mono-thread-test.exe
100 Threads so far...
..
4000 Threads so far...

** (mono-thread-test.exe:5376): WARNING **: CreateThread: error creating thread
handle

** (mono-thread-test.exe:5376): WARNING **:
ves_icall_System_Threading_Thread_Thread_internal: CreateThread error 0x1f
4092

-- Output from a test script in C
/* compile with:   gcc -lpthread -o thread-limit thread-limit.c */
/* originally from: http://www.volano.com/linuxnotes.html */

#include <stdio.h>
#include <unistd.h>
#include <pthread.h>

#define MAX_THREADS 100000
int i;

void run(void) {
  char c;
  if (i < 10)
    printf("Address of c = %u KB\n", (unsigned int) &c / 1024);
  sleep(60 * 60);
}

int main(int argc, char *argv[]) {
  int rc = 0;
  pthread_t thread[MAX_THREADS];
  printf("Creating threads ...\n");
  for (i = 0; i < MAX_THREADS && rc == 0; i++) {
    rc = pthread_create(&(thread[i]), NULL, (void *) &run, NULL);
    if (rc == 0) {
      pthread_detach(thread[i]);
      if ((i + 1) % 100 == 0)
        printf("%i threads so far ...\n", i + 1);
    }
    else
      printf("Failed with return code %i creating thread %i.\n",
             rc, i + 1);
  }
  exit(0);
}


100 threads so far ...
..
32700 threads so far ...
Failed with return code 12 creating thread 32760.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list