• 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
  • 相关阅读:
    cmd通过文件名和大小匹配替换
    Android Jetpack Compose之UI的重组和自动刷新
    会议管理系统SSM记录(一)
    苹果电脑mac系统运行卡顿 反应慢怎么办?
    TASK03|概率论
    Linux文件特殊权限与特殊属性
    网页JS自动化脚本(五)修改文字元素的内容和大小
    Linux 系统编程
    读高性能MySQL(第4版)笔记08_创建高性能索引(上)
    Linux下OpenCV出现错误:ASSERT false in file qasciikey.cpp, line 501
  • 原文地址:https://blog.csdn.net/lingshengxiyou/article/details/127893861