enmonster
enmonster

注册于 3 years ago

回答
0
文章
0
关注者
0

知道原因了,非字符串打印需要用dump打印

whj467467222 发表于 2019-11-9 16:54
那这个应该是某个优先级大于finsh的任务 里面有了死循环 导致finsh 无法被执行到 ...


感谢,的确是,有个线程delay位置写错了导致一致处于运行钟状态

WillianChan 发表于 2019-8-23 09:42
感谢楼主的分享,这里还有一篇也是定位内存泄漏的“骚操作”文章,值得学习:https://www.rt-thread.org/qa ...


的确很好

tyustli 发表于 2019-7-19 08:47
楼主使用的是哪一个版本的呢?最新的 master 版本试了一下是没有问题的,可以使用:scons -c 清除一下,再 ...


最新master 不行, 就canfestival不行

yangjie 发表于 2019-3-13 16:19
https://www.rt-thread.org/qa/forum.php?mod=viewthread&tid=10139&highlight=%E5%88%A0%E9%99%A4

创建的 ...


多谢

liu2guang 发表于 2019-1-23 14:25
加了就超了也很正常,因为从打印信息上看是这样的,不够还有一种可能就是有内存越界,导致你的线程栈空间 ...

系统初始化的时候rt_trace_init 该函数将创建线程的时候挂了一个钩子函数rt_thread_inited_sethook(_cb_thread_inited); 当第一次创建线程的时候调用该钩子函数:
static void _cbSendTaskInfo(const rt_thread_t thread)
{
SEGGER_SYSVIEW_TASKINFO Info;

rt_enter_critical();
rt_memset(&Info, 0, sizeof(Info));
Info.TaskID = (U32)thread;

Info.sName = thread->name;
Info.Prio = thread->current_priority;
Info.StackBase = (U32)thread->stack_addr;
Info.StackSize = thread->stack_size;

SEGGER_SYSVIEW_SendTaskInfo(&Info);
rt_exit_critical();
}
rt_exit_critical(); 函数会进行线程调度, 结果调度出问题了, rt_system_scheduler_start 这个调度器开启函数还未执行就进行了调度, 为啥systemview会这样做呢?

liu2guang 发表于 2019-1-23 12:27
有线程的栈空间配置小了,建议找到对应线程改大


线程栈空间很大了,没加systemview 基本都只占用20%

bernard 发表于 2018-12-25 14:17
信息很多,这个需要你来查了,例如在rt_malloc里判断是否是"tran_task"任务,大小是否是怀疑的。然后下断点 ...


非常感谢熊总,一下就定位出来了

yqiu 发表于 2018-12-25 13:13
可以试试 memtrace


上面就用memtrace打出来的,很多小内存不知道咋出来的,线程里面不会分配这些小内存12字节40字节之类的

很多小内存,很奇怪,自己没有rt_malloc,不知道从哪里来的
memtrace
total memory: 119472
used memory : 46892
maximum allocated memory: 49968

memory heap address:
heap_ptr: 0x20002d10
lfree : 0x20009a28
heap_end: 0x2001ffe0

