首页 > 其他分享 >[DPDK] dumpcap报错EAL init failed: is primary process running?解决办法

[DPDK] dumpcap报错EAL init failed: is primary process running?解决办法

时间:2024-09-10 17:02:15浏览次数:1  
标签:last EAL nil process tqh qname 报错 Tailq first

[DPDK] dumpcap报错EAL init failed: is primary process running?解决办法

问题

我写了一个DPDK程序,现在想要用DPDK自带的dpdk-dumpcap工具来抓包测试。根据官网描述,我们需要先启动我们的程序为主进程,然后启动dpdk-dumpcap为副进程。但是我直接运行dpdk-dumpcap,显示如下错误:

注:在编译DPDK时,需要有libpcap库才会编译dpdk-dumpcap程序。

${DPDK_HOME}/build/app/dpdk-dumpcap -D
EAL: Cannot initialize tailq: RTE_FIB
Tailq 0: qname:<RTE_RING>, tqh_first:0x11fff2d1c0, tqh_last:0x11fff2d1c0
Tailq 1: qname:<RTE_MEMPOOL>, tqh_first:0x11fff2d280, tqh_last:0x11fff2d280
Tailq 2: qname:<RTE_MBUF_DYNFIELD>, tqh_first:(nil), tqh_last:0x1000044e8
Tailq 3: qname:<RTE_MBUF_DYNFLAG>, tqh_first:(nil), tqh_last:0x100004518
Tailq 4: qname:<UIO_RESOURCE_LIST>, tqh_first:(nil), tqh_last:0x100004548
Tailq 5: qname:<VFIO_RESOURCE_LIST>, tqh_first:(nil), tqh_last:0x100004578
Tailq 6: qname:<RTE_HASH>, tqh_first:(nil), tqh_last:0x1000045a8
Tailq 7: qname:<RTE_FBK_HASH>, tqh_first:(nil), tqh_last:0x1000045d8
Tailq 8: qname:<RTE_THASH>, tqh_first:(nil), tqh_last:0x100004608
Tailq 9: qname:<RTE_REORDER>, tqh_first:(nil), tqh_last:0x100004638
Tailq 10: qname:<RTE_ACL>, tqh_first:(nil), tqh_last:0x100004668
Tailq 11: qname:<RTE_LPM>, tqh_first:(nil), tqh_last:0x100004698
Tailq 12: qname:<RTE_LPM6>, tqh_first:(nil), tqh_last:0x1000046c8
Tailq 13: qname:<RTE_SWX_PIPELINE>, tqh_first:(nil), tqh_last:0x1000046f8
Tailq 14: qname:<RTE_SWX_CTL_PIPELINE>, tqh_first:(nil), tqh_last:0x100004728
Tailq 15: qname:<RTE_STACK>, tqh_first:(nil), tqh_last:0x100004758
Tailq 16: qname:<VMBUS_RESOURCE_LIST>, tqh_first:(nil), tqh_last:0x100004788
Tailq 17: qname:<>, tqh_first:(nil), tqh_last:(nil)
Tailq 18: qname:<>, tqh_first:(nil), tqh_last:(nil)
Tailq 19: qname:<>, tqh_first:(nil), tqh_last:(nil)
Tailq 20: qname:<>, tqh_first:(nil), tqh_last:(nil)
Tailq 21: qname:<>, tqh_first:(nil), tqh_last:(nil)
Tailq 22: qname:<>, tqh_first:(nil), tqh_last:(nil)
Tailq 23: qname:<>, tqh_first:(nil), tqh_last:(nil)
Tailq 24: qname:<>, tqh_first:(nil), tqh_last:(nil)
Tailq 25: qname:<>, tqh_first:(nil), tqh_last:(nil)
Tailq 26: qname:<>, tqh_first:(nil), tqh_last:(nil)
Tailq 27: qname:<>, tqh_first:(nil), tqh_last:(nil)
Tailq 28: qname:<>, tqh_first:(nil), tqh_last:(nil)
Tailq 29: qname:<>, tqh_first:(nil), tqh_last:(nil)
Tailq 30: qname:<>, tqh_first:(nil), tqh_last:(nil)
Tailq 31: qname:<>, tqh_first:(nil), tqh_last:(nil)
EAL: FATAL: Cannot init tail queues for objects
EAL: Cannot init tail queues for objects
EAL: Error - exiting with code: 1
  Cause: EAL init failed: is primary process running?

根据报错的信息,dpdk-dumpcap貌似识别不到我的主进程。但事实上应该是能识别到的,因为如果不启动主进程的话,会在一开始额外报如下错误:

EAL: failed to send to (/var/run/dpdk/rte/mp_socket) due to No such file or directory
EAL: Fail to send request /var/run/dpdk/rte/mp_socket:bus_vdev_mp
vdev_scan(): Failed to request vdev from primary
...

