lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #19167] tcp timeout handler can cause crash being invo


From: Dmitry Potapov
Subject: [lwip-devel] [bug #19167] tcp timeout handler can cause crash being invoked by sys_sem_wait()
Date: Wed, 28 Feb 2007 22:40:00 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.10) Gecko/20070216 Firefox/1.5.0.10

Follow-up Comment #9, bug #19167 (project lwip):

Another problem Andreas Becker's proposal is that timeout handler can  be
invoked before the actual timeout expired. Here is what happens:
1. call to sys_mbox_fetch(), which remebers the current in
timeouts->remember
2. get blocked ona  semaphore or by sys_msleep()
3. do some job and add insert a new timeout handler
4. call to sys_mbox_fetch() again

In this case, timeout will be measured incorrectly from the moment #1. which
may be significantly earlier than #3 and as result the timeout will be
expired much earlier than it should.

So, it seems, the only reliable solution is to use 'expires' timestamp in the
timeout queue.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?19167>

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





reply via email to

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