金牌会员
- 积分
- 2280
- 金钱
- 2280
- 注册时间
- 2013-12-16
- 在线时间
- 448 小时
|
10金钱
我自制PCB,STM32F407+4M SRAM+DP83848,运行LWIP+UCOS II,没有见面操作,只运行MODBusTCP+TCP Server,MODBusTCP PC客户端每200ms刷新一次数据,TCPServer每2S发送4880字节,TCPServer PC客户端每秒发送一次确认数据"ACK",运行20小时左右出现以下错误,但还能继续运行.数据刷新正常.
Assertion "tcp_write: valid queue length" failed at line 683 in ..\LWIP\lwip-1.4.1\src\core\tcp_out.c
Assertion "pcb->snd_queuelen >= pbuf_clen(next->p)" failed at line 1020 in ..\LWIP\lwip-1.4.1\src\core\tcp_in.c
Assertion "pbuf_free: p->ref > 0" failed at line 650 in ..\LWIP\lwip-1.4.1\src\core\pbuf.c
Assertion "pbuf_free: p->ref > 0" failed at line 650 in ..\LWIP\lwip-1.4.1\src\core\pbuf.c
Assertion "pbuf_free: p->ref > 0" failed at line 650 in ..\LWIP\lwip-1.4.1\src\core\pbuf.c
Assertion "pbuf_free: p->ref > 0" failed at line 650 in ..\LWIP\lwip-1.4.1\src\core\pbuf.c
Assertion "pbuf_free: p->ref > 0" failed at line 650 in ..\LWIP\lwip-1.4.1\src\core\pbuf.c
运行4天左右出现以下错误,LWIP挂掉了,看门狗进行重启了
Assertion "pcb->snd_queuelen >= pbuf_clen(next->p)" failed at line 1020 in ..\LWIP\lwip-1.4.1\src\core\tcp_in.c
Assertion "pbuf_free: p->ref > 0" failed at line 650 in ..\LWIP\lwip-1.4.1\src\core\pbuf.c
Assertion "tcp_input: pcb->next != pcb (before cache)" failed at line 182 in ..\LWIP\lwip-1.4.1\src\core\tcp_in.c
Assertion "tcp_input: pcb->next != pcb (after cache)" failed at line 188 in ..\LWIP\lwip-1.4.1\src\core\tcp_in.c
检查LWIP代码其中对pcb->snd_queuelen >= pbuf_clen(next->p)和 pcb->next != pcb (after cache)虽然有报错提示,但代码中并未对该异常进行纠错处理,仍然按照正常情况执行,这种情况下势必会最终导致崩溃,不知道为什么?
测试多次,历时一个月了,最长不超过5天,最短3天就出现重启,不知道问题在哪里?请大侠提供一点思路,谢谢了.
|
最佳答案
查看完整内容[请看2#楼]
我现在放弃UCOS+LWIP组合了,因为没有时间去一点点调试了,我采用RTX + RL-TCPnet组合实现了,MDK提供很多RL-TCPnet中间件,目前已经很稳定了,连续1个月不会掉线,不会重启
|