在另一台计算机上运行DPDK应用程序二进制文件(用不同的计算机编译)

发布于 2025-01-21 17:05:09 字数 2699 浏览 1 评论 0原文

  • 在一台计算机上编译了带有几个运行时库库的DPDK应用程序

  • ,并将库从该计算机复制到具有类似规格的另一台计算机

  • 运行DPDK应用程序的参数,但该应用程序在rte> rte_eal_init()

    中崩溃了
 App-binary -l 1 -a 0000:02:00.0 -a 0000:03:00.0 -d /opt/upf/lib/ --proc-type=primary --file-prefix=.app_0000:02:00.0 
  • 的后退跟踪
    #0  0x00007faaa0ead337 in raise () from /lib64/libc.so.6
    #1  0x00007faaa0eaea28 in abort () from /lib64/libc.so.6
    #2  0x00007faaa125104f in __rte_panic () from /opt/upf/lib/librte_eal.so.21
    #3  0x00007faa9e228e1c in tailqinitfn_rte_ring_tailq () from /opt/upf/lib/librte_ring.so.21.0
    #4  0x00007faaa278a973 in _dl_init_internal () from /lib64/ld-linux-x86-64.so.2
    #5  0x00007faaa278f54e in dl_open_worker () from /lib64/ld-linux-x86-64.so.2
    #6  0x00007faaa278a784 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
    #7  0x00007faaa278eb3b in _dl_open () from /lib64/ld-linux-x86-64.so.2
    #8  0x00007faaa0c73eeb in dlopen_doit () from /lib64/libdl.so.2
    #9  0x00007faaa278a784 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
    #10 0x00007faaa0c744ed in _dlerror_run () from /lib64/libdl.so.2
    #11 0x00007faaa0c73f81 in dlopen@@GLIBC_2.2.5 () from /lib64/libdl.so.2
    #12 0x00007faaa125bc55 in eal_plugins_init () from /opt/upf/lib/librte_eal.so.21
    #13 0x00007faaa126f2ba in rte_eal_init () from /opt/upf/lib/librte_eal.so.21
    #14 0x000000000041414a in Dpdk_LibTask (arg=<optimized out>) at /root/5g_upf/core/service/common/dpdk/dpdk.c:1244
    #15 0x00007faaa2566e65 in start_thread () from /lib64/libpthread.so.0
    #16 0x00007faaa0f7588d in clone () from /lib64/libc.so.6

这是GNU调试器崩溃核心文件更新

  • :主机机器详细信息:
    • i3 8100 3.6GHz 4内核
    • 8 GB RAM
    • Centos 7
    • GCC版本4.8.5 20150623(Red Hat 4.8.5-44)(GCC)
    • GNU LD版本2.27-44.base.el7
    • DPDK 20.11.0
    • 3个nics与DPDK界定
        0000:01:00.0'82574L千兆网络连接10D3'drv = uio_pci_generic unused = e1000e
      0000:07:00.0'82574L千兆网络连接10d3'drv = uio_pci_generic unused = e1000e
      0000:08:00.0'82574L千兆网络连接10d3'drv = uio_pci_generic unused = e1000e
       
  • 目标机详细信息:
    • i3 8100 3.6GHz 4内核
    • 8 GB RAM
    • Centos 7
    • GCC版本4.8.5 20150623(Red Hat 4.8.5-44)(GCC)
    • GNU LD版本2.27-44.base.el7
    • DPDK 20.11.0
    • 3个nics与DPDK界定
        0000:02:00.0'82574L千兆网络连接10D3'drv = uio_pci_generic unused = e1000e
      0000:03:00.0'82574L千兆网络连接10d3'drv = uio_pci_generic unused = e1000e
      0000:04:00.0'82574L千兆网络连接10d3'drv = uio_pci_generic unused = e1000e
       
  • A DPDK application with several runtime dependent libraries are compiled on one machine

  • Binaries and libraries are copied from that machine to another machine with similar specs and environment

  • Running the DPDK application with the parameters as given below, but the application crashes during rte_eal_init()

 App-binary -l 1 -a 0000:02:00.0 -a 0000:03:00.0 -d /opt/upf/lib/ --proc-type=primary --file-prefix=.app_0000:02:00.0 
  • This is the back trace from gnu debugger crash core file
    #0  0x00007faaa0ead337 in raise () from /lib64/libc.so.6
    #1  0x00007faaa0eaea28 in abort () from /lib64/libc.so.6
    #2  0x00007faaa125104f in __rte_panic () from /opt/upf/lib/librte_eal.so.21
    #3  0x00007faa9e228e1c in tailqinitfn_rte_ring_tailq () from /opt/upf/lib/librte_ring.so.21.0
    #4  0x00007faaa278a973 in _dl_init_internal () from /lib64/ld-linux-x86-64.so.2
    #5  0x00007faaa278f54e in dl_open_worker () from /lib64/ld-linux-x86-64.so.2
    #6  0x00007faaa278a784 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
    #7  0x00007faaa278eb3b in _dl_open () from /lib64/ld-linux-x86-64.so.2
    #8  0x00007faaa0c73eeb in dlopen_doit () from /lib64/libdl.so.2
    #9  0x00007faaa278a784 in _dl_catch_error () from /lib64/ld-linux-x86-64.so.2
    #10 0x00007faaa0c744ed in _dlerror_run () from /lib64/libdl.so.2
    #11 0x00007faaa0c73f81 in dlopen@@GLIBC_2.2.5 () from /lib64/libdl.so.2
    #12 0x00007faaa125bc55 in eal_plugins_init () from /opt/upf/lib/librte_eal.so.21
    #13 0x00007faaa126f2ba in rte_eal_init () from /opt/upf/lib/librte_eal.so.21
    #14 0x000000000041414a in Dpdk_LibTask (arg=<optimized out>) at /root/5g_upf/core/service/common/dpdk/dpdk.c:1244
    #15 0x00007faaa2566e65 in start_thread () from /lib64/libpthread.so.0
    #16 0x00007faaa0f7588d in clone () from /lib64/libc.so.6

Updates:

  • Host Machine details:
    • i3 8100 3.6GHz 4 Cores
    • 8 GB RAM
    • CentOS 7
    • gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)
    • GNU ld version 2.27-44.base.el7
    • DPDK 20.11.0
    • 3 NICs bounded to DPDK
      0000:01:00.0 '82574L Gigabit Network Connection 10d3' drv=uio_pci_generic unused=e1000e
      0000:07:00.0 '82574L Gigabit Network Connection 10d3' drv=uio_pci_generic unused=e1000e
      0000:08:00.0 '82574L Gigabit Network Connection 10d3' drv=uio_pci_generic unused=e1000e
      
  • Target Machine details:
    • i3 8100 3.6GHz 4 Cores
    • 8 GB RAM
    • CentOS 7
    • gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)
    • GNU ld version 2.27-44.base.el7
    • DPDK 20.11.0
    • 3 NICs bounded to DPDK
      0000:02:00.0 '82574L Gigabit Network Connection 10d3' drv=uio_pci_generic unused=e1000e
      0000:03:00.0 '82574L Gigabit Network Connection 10d3' drv=uio_pci_generic unused=e1000e
      0000:04:00.0 '82574L Gigabit Network Connection 10d3' drv=uio_pci_generic unused=e1000e
      

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

野生奥特曼 2025-01-28 17:05:09

[基于与Sumesh的现场调试]。

应用程序背景:

  1. 该应用程序对DPDK库,第三方库和GNU库有依赖性。
  2. 实际的开源项目,构建DPDK 20.11。
  3. Docker实例是从Docker Run开始的,其中共享root权限并将其复制到本地文件夹(同一机器)。
  4. 使用LD_LIBRARY_PATH将所需文件夹DPDK库依赖性设置为纠正。

导致问题的原因是:

  1. A Machine-A用于构建DPDK 20.11库。
  2. Onical-B不是在机器A上运行Docker实例,而是作为目标机器。
  3. DPDK库从Machine-A到Machine-B复制。
  4. Docker-Run用于在Machine-B中启动该应用程序

如何解决该问题:

  1. DPDK库构建时具有许多其他库和版本的依赖性构建
  2. ,并在Target(Machine-B)上构建并安装DPDK,并且不复制。
  3. 中,Docker-Run共享访问/usr/lib/lib64的权限,其中包含DPDK,第三方和GNU库。
  4. 更新LD_LIBRARY_PATH,以便可以访问右文件夹以解决依赖关系。

注意:

  1. 在主机和Docker上,使用Hello-World for Sanity Sumesh在主机和Docker上进行了验证,
  2. 正在更新脚本以反映自定义应用程序的文件夹权限。

[Based on the live debug with Sumesh].

Application background:

  1. The application has dependency on DPDK libraries, 3rd party libraries and GNU libraries.
  2. Actual open source project, builds DPDK 20.11.
  3. Docker instance is started with docker run where root permission is shared and and copies these over to a local folder (same machine).
  4. With LD_LIBRARY_PATH set to desired folder DPDK libraries dependency are corrected.

What caused the issues:

  1. Machine-A is used to build the DPDK 20.11 libraries.
  2. Instead of running docker instance on Machine-A, Machine-B is choose as target machine.
  3. DPDK libraries are copied from Machine-A to Machine-B.
  4. Docker-run is used to start the application in Machine-B

How to fix the issue:

  1. DPDK libraries when built has numerous other libraries and version dependency
  2. Build and install DPDK on target (MACHINE-B) and do not copy.
  3. in docker-run share the permission to access the /usr/lib/lib64 which houses DPDK, 3rd party and GNU Libraries.
  4. update the LD_LIBRARY_PATH to have access to right folder to resolve the dependency.

Note:

  1. Tested and validated on both Host and Docker with hello-world for sanity
  2. Sumesh is updating the scripts to reflect the folder permission for the custom application.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文