DPDK usage discussions
 help / color / Atom feed
* [dpdk-users] Segmentation fault in rte_eth_devices()
@ 2020-06-10 16:28 David Aldrich
  2020-06-11  8:57 ` David Aldrich
  0 siblings, 1 reply; 3+ messages in thread
From: David Aldrich @ 2020-06-10 16:28 UTC (permalink / raw)
  To: users

Hi,

I am building an app based on dpdk-stable-18.11.8. I am seeing a
segmentation fault in my call to rte_eth_rx_burst(). I ran gdb on the core
dump and I see:

#0  0x0000000000f65680 in rte_eth_devices ()
#1  0x000000000048a03a in rte_eth_rx_burst (nb_pkts=7,
rx_pkts=0x7fab40620480, queue_id=0, port_id=<optimized out>)
    at
/opt/dpdk/dpdk-18.08/x86_64-native-linuxapp-gcc/include/rte_ethdev.h:3825
#2  Socket_poll (ucRxPortId=<optimized out>, ucRxQueId=ucRxQueId@entry=0
'\000', uiMaxNumOfRxFrm=uiMaxNumOfRxFrm@entry=7,
    pISocketListener=pISocketListener@entry=0xf635d0 <FH_gtFrontHaulObj+16>)
    at /data/<snip>/SocketClass.c:2188
#3  0x000000000048b941 in FH_perform (args_ptr=<optimized out>) at
/data/<snip>/FrontHaul.c:281
#4  0x00000000005788e4 in eal_thread_loop ()
#5  0x00007fab419fae65 in start_thread () from /lib64/libpthread.so.0
#6  0x00007fab4172388d in clone () from /lib64/libc.so.6

So it seems that rte_eth_rx_burst() calls  rte_eth_devices () and that
function crashes, presumably because of an illegal memory access.

Please can anyone suggest a way of debugging this further to determine the
cause?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-users] Segmentation fault in rte_eth_devices()
  2020-06-10 16:28 [dpdk-users] Segmentation fault in rte_eth_devices() David Aldrich
@ 2020-06-11  8:57 ` David Aldrich
  2020-06-12  0:55   ` Vincent Li
  0 siblings, 1 reply; 3+ messages in thread
From: David Aldrich @ 2020-06-11  8:57 UTC (permalink / raw)
  To: users

Following on from my question, I want to enable more debug info in DPDK.  I
am building DPDK using:

usertools/dpdk-setup.sh

Am I correct in thinking that the build commands in that script use make
and I should modify the appropriate:

config/defconfig_*

file (defconfig_x86_64-native-linuxapp-gcc in my case) ?

If so, would these values be appropriate?

CONFIG_ RTE_LIBRTE_ETHDEV_DEBUG=y
RTE_LOG_LEVEL=RTE_LOG_DEBUG
RTE_LIBRTE_ETHDEV_DEBUG=y

(not sure whether all values should be prefixed by 'CONFIG_'?)

Finally, where do I specify '-O0 -g' for the DPDK build?

Best regards
David

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-users] Segmentation fault in rte_eth_devices()
  2020-06-11  8:57 ` David Aldrich
@ 2020-06-12  0:55   ` Vincent Li
  0 siblings, 0 replies; 3+ messages in thread
From: Vincent Li @ 2020-06-12  0:55 UTC (permalink / raw)
  To: David Aldrich; +Cc: users



On Thu, 11 Jun 2020, David Aldrich wrote:

> Following on from my question, I want to enable more debug info in DPDK.  I
> am building DPDK using:
> 
> usertools/dpdk-setup.sh

When I use dpdk-setup.sh, after the first build, there is a target 
directory like x86_64-native-linuxapp-gcc created under dpdk root source 
directory, and there is '.config' file in x86_64-native-linuxapp-gcc 
directory, you can edit '.config' like 'CONFIG_RTE_LIBRTE_ETHDEV_DEBUG=y', 
then run dpdk-setup.sh again to build. this is one way to do it.

According to doc/build-sdk-quick.txt, you can also

make config T=x86_64-native-linuxapp-gcc

then manually edit x86_64-native-linuxapp-gcc/.config for your debug 
option


 > 
> Am I correct in thinking that the build commands in that script use make
> and I should modify the appropriate:
> 
> config/defconfig_*
> 
> file (defconfig_x86_64-native-linuxapp-gcc in my case) ?
> 
> If so, would these values be appropriate?
> 
> CONFIG_ RTE_LIBRTE_ETHDEV_DEBUG=y
> RTE_LOG_LEVEL=RTE_LOG_DEBUG
> RTE_LIBRTE_ETHDEV_DEBUG=y
> 
> (not sure whether all values should be prefixed by 'CONFIG_'?)
> 
> Finally, where do I specify '-O0 -g' for the DPDK build?

Again according to doc/build-sdk-quick.txt, maybe:

#EXTRA_CFLAGS='-O0 -g' make 




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-10 16:28 [dpdk-users] Segmentation fault in rte_eth_devices() David Aldrich
2020-06-11  8:57 ` David Aldrich
2020-06-12  0:55   ` Vincent Li

DPDK usage discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/users/0 users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 users users/ http://inbox.dpdk.org/users \
		users@dpdk.org
	public-inbox-index users


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.users


AGPL code for this site: git clone https://public-inbox.org/ public-inbox