* [ECOS] LWIP thread safety
@ 2007-05-25 0:22 Rob Duncan
0 siblings, 0 replies; only message in thread
From: Rob Duncan @ 2007-05-25 0:22 UTC (permalink / raw)
To: ecos-discuss
I've been running into the following assertion failure when I put a
reasonably high load on the LWIP networking stack:
ASSERT FAIL: <6>pbuf.c[577]pbuf_free() pbuf_free: p->ref > 0
According to the LWIP mailing list archives this is typically the
result of incorrect thread protection. So I've been taking a look at
the way that LWIP is configured in eCos. I've found that the LWIP
parameter SYS_LIGHTWEIGHT_PROT is not defined, which means that the
pbuf allocate and free routines are not protected (instead there is a
half-hearted attempt at some locking with some state variables but
it's quite broken). This means that if these routines are called from
multiple threads (which they are), then its only a matter of time
before the pbuf free list or the pbuf reference counts are corrupted.
So, have I misunderstood the implementation? Have I configured eCos
incorrectly and it ought to be using SYS_LIGHTWEIGHT_PROT? Has anyone
else run into this problem and solved it?
Any help is appreciated.
Thanks,
Rob.
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-05-24 23:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-25 0:22 [ECOS] LWIP thread safety Rob Duncan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).