[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c
From: |
Martin . Glunz |
Subject: |
[lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c |
Date: |
Thu, 09 Jan 2003 00:09:25 -0000 |
Quoting address@hidden:
>
> Hello Martin,
>
> > There is another problem in etharp.c:
> > If a packet gets queued because an ARP request must be sent,
> > pbuf_ref() is called for this packet. This is ok so far, but
> > if the queued pbuf is chained, the chain may get lost later,
> > but before the packet is resent. I´ve fixed this in
> > pbuf_dechain() in pbuf.c.
> >
> I do not understand what you mean exactly.
>
> Could you please describe a sequence of events that would
> trigger this bug to occur?
>
I've noticed this when I tried to send UDP Packets using
netbuf_ref(). netbuf_ref() chains the referenced buffer
to the pbuf that contains the IP header. So the packet to
be sent consists of two chained pbufs.
When netif_output() returns to the caller, this pbuf is
dechained and freed. The dechaining breaks the chain to
the real payload, so this won´t be sent when the packet
is resent, only the IP header is sent.
One of my first posts in this mailing list contains code
that triggers this bug:
http://www.sics.se/mailing-lists/lwip.html/msg01597.html
look at the lines between #else and #endif
The memory leak I mentioned there does not appear in the CVS version.
[This message was sent through the lwip discussion list.]
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, (continued)
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Jani Monoses, 2003/01/08
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, leon . woestenberg, 2003/01/08
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Martin Glunz, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Leon Woestenberg, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Martin . Glunz, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Martin Glunz, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, leon . woestenberg, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Adam Dunkels, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, leon . woestenberg, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Jani Monoses, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c,
Martin . Glunz <=
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, leon . woestenberg, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Martin Glunz, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Jani Monoses, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, leon . woestenberg, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, leon . woestenberg, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Leon Woestenberg, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Martin . Glunz, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Martin Glunz, 2003/01/09
- [lwip-users] Re: [lwip] Memory leak and queued packets in etharp.c, Jani Monoses, 2003/01/09