RT-Thread / RT-Thread/rt-thread

LWIP_ASSERT("pbuf_free: p->ref > 0", p->ref > 0);断言失败

Open
#568 17 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.