low_level_output() asserting with "No chained buffers"

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
BeOl_4470266
Level 3
Level 3
25 replies posted 10 replies posted 10 sign-ins

Hello,

I've noticed that, when trying to send data continuously as fast as possible for several minutes, I end up hitting the following assertion "No chained buffers".

 

static err_t low_level_output( struct netif *netif, /*@only@*/ struct pbuf *p )
{
    /*@-noeffect@*/
    UNUSED_PARAMETER( netif );
    /*@+noeffect@*/

    if ( ( (wiced_interface_t) netif->state  == WICED_ETHERNET_INTERFACE ) ||
         ( wwd_wifi_is_ready_to_transceive( (wwd_interface_t) netif->state ) == WWD_SUCCESS ) )
    {
        /* Take a reference to this packet */
        pbuf_ref( p );

        LWIP_ASSERT( "No chained buffers", ( ( p->next == NULL ) && ( ( p->tot_len == p->len ) ) ) );
        wwd_network_send_ethernet_data( p, (wwd_interface_t) netif->state );

        LINK_STATS_INC( link.xmit );

        return (err_t) ERR_OK;
    }
    else
    {
        /* Stop lint warning about packet not being freed - it is not being referenced */ /*@-mustfree@*/
        return (err_t) ERR_INPROGRESS; /* Note that signalling ERR_CLSD or ERR_CONN causes loss of connectivity on a roam */
        /*@+mustfree@*/
    }
}

 

  

Do you know what sort of problem would lead to that?

Thanks for your help,

Ben

0 Likes
1 Solution
AxLi_1746341
Level 7
Level 7
10 comments on KBA 5 comments on KBA First comment on KBA

The fact is lwIP can chain buffers (and you cannot avoid lwIP to do that).
WWD does not support chained buffers, so if you hit this assertion it's clearly a bug.
The WWD needs to take care of handling chained buffers.

View solution in original post

9 Replies
Aditi_B
Moderator
Moderator
Moderator
500 replies posted 5 questions asked 250 replies posted

Hi,

Can you provide some more information in detail on what is the application doing to better understand the issue? Also, provide some info such as how much data are you transmitting? what is the frequency of this issue? Does it occur at regular intervals after specific amount of time or at any intervals to reproduce this issue at our end?

Thanks

Aditi

0 Likes

Hi,

It seems to happen at random moments during transmissions, it probably happens once every 10 minutes or so, but the interval is not regular.

The product transmits around 1 kB/s . 

Thanks for your help,

Ben

0 Likes
Aditi_B
Moderator
Moderator
Moderator
500 replies posted 5 questions asked 250 replies posted

Hi,

Thanks for the reply. Can you share your code example or provide us with some pointers to reproduce this issue on our side?

Thanks
Aditi

0 Likes

Hi Aditi,

I'll see what can be shared.

I understand it won't be easy for you to debug this remotely, but I was more interested into some knowledge on the following:

1. What is this assertion related to, what sort of error does it suggest?

2. Are there typical mistakes that lead to it?

3. Is there any part I can look at to investigate the issue while the assertion has triggered?

 

Thanks for your help,

Ben

0 Likes

Hi Aditi,

Could it be that WWD doesn't support the chained buffers of LwIP?

Thanks for your help,

Best regards,

Ben

0 Likes
Aditi_B
Moderator
Moderator
Moderator
500 replies posted 5 questions asked 250 replies posted

Hi,

I'm checking this issue with the internal team and will revert back to you on this. Can you try slowing the rate of data transmission and tell us whether you hit the assert in that case?

Thanks

Aditi

0 Likes

Hi,

Can you confirm if the Chained Buffers feature of LwIP is supported by WWD?

Mechanically, when the throughput is slowed down, there are less transmissions, less chances for the bug to happen: I do see it less often.

Thanks for your support,

Ben

0 Likes
AxLi_1746341
Level 7
Level 7
10 comments on KBA 5 comments on KBA First comment on KBA

The fact is lwIP can chain buffers (and you cannot avoid lwIP to do that).
WWD does not support chained buffers, so if you hit this assertion it's clearly a bug.
The WWD needs to take care of handling chained buffers.

Aditi_B
Moderator
Moderator
Moderator
500 replies posted 5 questions asked 250 replies posted

Hi,

Yes, the WWD in case of lwIP doesn't support buffer chaining. This feature haven't been enabled and tested. Sorry, for the inconvenience caused.

Thanks

Aditi

 

0 Likes