[omniORB] Cannot start threads
Carlos
carlos at canama.net
Thu Nov 27 12:39:26 GMT 2003
Pánczél Levente wrote:
> Hi everyone!
>
> I use OmniORB4 in a server application which frequently creates/deletes threads. I got aware of omniORB not working correctly. As I tried to figure out what happened I found that omniORB was not able to create worker threads. More confusing was, as I found that after a point not only the omniORB subsystem but none of the threads of my server was able to start a thread. All requests to pthread_create return errno 11 (something like EWOULDBLOCK) saying "resource temporarily unavailable" wich state is quite static. Could anyone give me a hint about the reasons for this behavior and wheter my code or omniORB or both together are causing these syndromes?
> I will start a session with a omniORB trace 40 but it takes hours to catch this bug.
>
> Thanks in advance.
>
> Levente, Panczel
>
> PS: part of a log of cerr:
> omniORB: Cannot create a worker for this endpoint: giop:tcp:10.10.10.66:36806 from giop:tcp:10.10.10.66:52202
> omniORB: Cannot create a worker for this endpoint: giop:tcp:10.10.10.66:36806 from giop:tcp:10.10.10.66:52203
> <11.27. 10:44:45> Couldn't create terminal thread (11).
> <11.27. 10:44:45> Threadless terminal object deleted.
> omniORB: Cannot create a worker for this endpoint: giop:tcp:10.10.10.66:36806 from giop:tcp:10.10.10.66:52204
> omniORB: Cannot create a worker for this endpoint: giop:tcp:10.10.10.66:36806 from giop:tcp:10.10.10.66:52205
> <11.27. 10:44:48> Couldn't create terminal thread (11).
> <11.27. 10:44:48> Threadless terminal object deleted.
> <11.27. 10:44:50> Couldn't create terminal thread (11).
> <11.27. 10:44:50> Threadless terminal object deleted.
>
> _______________________________________________
> omniORB-list mailing list
> omniORB-list at omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list
>
>
I've seen in info libc-doc:
Macro: int EAGAIN
Resource temporarily unavailable; the call might work if you try
again later. The macro `EWOULDBLOCK' is another name for `EAGAIN';
they are always the same in the GNU C library
and
*Portability Note:* In many older Unix systems, this condition
was indicated by `EWOULDBLOCK', which was a distinct error
code different from `EAGAIN'. To make your program portable,
you should check for both codes and treat them the same.
and
This function (pthread_create) may return the following errors:
`EAGAIN'
Not enough system resources to create a process for the new
thread, or more than `PTHREAD_THREADS_MAX' threads are
already active.
so I think that your application is using all the threads.
Are you deleting threads properly?
Best wishes.
Carlos.
More information about the omniORB-list
mailing list