--memory item information --
[0x20002d10 - 696] NONE
[0x20002fe8 - 152] NONE
[0x200030a0 - 4K] NONE
[0x200040c0 - 48] NONE
[0x20004110 - 48] NONE
[0x20004160 - 48] NONE
[0x200041b0 - 60] NONE
[0x2000420c - 200] NONE
[0x200042f4 - 60] NONE
[0x20004350 - 40] NONE
[0x20004398 - 60] NONE
[0x200043f4 - 40] NONE
[0x2000443c - 60] NONE
[0x20004498 - 40] NONE
[0x200044ReadCertInfo(): bank_id:8b240bb600010001000815d359ad0fe4

efo() 152] NONE
[0x20004598 - 4K] NONE
[0x200055b8 - 152] NONE
[0x20005670 - 4K] NONE
[0x20006690 - 152] NONE
[0x20006748 - 4K] NONE
[0x20007768 - 152] NONE
[0x20007820 - 4K] NONE
[0x20008840 - 88] tshell
[0x200088b8 - 12] tran_task
[0x200088e4 - 60] tran_task
[0x20008940 - 120] tran_task
[0x200089d8 - 12] tran_task
[0x20008a04 - 60] tran_task
[0x20008a60 - 20] tran_task
[0x20008a94 - 24] tran_task
[0x20008acc - 116] tran_task
[0x20008b60 - 12] tran_task
[0x20008b8c - 60] tran_task
[0x20008be8 - 20] tran_task
[0x20008c1c - 12] tran_task
[0x20008c48 - 60] tran_task
[0x20008ca4 - 20] tran_task
[0x20008cd8 - 12] tran_task
[0x20008d04 - 44] tran_task
[0x20008d50 - 512] tran_task
[0x20008f70 - 152] tran_task
[0x20009028 - 2K] tran_task
[0x20009848 - 12] tran_task
[0x20009874 - 76] tran_task
[0x200098e0 - 12] service_mc_task
[0x2000990c - 44] service_mc_task
[0x20009958 - 76] ota_thread
[0x200099c4 - 68] ota_thread
[0x20009a28 - 64]
[0x20009a88 - 12] cad_task_hander
[0x20009ab4 - 60] ota_thread
[0x20009b10 - 60]
[0x20009b6c - 68] TASK_EC20_TRANS
[0x20009bd0 - 124]
[0x20009c6c - 20] cad_task_hander
[0x20009ca0 - 36] TASK_WG219_TRANS
[0x20009ce4 - 116] tran_task
[0x20009d78 - 12] tran_task
[0x20009da4 - 60] tran_task
[0x20009e00 - 40] tran_task
[0x20009e48 - 12] tran_task
[0x20009e74 - 60] tran_task
[0x20009ed0 - 12] tran_task
[0x20009efc - 24] tran_task
[0x20009f34 - 176] tran_task
[0x2000a004 - 12] tran_task
[0x2000a030 - ReadCertInfo(): bank_id:2b9a86d5000100010009401b59ae0af1

6C] tran_task
[0x2000a08c - 20] tran_task
[0x2000a0c0 - 12] tran_task
[0x2000a0ec - 44] tran_task
[0x2000a138 - 12] tran_task
[0x2000a164 - 44] tran_task
[0x2000a1b0 - 512] tran_task
[0x2000a3d0 - 152] tran_task
[0x2000a488 - 2K] tran_task
[0x2000aca8 - 84] tran_task
[0x2000ad1c - 152] tran_task
[0x2000add4 - 152] tran_task
[0x2000ae8c - 152] tran_task
[0x2000af44 - 28] cad_task_hander
[0x2000af80 - 12] tran_task
[0x2000afac - 60] tran_task
[0x2000b008 - 40] tran_task
[0x2000b050 - 12] tran_task
[0x2000b07c - 60] tran_task
[0x2000b0d8 - 12] tran_task
[0x2000b104 - 2K] tran_task
[0x2000b924 - 2K] tran_task
[0x2000c144 - 4K] tran_task
[0x2000d164 - 40] ota_thread
[0x2000d1ac - 44] ota_thread
[0x2000d1f8 - 12] ota_thread
[0x2000d224 - 12] ota_thread
[0x2000d250 - 16] ota_thread
[0x2000d280 - 52] ota_thread
[0x2000d2d4 - 32] cad_task_hander
[0x2000d314 - 60] cad_task_hander
[0x2000d370 - 40] cad_task_hander
[0x2000d3b8 - 56] cad_task_hander
[0x2000d410 - 24] cad_task_hander
[0x2000d448 - 48] cad_task_hander
[0x2000d498 - 32] cad_task_hander
[0x2000d4d8 - 12] cad_task_hander
[0x2000d504 - 60] cad_task_hander
[0x2000d560 - 40] cad_task_hander
[0x2000d5a8 - 32] cad_task_hander
[0x2000d5e8 - 12] cad_task_hander
[0x2000d614 - 60] cad_task_hander
[0x2000d670 - 40] cad_task_hander
[0x2000d6b8 - 12] ota_thread
[0x2000d6e4 - 44] ota_thread
[0x2000d730 - 56] cad_task_hander
[0x2000d788 - 24] cad_task_hander
[0x2000d7c0 - 48] cad_task_hander
[0x2000d810 - 40] cad_task_hander
[0x2000d858 - 36] cad_task_hander
[0x2000d89c - 12] ota_thread
[0x2000d8c8 - 68] ota_thread
[0x2000d92c - 40] cad_task_hander
[0x2000d974 - 16] cad_task_hander
[0x2000d9a4 - 40] cad_task_hander
[0x2000d9ec - 40] cad_task_hander
[0x2000da34 - 12] cad_task_hander
[0x2000da60 - 12] cad_task_hander
[0x2000da8c - 40] cad_task_hander
[0x2000dad4 - 12] cad_task_hander
[0x2000db00 - 44] cad_task_hander
[0x2000db4c - 40] ota_thread
[0x2000db94 - 16] ota_thread
[0x2000dbc4 - 40] ota_thread
[0x2000dc0c - 12] ota_thread
[0x2000dc38 - 68] ota_thread
[0x2000dc9c - 36] cad_task_hander
[0x2000dce0 - 40] cad_task_hander
[0x2000dd28 - 12] ota_thread
[0x2000dd54 - 16] ota_thread
[0x2000dd84 - 12] ota_thread
[0x2000ddb0 - 12] cad_task_hander
[0x2000dddc - 40] cad_task_hander
[0x2000de24 - 12] cad_task_hander
[0x2000de50 - 40] cad_task_hander
[0x2000de98 - 12] cad_task_hander
[0x2000dec4 - 40] cad_task_hander
[0x2000df0c - 12] cad_task_hander
[0x2000df38 - 40] cad_task_hander
[0x2000df80 - 12] cad_task_hander
[0x2000dfac - 40] cad_task_hander
[0x2000dff4 - 12] cad_task_hander
[0x2000e020 - 40] cad_task_hander
[0x2000e068 - 12] cad_task_hander
[0x2000e094 - 40] ota_thread
[0x2000e0dc - 40] ota_thread
[0x2000e124 - 12] ota_thread
[0x2000e150 - 44]
[0x2000e19c - 40] cad_task_hander
[0x2000e1e4 - 40] cad_task_hander
[0x2000e22c - 40] cad_task_hander
[0x2000e274 - 12] cad_task_hander
[0x2000e2a0 - 40] cad_task_hander
[0x2000e2e8 - 12] cad_task_hander
[0x2000e314 - 60] cad_task_hander
[0x2000e370 - 272]
[0x2000e4a0 - 12] cad_task_hander
[0x2000e4cc - 40] cad_task_hander
[0x2000e514 - 12] cad_task_hander
[0x2000e540 - 40] cad_task_hander
[0x2000e588 - 12] cad_task_hander
[0x2000e5b4 - 40] cad_task_hander
[0x2000e5fc - 12] cad_task_hander
[0x2000e628 - 40] cad_task_hander
[0x2000e670 - 12] cad_task_hander
[0x2000e69c - 40] cad_task_hander
[0x2000e6e4 - 12] cad_task_hander
[0x2000e710 - 70K]

flyboy 发表于 2018-10-18 12:46
你居然写了一个服务器,也是很强,不过作业上不是说实现一个客户端吗。。。 ...


哈哈,没仔细审题;P

flyboy 发表于 2018-10-12 08:52
那是 log 颜色的代码,vscode 不支持颜色显示,所以就好像是乱码,

你用 env 运行就能看到 log 的颜色不同 ...


那怎么设置终端为黑白显示呢?

发布
问题