bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bugs #9798] DO does not work in multithreaded program if lots of thread


From: Willem Rein Oudshoorn
Subject: [bugs #9798] DO does not work in multithreaded program if lots of threads are created
Date: Wed, 28 Jul 2004 06:01:34 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5a) Gecko/20030718

This mail is an automated notification from the bugs tracker
 of the project: GNUstep.




/**************************************************************************/
[bugs #9798] Full Item Snapshot:

URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=9798>
Project: GNUstep
Submitted by: Willem Rein Oudshoorn
On: Wed 07/28/2004 at 09:57

Category:  Base/Foundation
Severity:  5 - Average
Item Group:  Bug
Resolution:  None
Assigned to:  None
Status:  Open


Summary:  DO does not work in multithreaded program if lots of threads are 
created

Original Submission:  If DO are used to communicate between threads and
lots of threads are created DO will stop functioning.
This is demonstrated in the attached program.

As far as I can tell the following is happening.

The crash/exception is caused by the fact
that the number of file descriptors we are
waiting for in the select call is larger than the
OS limit FD_SETSIZE (=64). 

These file descriptors are used in the main thread listening
to the request from the other threads.
So this is to be expected if we have 64 threads talking
to the main thread at the same time.
But even at any given time no more than 2 threads exists,
the problem is still there.   It seems that if a thread
is finished, the main thread does not know that it can 
stop listening and keeps the GSTcpHandles around. 

Unfortunately I am a little bit lost in the DO code,
so I hope someone has some idea how to solve this.

BTW:  I have only tested this on MinGW.  So it could
be MinGW specific.

Wim Oudshoorn.






File Attachments
-------------------

-------------------------------------------------------
Date: Wed 07/28/2004 at 09:57  Name: nsconnection-test.tar.gz  Size: 1.02KB   
By: wim
Program to reproduce the crash
http://savannah.gnu.org/bugs/download.php?item_id=9798&amp;item_file_id=1540






For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=9798>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/







reply via email to

[Prev in Thread] Current Thread [Next in Thread]