anchao commented on PR #17564:
URL: https://github.com/apache/nuttx/pull/17564#issuecomment-3673606212
@wangzhi16 Thanks for your excellent analysis, I'll get back to you
tonight.
Regarding the resource leak issue you mentioned this morning, it seems to be
a bug in the message queue's reference counter maintenance. I will resolve it
tonight.
```
nsh> free
total used free maxused maxfree nused nfree name
67108864 1803456 65305408 2501008 65084784 69 3 Umem
nsh> echo leak > /proc/memdump
Memdump leak
PID Size Overhead Sequence Address Backtrace
61 328 192 262 0x7042c2bee000
0x0000000040076f11 0x000000004002849f 0x000000004002935a 0x000000004002551e
0x000000004004a8f2 0x000000004004ad07 0x00000000400a8e32 0x00000000400a9116
0x00000000400a926f 0x000000004009c64c 0x00000000400b6a4f 0x00000000400bb07f
0x000000004002b482 0x000000004014f098
61 328 192 263 0x7042c2bee148
0x0000000040076f11 0x000000004002849f 0x000000004002935a 0x000000004002551e
0x000000004004a8f2 0x000000004004ad07 0x00000000400a8e32 0x00000000400a9116
0x00000000400a926f 0x000000004009c64c 0x00000000400b6a4f 0x00000000400bb07f
0x000000004002b482 0x000000004014f098
Total Blks Total Size
2 656
nsh> poweroff
```
```
$ addr2line -fe nuttx 0x7042c2bee148 0x0000000040076f11 0x000000004002849f
0x000000004002935a 0x000000004002551e 0x000000004004a8f2 0x000000004004ad07
0x00000000400a8e32 0x00000000400a9116 0x00000000400a926f 0x000000004009c64c
0x00000000400b6a4f 0x00000000400bb07f 0x000000004002b482 0x000000004014f098
??
??:0
sched_backtrace
/home/archer/code/nuttx/n8/nuttx/sched/sched/sched_backtrace.c:104
mm_malloc
/home/archer/code/nuttx/n8/nuttx/mm/mm_heap/mm_malloc.c:335 (discriminator 5)
mm_zalloc
/home/archer/code/nuttx/n8/nuttx/mm/mm_heap/mm_zalloc.c:47
zalloc
/home/archer/code/nuttx/n8/nuttx/mm/umm_heap/umm_zalloc.c:72
inode_alloc
/home/archer/code/nuttx/n8/nuttx/fs/inode/fs_inodereserve.c:87
inode_reserve
/home/archer/code/nuttx/n8/nuttx/fs/inode/fs_inodereserve.c:230
file_mq_vopen
/home/archer/code/nuttx/n8/nuttx/fs/mqueue/mq_open.c:290
nxmq_vopen
/home/archer/code/nuttx/n8/nuttx/fs/mqueue/mq_open.c:359
mq_open
/home/archer/code/nuttx/n8/nuttx/fs/mqueue/mq_open.c:505
receiver_thread
/home/archer/code/nuttx/n8/apps/testing/ostest/mqueue.c:174
pthread_startup
/home/archer/code/nuttx/n8/nuttx/libs/libc/pthread/pthread_create.c:61
pthread_start
/home/archer/code/nuttx/n8/nuttx/sched/pthread/pthread_create.c:142
pre_start
/home/archer/code/nuttx/n8/nuttx/arch/sim/src/sim/sim_initialstate.c:54
??
??:0
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]