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-1082] "show ip punt redirect" crash when execute without any records #2515

Closed
vvalderrv opened this issue Feb 1, 2025 · 2 comments
Closed

Comments

@vvalderrv
Copy link
Contributor

Description

DBGvpp# show ip punt redirect

Thread 1 "vpp_main" received signal SIGSEGV, Segmentation fault.

0x00007ffff7944252 in unix_cli_pager_add_line (cf=0x7fffb552ea1c, line=0x0, len_or_index=0) at /vpp/build-data/../src/vlib/unix/cli.c:848

848 p = cf->pager_vector[line_index];

(gdb) bt

#0 0x00007ffff7944252 in unix_cli_pager_add_line (cf=0x7fffb552ea1c, line=0x0, len_or_index=0) at /vpp/build-data/../src/vlib/unix/cli.c:848

#1 0x00007ffff7944ae1 in unix_vlib_cli_output (cli_file_index=0, buffer=0x0, buffer_bytes=0) at /vpp/build-data/../src/vlib/unix/cli.c:992

#2 0x00007ffff78b63be in vlib_cli_output (vm=0x7ffff7b8a400 <vlib_global_main>, fmt=0x7ffff74d5669 "%U") at /vpp/build-data/../src/vlib/cli.c:697

#3 0x00007ffff6dc8a26 in ip4_punt_redirect_show_cmd (vm=0x7ffff7b8a400 <vlib_global_main>, main_input=0x7fffb6022ef0, cmd=0x7fffb5fd7c54) at /vpp/build-data/../src/vnet/ip/ip4_punt_drop.c:489

#4 0x00007ffff78b5e07 in vlib_cli_dispatch_sub_commands (vm=0x7ffff7b8a400 <vlib_global_main>, cm=0x7ffff7b8a5e0 <vlib_global_main+480>, input=0x7fffb6022ef0, parent_command_index=606)

at /vpp/build-data/../src/vlib/cli.c:588

#5 0x00007ffff78b5d15 in vlib_cli_dispatch_sub_commands (vm=0x7ffff7b8a400 <vlib_global_main>, cm=0x7ffff7b8a5e0 <vlib_global_main+480>, input=0x7fffb6022ef0, parent_command_index=206)

at /vpp/build-data/../src/vlib/cli.c:566

#6 0x00007ffff78b5d15 in vlib_cli_dispatch_sub_commands (vm=0x7ffff7b8a400 <vlib_global_main>, cm=0x7ffff7b8a5e0 <vlib_global_main+480>, input=0x7fffb6022ef0, parent_command_index=5)

at /vpp/build-data/../src/vlib/cli.c:566

#7 0x00007ffff78b5d15 in vlib_cli_dispatch_sub_commands (vm=0x7ffff7b8a400 <vlib_global_main>, cm=0x7ffff7b8a5e0 <vlib_global_main+480>, input=0x7fffb6022ef0, parent_command_index=0)

at /vpp/build-data/../src/vlib/cli.c:566

#8 0x00007ffff78b60ec in vlib_cli_input (vm=0x7ffff7b8a400 <vlib_global_main>, input=0x7fffb6022ef0, function=0x7ffff7944815 <unix_vlib_cli_output>, function_arg=0)

at /vpp/build-data/../src/vlib/cli.c:662

#9 0x00007ffff7949fd3 in unix_cli_process_input (cm=0x7ffff7b8a280 <unix_cli_main>, cli_file_index=0) at /vpp/build-data/../src/vlib/unix/cli.c:2307

#10 0x00007ffff794ab31 in unix_cli_process (vm=0x7ffff7b8a400 <vlib_global_main>, rt=0x7fffb6012000, f=0x0) at /vpp/build-data/../src/vlib/unix/cli.c:2419

#11 0x00007ffff78e95e1 in vlib_process_bootstrap (_a=140736245349008) at /vpp/build-data/../src/vlib/main.c:1231

#12 0x00007ffff684abc0 in clib_calljmp () at /vpp/build-data/../src/vppinfra/longjmp.S:110

#13 0x00007fffb5e93a60 in ?? ()

#14 0x00007ffff78e970c in vlib_process_startup (vm=0x7ffff689dd12 <vec_aligned_header_bytes+54>, p=0x7fffb5e93aa0, f=0xf755b9797c8abe00) at /vpp/build-data/../src/vlib/main.c:1253

Backtrace stopped: previous frame inner to this frame (corrupt stack?)

(gdb) p *cf

$1 = {clib_file_index = 0, output_vector = 0x7fffb6011d74 "", input_vector = 0x7fffb55a6114 "", has_history = 1 '\001', command_history = 0x7fffb60119f8,

current_command = 0x7fffb5fe0f8c "redirect", excursion = 1, history_limit = 50, command_number = 1, search_key = 0x0, search_mode = 0, cursor = 0, line_mode = 0 '\000',

crlf_mode = 0 '\000', ansi_capable = 1 '\001', started = 1 '\001', no_pager = 0 '\000', is_interactive = 1 '\001', is_socket = 0 '\000', has_epipe = 0 '\000', pager_vector = 0x0,

pager_index = 0x0, pager_start = 0, width = 193, height = 54, process_node_index = 385}

(gdb)

Without any record it tries to call vlib_cli_output which inturn call unix_vlib_cli_output.(as we can see from callstack buffer=0x0 and buffer_bytes=0)

Similar problem has been seen in "show ip6 punt redirect"

Assignee

Swarup Nayak

Reporter

Swarup Nayak

Comments

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

@vvalderrv
Copy link
Contributor Author

fixed with https://gerrit.fd.io/r/#/c/9737/

1 similar comment
@vvalderrv
Copy link
Contributor Author

fixed with https://gerrit.fd.io/r/#/c/9737/

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

1 participant