上网查找一番,最后在Secondary DPDK with FastClick · Issue #339 · tbarbette/fastclick · GitHub里找到了问题原因。原因在于我的主进程和dpdk-dumpcap的编译选项不同,所以无法识别。毕竟我的主进程是用我自己写的cmake文件编译的,而dpdk-dumpcap是用默认的meson编译的,二者编译选项肯定不同。

解决办法

dpdk-dumpcap的源代码只有一个文件。所以我直接复制过来放到我的cmake项目里,跟着主程序一起编译,这样就能保证编译选项相同了。

标签:last,EAL,nil,process,tqh,qname,报错,Tailq,first
From: https://www.cnblogs.com/CQzhangyu/p/18406754

相关文章

  • jeecg 3.7.0连接达梦8数据库报错 Failed to configure a DataSource: 'url' attribute
    参考之前的博文设置过连接达梦数据库 根据提示,应该是jdbc驱动不兼容导致。博主使用的达梦数据库是20240715版本,需要使用8.1.3.149版本的jdbc驱动才能连接。在jeecg中更新jdbc驱动,下面以maven为例1.在maven的配置文件settings.xml中的<mirrors>标签内增加mvnrepository仓库地......
  • Unreal 配置插件依赖另一个插件
    例如:插件A依赖插件B1、把两个插件都放到项目Plugins文件夹下2、修改插件A的A.uplugin文件,添加如下片段"Plugins":[{"Name":"B","Enabled":true},...]3、修改插件A跟插件B的加载时间设置打开A.uplugin,设置加载时间为Default"Mo......
  • 总结电脑报错找不到msvcr110.dll原因,5种方式完美解决
    msvcr110.dll作为MicrosoftVisualC++运行时库的一部分,包含了执行许多基于Windows操作系统的应用程序所必需的函数和例行程序。当用户尝试运行依赖于此库的应用程序时,如果系统中缺少msvcr110.dll文件或者该文件损坏,可能会遇到错误提示,如“找不到msvcr110.dll”或“msvcr110.dl......
  • 使用公钥通过ssh通道连接MYSQL数据库报错(server sent: publickey)
    使用公钥通过ssh连接MYSQL数据库报错Disconnected:Nosupportedauthenticationmethodsavailable(serversent:publickey)1、通过命令行查看服务器ssh配置文件sudovim/etc/ssh/sshd_config2、查看PubkeyAuthentication是否启用,PubkeyAuthenticationyes,表示服务......
  • 安防监控/视频汇聚平台EasyCVR无法启动并报错“error while loading shared libraries
    安防监控/视频汇聚平台EasyCVR视频管理系统以其强大的拓展性、灵活的部署方式、高性能的视频能力和智能化的分析能力,为各行各业的视频监控需求提供了优秀的解决方案。通过简单的配置和操作,用户可以轻松地进行远程视频监控、存储和查看,满足各种复杂场景下的监控需求。流媒体音视......
  • 两个问题Cannot process SVG file, cannot allocate the required memory.svg the spe
    CannotprocessSVGfile,cannotallocatetherequiredmemory问题:无法处理SVG文件,无法分配所需内存原因:svg图像背景太大了解决方案:网上说的都是图片大了没说怎么改。这里就教你用vs改。 直接用vs打开svg文件。  x和y的起始点改成0,画布也改成和图片一样大小。修改......
  • C# process =An error occurred trying to start process with working directory The
    usingSystem.Diagnostics;//Seehttps://aka.ms/new-console-templateformoreinformationConsole.WriteLine("Hello,World!");stringpath=@"..\..\..\Image";stringfullPath=System.IO.Path.GetFullPath(path);varimgsList=System......
  • “远程IO控制问题全解析:常见报错及一站式解决方案”
    想象一下,在一个遥远的工厂中,机器正在无声地运转,而在世界另一端的办公室里,工程师正通过智能设备监控着这一切。这正是远程IO技术带来的奇迹。然而,当这种技术出现问题时,它可能变成一场远程控制的噩梦。不用担心,本文将带您深入了解远程IO的常见问题,并提供实用的解决方案,让您在远程控制......
  • androidstudio报错devicemanager出错问题
    2024-09-0911:01:57,029[1446798]WARN-Emulator:Pixel8ProAPI35-Failedtoprocess.inifileC:\Users\钁f旦.android\avd<build>.iniforreading.如如何解决1.查日志C:\Users\董浩\AppData\Local\Google\AndroidStudio2024.1\log这个是默认位置我的错误是202......
  • python3 报错ModuleNotFoundError: No module named 'apt_pkg'
    前言aptupdate无法执行,python3报错ModuleNotFoundError:Nomodulenamed'CommandNotFound'这是因为将python版本升级后的问题正确做法将路径:/usr/lib/python3/dist-packages下的文件apt_pkg.cpython-36m-x86_64-linux-gnu.so,文件名没有跟随python版本进行更改,正确做......