-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
zebra: add the parameter check to avoid zebra crash issue which cause… #10041
Conversation
…d by null pointer reference. Signed-off-by: wangshengjun <[email protected]>
💚 Basic BGPD CI results: SUCCESS, 0 tests failedResults table
For details, please contact louberger |
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: FailedUbuntu 18.04 arm8 build: Failed (click for details)Ubuntu 18.04 arm8 build: No useful log foundSuccessful on other platforms/tests
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zvrf
is always created when the corresponding vrf
is created. So the situation when the vrf
exists and zvrf
doesn't exist can never happen.
If you see this crash, please find the actual reason why the problem is happening – it may be a double free, memory overwrite or something else.
Continuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopotests Ubuntu 18.04 arm8 part 9: Failed (click for details)Topotests Ubuntu 18.04 arm8 part 9: No useful log foundSuccessful on other platforms/tests
|
This PR is stale because it has been open 180 days with no activity. Comment or remove the |
zebra progress may crash caused by the null pointer reference.It's a kind of sometime issue. Add the parameter check to avoid it.
The crash trace as follow:
(gdb) bt
#0 0x00007f161aa6dfff in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f161aa6f42a in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007f161bacd944 in core_handler (signo=11, siginfo=0x7ffdc76ab8f0, context=) at lib/sigevent.c:257
#3
#4 zebra_vxlan_process_vrf_vni_cmd (zvrf=zvrf@entry=0x0, vni=vni@entry=20000, err=err@entry=0x7ffdc76abdf0 "", err_str_sz=err_str_sz@entry=256, filter=0, add=add@entry=1) at zebra/zebra_vxlan.c:5075
#5 0x000056145b73b565 in lib_vrf_zebra_l3vni_id_modify (args=0x7ffdc76abf60) at zebra/zebra_nb_config.c:1257
#6 0x00007f161bab30b0 in nb_callback_modify (nb_node=0x56145bd903e0, errmsg_len=, errmsg=0x7ffdc76ac4d0 "", resource=0x56145be517d8, dnode=0x56145cbe4220, event=NB_EV_APPLY,
context=0x7ffdc76ac4c0) at lib/northbound.c:969
#7 nb_callback_configuration (context=0x7ffdc76ac4c0, event=event@entry=NB_EV_APPLY, change=change@entry=0x56145be517a0, errmsg=errmsg@entry=0x7ffdc76ac4d0 "", errmsg_len=errmsg_len@entry=8192)
at lib/northbound.c:1235
#8 0x00007f161bab351e in nb_transaction_process (event=event@entry=NB_EV_APPLY, transaction=transaction@entry=0x56145bf3a1e0, errmsg=errmsg@entry=0x7ffdc76ac4d0 "", errmsg_len=errmsg_len@entry=8192)
at lib/northbound.c:1356
#9 0x00007f161bab3813 in nb_candidate_commit_apply (transaction=0x56145bf3a1e0, save_transaction=save_transaction@entry=true, transaction_id=transaction_id@entry=0x0, errmsg=errmsg@entry=0x7ffdc76ac4d0 "",
errmsg_len=errmsg_len@entry=8192) at lib/northbound.c:792
#10 0x00007f161bab394e in nb_candidate_commit (context=context@entry=0x7ffdc76ac4c0, candidate=, save_transaction=save_transaction@entry=true, comment=comment@entry=0x0,
transaction_id=transaction_id@entry=0x0, errmsg=errmsg@entry=0x7ffdc76ac4d0 "", errmsg_len=8192) at lib/northbound.c:824
#11 0x00007f161bab3d87 in nb_cli_classic_commit (vty=vty@entry=0x5614644b0600) at lib/northbound_cli.c:64
#12 0x00007f161bab6c34 in nb_cli_apply_changes (vty=vty@entry=0x5614644b0600, xpath_base_fmt=xpath_base_fmt@entry=0x0) at lib/northbound_cli.c:281
#13 0x000056145b759352 in vrf_vni_mapping (self=, vty=0x5614644b0600, argc=2, argv=0x56145cd84950) at zebra/zebra_vty.c:2452
#14 0x00007f161ba809bd in cmd_execute_command_real (vline=vline@entry=0x56145c6b9140, vty=vty@entry=0x5614644b0600, cmd=cmd@entry=0x0, filter=FILTER_RELAXED) at lib/command.c:916
#15 0x00007f161ba8295f in cmd_execute_command (vline=vline@entry=0x56145c6b9140, vty=vty@entry=0x5614644b0600, cmd=cmd@entry=0x0, vtysh=vtysh@entry=0) at lib/command.c:975
#16 0x00007f161ba82ad4 in cmd_execute (vty=vty@entry=0x5614644b0600, cmd=cmd@entry=0x56145cea7590 " vni 20000\n", matched=matched@entry=0x0, vtysh=vtysh@entry=0) at lib/command.c:1138
#17 0x00007f161bae2912 in vty_command (vty=vty@entry=0x5614644b0600, buf=0x56145cea7590 " vni 20000\n") at lib/vty.c:526
#18 0x00007f161bae2ba6 in vty_execute (vty=vty@entry=0x5614644b0600) at lib/vty.c:1291
#19 0x00007f161bae54cc in vtysh_read (thread=) at lib/vty.c:2124
#20 0x00007f161badcf00 in thread_call (thread=thread@entry=0x7ffdc76b3180) at lib/thread.c:1628
#21 0x00007f161baa55e0 in frr_run (master=0x56145bbe9900) at lib/libfrr.c:1099
#22 0x000056145b6f54c7 in main (argc=9, argv=0x7ffdc76b3588) at zebra/main.c:457
Signed-off-by: wangshengjun [email protected]