• dpdk 多线程 gdb + master


     1、 main线程没有调用pthread_join

    一、初始化

    1、rte_eal_cpu_init()函数中,通过读取/sys/devices/system/cpu/cpuX/下的相关信息,确定当前系统有哪些CPU核,已经每个核属于哪个CPU Socket。

    2、eal_parse_args()函数,解析-c参数,确认哪些CPU核是可以使用的,以及设置第一个核为MASTER

    [root@localhost ring_test]# gdb ./build/app/dpdk_test 
    GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-119.el7
    Copyright (C) 2013 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later 
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "aarch64-redhat-linux-gnu".
    For bug reporting instructions, please see:
    ...
    ./build/app/dpdk_test: No such file or directory.
    (gdb) set args -c 0x3f
    (gdb) b /data1/dpdk-19.11/lib/librte_eal/linux/eal/eal_thread.c:128
    No symbol table is loaded.  Use the "file" command.
    Make breakpoint pending on future shared library load? (y or [n]) n
    (gdb) quit
    [root@localhost ring_test]# gdb ./build/app/test_ring 
    GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-119.el7
    Copyright (C) 2013 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later 
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "aarch64-redhat-linux-gnu".
    For bug reporting instructions, please see:
    ...
    Reading symbols from /data1/dpdk-19.11/demo/ring_test/build/app/test_ring...done.
    (gdb) set args -c 0x3f
    (gdb)  b /data1/dpdk-19.11/lib/librte_eal/linux/eal/eal_thread.c:128
    Breakpoint 1 at 0x592bf0: file /data1/dpdk-19.11/lib/librte_eal/linux/eal/eal_thread.c, line 128.
    (gdb) r
    Starting program: /data1/dpdk-19.11/demo/ring_test/./build/app/test_ring -c 0x3f
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib64/libthread_db.so.1".
    EAL: Detected 128 lcore(s)
    EAL: Detected 4 NUMA nodes
    [New Thread 0xffffbe43d910 (LWP 70068)]
    EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
    [New Thread 0xffffbdc2d910 (LWP 70069)]
    EAL: Selected IOVA mode 'PA'
    EAL: No available hugepages reported in hugepages-2048kB
    EAL: Probing VFIO support...
    EAL: VFIO support initialized
    [New Thread 0xffffbd40d910 (LWP 70070)]
    [Switching to Thread 0xffffbd40d910 (LWP 70070)]
    
    Breakpoint 1, eal_thread_loop (arg=0x0) at /data1/dpdk-19.11/lib/librte_eal/linux/eal/eal_thread.c:133
    133                             n = read(m2s, &c, 1);
    (gdb) bt
    #0  eal_thread_loop (arg=0x0) at /data1/dpdk-19.11/lib/librte_eal/linux/eal/eal_thread.c:133
    #1  0x0000ffffbe617d38 in start_thread (arg=0xffffbd40d910) at pthread_create.c:309
    #2  0x0000ffffbe55f5f0 in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:91
    (gdb) n
    [New Thread 0xffffbcbfd910 (LWP 70071)]
    [Switching to Thread 0xffffbcbfd910 (LWP 70071)]
    
    Breakpoint 1, eal_thread_loop (arg=0x0) at /data1/dpdk-19.11/lib/librte_eal/linux/eal/eal_thread.c:133
    133                             n = read(m2s, &c, 1);
    (gdb) n
    [New Thread 0xffffbc3ed910 (LWP 70079)]
    [Switching to Thread 0xffffbc3ed910 (LWP 70079)]
    
    Breakpoint 1, eal_thread_loop (arg=0x0) at /data1/dpdk-19.11/lib/librte_eal/linux/eal/eal_thread.c:133
    133                             n = read(m2s, &c, 1);
    (gdb) n
    [New Thread 0xffffbbbdd910 (LWP 70084)]
    [Switching to Thread 0xffffbbbdd910 (LWP 70084)]
    
    Breakpoint 1, eal_thread_loop (arg=0x0) at /data1/dpdk-19.11/lib/librte_eal/linux/eal/eal_thread.c:133
    133                             n = read(m2s, &c, 1);
    (gdb) n
    [New Thread 0xffffbb3cd910 (LWP 70087)]
    [Switching to Thread 0xffffbd40d910 (LWP 70070)]
    
    Breakpoint 1, eal_thread_loop (arg=0x0) at /data1/dpdk-19.11/lib/librte_eal/linux/eal/eal_thread.c:133
    133                             n = read(m2s, &c, 1);
    (gdb) n
    [Switching
  • 相关阅读:
    吴恩达老师机器学习课程笔记 04 多元线性回归
    Android中的六大基本布局
    golang设计模式——命令模式
    Cpp知识点系列-类型转换
    SpringBoot读取properties中配置的List集合
    Git 21 天打卡:day09-day21汇总
    Python基础教程(三十一):pyecharts模块
    iOS 项目避坑:多个分类中方法重复实现检测
    云计算、大数据技术的智慧工地,实现对建筑工地实时监测、管理和控制的一种新型建筑管理方式
    小米路由器青春版(R1CL)刷高恪软路由系统
  • 原文地址:https://blog.csdn.net/lingshengxiyou/article/details/127893861