Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VPP-2128] VPP spanning to veth interface will cause vpp abort(). #3589

Open
vvalderrv opened this issue Feb 2, 2025 · 4 comments
Open

[VPP-2128] VPP spanning to veth interface will cause vpp abort(). #3589

vvalderrv opened this issue Feb 2, 2025 · 4 comments

Comments

@vvalderrv
Copy link
Contributor

Description

VPP version: stable/2310: 095a953

When I try to create host pair for capturing packets by TCPDUMP, VPP will ABORT() after disabling interface host-veth200。

The steps as follows:

 

# create veth100@veth200 on linux
ip link add name veth100 type veth peer name veth200
ip link set veth100 up
ip link set veth200 up 

span to eth1(I renamed Gigabit... to eth1)

vppctl create host-interface name veth200
vppctl set interface span eth1 destination host-veth200 both
vppctl set int state host-veth200 up

tcpdump for capturing packets.

tcpdump -ni veth100

clear span

vppctl set interface span eth1 disable
vppctl set int state host-veth200 down

while I disabled interface host-veth200, VPP exited:
#0 0x00007f84a37ada7c in ?? () from target:/usr/lib64/libc.so.6

#1 0x00007f84a375fef6 in raise ()

from target:/usr/lib64/libc.so.6

#2 0x00007f84a374a2fc in abort ()

from target:/usr/lib64/libc.so.6

#3 0x0000563c4507b133 in os_panic ()

at /root/pkgmaker_sandbox/build/chengyan/ngrayvpp_v9.2310-rc22/src/vpp/vnet/main.c:421

#4 0x00007f84a3a0c7a9 in debugger ()

at /root/pkgmaker_sandbox/build/chengyan/ngrayvpp_v9.2310-rc22/src/vppinfra/error.c:84

#5 0x00007f84a3a0c560 in cliberror (how_to_die=2,

function_name=0x0, line_number=0,

fmt=0x7f84a3bc919c "%s:%d (%s) assertion `%s' fails")

at /root/pkgmaker_sandbox/build/chengyan/ngrayvpp_v9.2310-rc22/src/vppinfra/error.c:143

#6 0x00007f84a3b28d44 in vlib_log (level=VLIB_LOG_LEVEL_NOTICE,

class=1638400, fmt=0x7f846365a905 "fd %u %U")

at /root/pkgmaker_sandbox/build/chengyan/ngrayvpp_v9.2310-rc22/src/vlib/log.c:131

#7 0x00007f8463642e95 in af_packet_fd_error (uf=0x7f8467a384b0)

at /root/pkgmaker_sandbox/build/chengyan/ngrayvpp_v9.2310-rc22/src/plugins/af_packet/af_packet.c:125

#8 0x00007f84a3b8fdc4 in linux_epoll_input_inline (

vm=0x7f84679e9bc0, node=0x7f84679ec200, frame=0x0,

thread_index=1)

at /root/pkgmaker_sandbox/build/chengyan/ngrayvpp_v9.2310-rc22/src/vlib/unix/input.c:334

Afer some research, I found that `af_packet_fd_error` was using `vlib_log_notice` that can not be called in worker thread:

 

/* make sure we are running on the main thread to avoid use in dataplane     code, for dataplane logging consider use of event-logger */
ASSERT (vlib_get_thread_index () == 0); 
So Is there has some problem at `af_packet_fd_error`?

Assignee

Mohsin Kazmi

Reporter

echo

Comments

No comments.

Original issue: https://jira.fd.io/browse/VPP-2128

@mgsmith1000
Copy link
Contributor

This is a test comment.

@nanfengnan1
Copy link
Contributor

Hi, I had fix this error for vpp vnet af_packet interface. And you could find this patch in gitro https://gerrit.fd.io/r/c/vpp/+/42083. this patch had merged into vpp-rc-2502. And your issue had better to send email to vpp-dev email list.

@vvalderrv
Copy link
Contributor Author

Jira Date Created: Mon, 9 Dec 2024 08:44:24 +0000
Jira Date Updated: Mon, 9 Dec 2024 08:51:06 +0000

@nanfengnan1
Copy link
Contributor

event log did'nt call in main thread!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants