buglwIP - A Lightweight TCP/IP stack - Bugs: bug #23835, Bug in PPP.(Using sys_msleep() in...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #23835: Bug in PPP.(Using sys_msleep() in pppOverSerialOpen())

Submitter:  Alexander Drozd <alx_d>
Submitted:  Sun 13 Jul 2008 12:31:25 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Invalid
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Planned Release:  None
lwIP version:  CVS Head

Tue 15 Jul 2008 11:51:24 AM UTC, comment #3: 

Thanks both of you, Simon and Frederic. Really, I had no realisation timeouts for not lwIP threads as in my project it is a lot of the threads which have been not connected with lwIP). They are not created by sys_thread_new (). While I used  linkStatusCB in PPP this problem was not shown. Now I have changed sys_arch and all certainly works remarkably. If interestingly I attach sys_arch for FreeRTOS.

(file #16123, file #16124)

Alexander Drozd <alx_d>
Mon 14 Jul 2008 07:54:38 PM UTC, comment #2: 

The changelog comment of 2007-05-22 says:
'Now, users SHOULD NOT use internal lwIP features like "sys_timeout" in their application threads.'

The reason for this is it lead to too many threading issues for users using the sys_timeout() function.

However, PPP is an internal part of lwIP and thus may use internal lwIP features! If you have a problem, I'd also suggest to take a look at your port's implementation of the sys_arch_timeouts() function.

Simon Goldschmidt <goldsimon>
Group administrator
Sun 13 Jul 2008 01:20:38 PM UTC, comment #1: 

sys_arch.txt says about "sys_arch_timeouts" : "...This function is called by the lwIP timeout scheduler and must not return a NULL value."

So, even if the function which call directly or indirectly "sys_arch_timeouts" is not created by "sys_thread_new", you have a provide a valid return to this call. In fact, "sys_thread_new" is just here to provide a system-independant call for lwIP core.

If the "sys_arch_timeouts" implementation in your port returns NULL for thread which are not created by "sys_thread_new" - which is the bug to my point of view - you should fix it, or call pppOverSerialOpen from a "lwip" thread.



Frédéric Bernon <fbernon>
Group Member
Sun 13 Jul 2008 12:31:25 PM UTC, original submission:  

Function pppOverSerialOpen() uses function sys_msleep(..) , but function sys_msleep() uses sys_sem_wait_timeout () that in turn  uses sys_timeout ().
The bug consists in that the thread calling function pppOverSerialOpen with linkStatusCB ==0 (callback not used), is not thread lwIP and does not contain timeouts(changelog 2007-05-22 Frйdйric Bernon). It is true for functions pppOverSerialOpen(), pppOverEthernetOpen(), pppClose().

Alexander Drozd <alx_d>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #16123:  sys_arch.c added by alx_d (12KiB - text/plain)
file #16124:  sys_arch.h added by alx_d (2KiB - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by fbernon (Posted a comment)
  • -email is unavailable- added by alx_d (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-07-15 alx_d Attached File- Added sys_arch.c, #16123
        Attached File- Added sys_arch.h, #16124
    2008-07-14 goldsimon StatusNone Invalid
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code