RT-Thread / RT-Thread/rt-thread
LWIP_ASSERT("pbuf_free: p->ref > 0", p->ref > 0);断言失败
Open
Nobody has claimed this yet.
bug
- Dominant language
- C
- Stars
- 12.2k
- Forks
- 5.4k
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 40
Description
只要启用lwip,终端就会不断打印出:
pbuf_free: p->ref > 0
Assertion: 650 in ....\components\net\lwip-head\src\core\pbuf.c, thread tcpip
最终定位到pbuf.c中的LWIP_ASSERT("pbuf_free: p->ref > 0", p->ref > 0);断言失败导致的。
这应该是一个已经释放的pbuf被再次释放引起的。请修复这一问题。
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in components/net/lwip-head/src/core/pbuf.c at the pbuf_free assertion and trace pbuf ownership through the tcpip thread in the reported LWIP-enabled scenario. Confirm which path releases the same pbuf twice, then verify that the assertion no longer recurs under the same workload.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100