[vtkusers] help! wierd pthread error..?
tom fogal
tfogal at apollo.sr.unh.edu
Thu May 27 13:15:13 EDT 2004
Louis,
pthread_create() returns 11 (which is EAGAIN) when it can't create a new
thread. This probably means you have exhausted the number of available
threads on your system.
Since you're in an infinite loop, you're probably not 'join'ing each
thread and thus you run out of thread resources. POSIX threads are
created joinable by default, and this means you must pthread_join()
on every thread you pthread_create() or you will cause a resource leak
and run into problems like you're seeing now.
Maybe this is a bug in vtkMultiThreader or something that uses it, but
I suspect you're just not deleting an object after it is done use, and
that object creates a thread in its constructor and 'frees' (aka
pthread_join()s on it) in its destructor.
HTH,
-tom
<BAY99-F15pV2YvW7siQ0002547a at hotmail.com>"Louis Desjardins" writes:
>Hi VTK Experts,
>
>My program will run perfectly - doing its thing, loop after loop (its in an
>infinite loop just rendering something over and over), but then after about
>5 or 10 minutes of running, SUDDENLY out of the blue - it stops! And I get
>the following error:
>
>ERROR: In /usr/local/src/vtk/vtksrc/Common/vtkMultiThreader.cxx, line 353
>vtkMultiThreader (0xe8ebb48): Unable to create a thread. pthread_create()
>returned 11
>
>Does anyone know any general reason why this might occur?
>Thank you very much...!!!
>
>_________________________________________________________________
>MSN Toolbar provides one-click access to Hotmail from any Web page FREE
>download! http://toolbar.msn.click-url.com/go/onm00200413ave/direct/01/
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list