[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Crash when doing stresstest with ppp and sockets/UDP
From: |
Sylvain Rochet |
Subject: |
Re: [lwip-users] Crash when doing stresstest with ppp and sockets/UDP |
Date: |
Thu, 21 Dec 2017 11:28:47 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Hi zulu4711,
On Thu, Dec 21, 2017 at 03:06:14AM -0700, zulu4711 wrote:
>
> Yes, it seems like a threading violation like I had before and this is
> surely because of me not having a full insight to what is legal to call and
> what is not legal to call in the stack when running in threaded mode.
>
> I checked, and I called ppp_close() from another thread than I called
> ppp_input() and I guess thats a big "no-no" ?
Of course it is, almost all ppp_* functions are *NOT* thread safe. You
have to use pppapi_* functions outside the lwIP core thread.
While we are at it, I did not bother reading your code for correctness
on this part, please check your PPP input function, only
pppos_input_tcpip input method is thread safe.
You really should read the PPP documentation.
> It seems that 75% of the problems newcomers like myself is due to
> threading problems.
Because threading is hard, it is really, really hard. This is why each
time you call a function you have to ask yourself whether you are
allowed to call it in this context or not.
On a more general note, that not necessarily apply here, before starting
a project you should ask yourself whether a RTOS is actually necessary,
generally it's not, from a not necessary at all to can be easily avoided
range. Not using an RTOS makes everything an order of magnitude simpler,
despite the overall belief of the contrary.
Sylvain
signature.asc
Description: Digital signature
- [lwip-users] Crash when doing stresstest with ppp and sockets/UDP, zulu4711, 2017/12/20
- Re: [lwip-users] Crash when doing stresstest with ppp and sockets/UDP, zulu4711, 2017/12/20
- Re: [lwip-users] Crash when doing stresstest with ppp and sockets/UDP, zulu4711, 2017/12/20
- Re: [lwip-users] Crash when doing stresstest with ppp and sockets/UDP, zulu4711, 2017/12/20
- Re: [lwip-users] Crash when doing stresstest with ppp and sockets/UDP, Simon Goldschmidt, 2017/12/21
- Re: [lwip-users] Crash when doing stresstest with ppp and sockets/UDP, zulu4711, 2017/12/21
- Re: [lwip-users] Crash when doing stresstest with ppp and sockets/UDP,
Sylvain Rochet <=
- Re: [lwip-users] Crash when doing stresstest with ppp and sockets/UDP, zulu4711, 2017/12/21
- Re: [lwip-users] Crash when doing stresstest with ppp and sockets/UDP, Sylvain Rochet, 2017/12/21
- Re: [lwip-users] Crash when doing stresstest with ppp and sockets/UDP, goldsimon, 2017/12/21
- Re: [lwip-users] Crash when doing stresstest with ppp and sockets/UDP, goldsimon, 2017/12/21
- Re: [lwip-users] Crash when doing stresstest with ppp and sockets/UDP, zulu4711, 2017/12/21