• 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
  • 相关阅读:
    linux如何运行c程序命令
    scipy Matlab-style IIR 滤波器设计下(Elliptic \Bessel \IIR-notch\IIR-peak\IIR-comb)
    WPF主窗体调用 User32的SetWindowPos 设置窗体置顶会导致与其他窗体抢夺焦点的问题
    多人协作多版本开发冲突的正确解决姿势
    Centos 8升级到 Centos Stream
    网络连接Android设备
    python基于django的高校奖学金管理系统
    大数据平台之元数据
    原生AJAX
    CSS-浮动,定位
  • 原文地址:https://blog.csdn.net/lingshengxiyou/article/details/127893861