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

Crash with particular command sequence in grammar_sandbox #4319

Closed
jeybb opened this issue May 13, 2019 · 0 comments · Fixed by #4324
Closed

Crash with particular command sequence in grammar_sandbox #4319

jeybb opened this issue May 13, 2019 · 0 comments · Fixed by #4324
Assignees
Labels
triage Needs further investigation

Comments

@jeybb
Copy link

jeybb commented May 13, 2019

Describe the bug
Two commands in particular sequence crash grammer_sandbox.

(put "x" in "[ ]" if you already tried following)
[x] Did you check if this is a duplicate issue?
[x] Did you test it on the latest FRRouting/frr master branch?

To Reproduce
Steps to reproduce the behavior:

gdb -q .libs/grammar_sandbox
(gdb) r

test# c t
test(config)# s

               Program received signal SIGSEGV, Segmentation fault.
                                                                   0x00007ffff7af7aa4 in nb_cli_show_config_cmds (vty=0x657640, config=0x0, with_defaults=<optimized out>) at lib/northbound_cli.c:451
451             vty_out(vty, "frr defaults %s\n", DFLT_NAME);

(gdb) bt
#0  0x00007ffff7af7aa4 in nb_cli_show_config_cmds (vty=0x657640, config=0x0, with_defaults=<optimized out>) at lib/northbound_cli.c:451
#1  nb_cli_show_config (vty=0x657640, config=0x0, format=NB_CFG_FMT_CMDS, translator=<optimized out>, with_defaults=false) at lib/northbound_cli.c:502
#2  0x00007ffff7af78d2 in show_config_candidate_section_magic (argc=0, self=<optimized out>, vty=<optimized out>, argv=<optimized out>) at lib/northbound_cli.c:848
#3  show_config_candidate_section (self=<optimized out>, vty=0x657640, argc=<optimized out>, argv=<optimized out>) at ./lib/northbound_cli_clippy.c:455
#4  0x00007ffff7a7f7b2 in cmd_execute_command_real (vline=<optimized out>, filter=FILTER_RELAXED, vty=<optimized out>, cmd=<optimized out>) at lib/command.c:1059
#5  0x00007ffff7a7f003 in cmd_execute_command (vline=0x656cb0, vty=0x657640, cmd=0x0, vtysh=0) at lib/command.c:1119
#6  0x00007ffff7a7fb2c in cmd_execute (vty=0x657640, cmd=<optimized out>, matched=0x0, vtysh=0) at lib/command.c:1272
#7  0x00007ffff7b70b3f in vty_command (vty=<optimized out>, buf=0x658cd0 "s") at lib/vty.c:528
#8  vty_execute (vty=0x657640) at lib/vty.c:1297
#9  0x00007ffff7b6ad8e in vty_read (thread=<optimized out>) at lib/vty.c:1510
#10 0x00007ffff7b59405 in thread_call (thread=0x7fffffffe260) at lib/thread.c:1603
#11 0x0000000000401524 in main (argc=<optimized out>, argv=<optimized out>) at lib/grammar_sandbox_main.c:66

Expected behavior
Error message

Versions

  • OS Kernel: Ubuntu 18.04
  • FRR Version: git checkout
@jeybb jeybb added the triage Needs further investigation label May 13, 2019
@rwestphal rwestphal self-assigned this May 13, 2019
rwestphal added a commit to opensourcerouting/frr that referenced this issue May 13, 2019
The CLI grammer sandbox needs to initialize the northbound subsystem
otherwise the running_config global variable won't be set, which
leads to crashes.

Fixes FRRouting#4319.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
donaldsharp pushed a commit to donaldsharp/frr that referenced this issue May 16, 2019
The CLI grammer sandbox needs to initialize the northbound subsystem
otherwise the running_config global variable won't be set, which
leads to crashes.

Fixes FRRouting#4319.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
lkrishnamoor pushed a commit to lkrishnamoor/frr that referenced this issue May 29, 2019
The CLI grammer sandbox needs to initialize the northbound subsystem
otherwise the running_config global variable won't be set, which
leads to crashes.

Fixes FRRouting#4319.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
qlyoung pushed a commit to qlyoung/frr that referenced this issue Aug 8, 2019
The CLI grammer sandbox needs to initialize the northbound subsystem
otherwise the running_config global variable won't be set, which
leads to crashes.

Fixes FRRouting#4319.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Needs further investigation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants