• 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
  • 相关阅读:
    写文档是件大事情,怎么弄好它?
    JS: 运算符
    使用 Alice inspector 和 Dio 进行 Flutter API 日志记录
    『手撕Vue-CLI』拉取模板名称
    elementUi实现动态表格单元格合并span-method方法
    二维码智慧门牌管理系统:智能生活的新选择
    SIP对讲应用
    什么是ElasticSearch的深度分页问题?如何解决?
    .NET6项目连接数据库方式方法
    Docker的使用
  • 原文地址:https://blog.csdn.net/lingshengxiyou/article/details/127893861