RSPlib Discussions

Text archives Help


Re: [RSPlib-Discusssion] timeout for ext_select()


Chronological Thread 
  • From: Thomas Dreibholz <dreibh AT exp-math.uni-essen.de>
  • To: "Marjan Bozinovski" <marjanb AT cpk.auc.dk>
  • To: rsplib-discussion AT sctp.de
  • Subject: Re: [RSPlib-Discusssion] timeout for ext_select()
  • Date: Fri Nov 29 11:32:01 2002
  • List-id: RSPlib Discussions <rsplib-discussion.sctp.de>

On 29 Nov 2002 10:57 CET you wrote:

> Hi,
>
> I have two problems related to (I guess!) ext_select(). Here are the
> descriptions of both.
>
> 1. I set the timeout for ext_select() and call it. Normally, messages are
> coming to the listening socket. This is a piece of the code:
>
> --------------------------------------------------------------------------------
>
> timeout1.tv_sec = 0;
> timeout1.tv_usec = 100000; //100 ms
>
> #ifndef NO_RSP
> result = rspSelect(n1 1, &readfdset, NULL, NULL, &timeout1);
> #else
> result = ext_select(n1 1, &readfdset, NULL, NULL, &timeout1);
> #endif
>
> --------------------------------------------------------------------------------
>
> After many repetitions with different timeout values, I concluded that
> ext_select() wake-up is always caused by the timeout and not by data
> arrival. Why is it so?

Are you really sure that data arrives on a socket given in readfdset? What
are the values of result and errno after calling ext_select()?

Please try to reduce the source of your program to a minimal version that
reproduces the problem. Then, send it to me. I will check it on Monday. This
week, I am in München and unable to access our test systems.

>
> 2. I do the same as above, but now there are no incoming messages at all.
> After some time, perhaps about 10-15 minutes later, the following is
> reported on the screen.
>
> --------------------------------------------------------------------------------
>
> Nov 15 12:36:42 iris /kernel: swap_pager: out of swap space
> Nov 15 12:36:42 iris /kernel: swap_pager_getswapspace: failed
>
> --------------------------------------------------------------------------------
>
> After this, the whole X-session crashes. I suppose that again the problem
> is with ext_select().

There looks like a memory leak. If you have access to a Linux system, this
can be easily checked using the Valgrind memory debugger
(http://developer.kde.org/~sewardj/). When I get your source, I will check
it, too.


Best regards

--
Thomas Dreibholz
Universität Essen
Institut für Experimentelle Mathematik





Archive powered by MHonArc 2.6.19+.

Top of page