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

zebra: add the parameter check to avoid zebra crash issue which cause… #10041

Closed
wants to merge 2 commits into from

Conversation

wangshengjun
Copy link
Contributor

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]

…d by null pointer reference.

Signed-off-by: wangshengjun <[email protected]>
@frrbot frrbot bot added the zebra label Nov 12, 2021
@LabN-CI
Copy link
Collaborator

LabN-CI commented Nov 12, 2021

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/10041 f189e5d
Date 11/12/2021
Start 01:31:10
Finish 01:57:32
Run-Time 26:22
Total 1813
Pass 1813
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2021-11-12-01:31:10.txt
Log autoscript-2021-11-12-01:32:24.log.bz2
Memory 487 508 427

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

NetDEF-CI commented Nov 12, 2021

Continuous Integration Result: FAILED

Continuous Integration Result: FAILED

See below for issues.
CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-1504/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Get source / Pull Request: Successful

Building Stage: Failed

Ubuntu 18.04 arm8 build: Failed (click for details) Ubuntu 18.04 arm8 build: No useful log found
Successful on other platforms/tests
  • Fedora 29 amd64 build
  • Debian 9 amd64 build
  • Ubuntu 20.04 amd64 build
  • Ubuntu 18.04 ppc64le build
  • Debian 10 amd64 build
  • Ubuntu 16.04 arm7 build
  • Ubuntu 16.04 i386 build
  • CentOS 7 amd64 build
  • Ubuntu 18.04 i386 build
  • Ubuntu 18.04 amd64 build
  • Ubuntu 18.04 arm7 build
  • Debian 11 amd64 build
  • Ubuntu 16.04 amd64 build
  • FreeBSD 11 amd64 build
  • Ubuntu 16.04 arm8 build
  • NetBSD 8 amd64 build
  • OpenBSD 6 amd64 build
  • FreeBSD 12 amd64 build
  • CentOS 8 amd64 build

Copy link
Contributor

@idryzhov idryzhov left a 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.

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: FAILED

See below for issues.
CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-5852/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Get source / Pull Request: Successful

Building Stage: Successful

Basic Tests: Failed

Topotests Ubuntu 18.04 arm8 part 9: Failed (click for details) Topotests Ubuntu 18.04 arm8 part 9: No useful log found
Successful on other platforms/tests
  • Addresssanitizer topotests part 9
  • Topotests Ubuntu 18.04 i386 part 2
  • Topotests Ubuntu 18.04 amd64 part 3
  • Topotests Ubuntu 18.04 arm8 part 2
  • Topotests debian 10 amd64 part 5
  • Topotests Ubuntu 18.04 arm8 part 7
  • Topotests debian 10 amd64 part 0
  • Addresssanitizer topotests part 7
  • Topotests Ubuntu 18.04 arm8 part 8
  • Topotests Ubuntu 18.04 i386 part 6
  • IPv4 ldp protocol on Ubuntu 18.04
  • Ubuntu 16.04 deb pkg check
  • Topotests Ubuntu 18.04 i386 part 7
  • Topotests Ubuntu 18.04 amd64 part 5
  • Addresssanitizer topotests part 5
  • Topotests Ubuntu 18.04 i386 part 1
  • Topotests Ubuntu 18.04 i386 part 3
  • Topotests Ubuntu 18.04 i386 part 8
  • Topotests Ubuntu 18.04 amd64 part 2
  • Topotests Ubuntu 18.04 amd64 part 0
  • Addresssanitizer topotests part 3
  • Topotests debian 10 amd64 part 8
  • Topotests Ubuntu 18.04 amd64 part 7
  • Topotests Ubuntu 18.04 arm8 part 4
  • Topotests Ubuntu 18.04 i386 part 5
  • Topotests debian 10 amd64 part 9
  • Addresssanitizer topotests part 2
  • IPv6 protocols on Ubuntu 18.04
  • Topotests Ubuntu 18.04 amd64 part 4
  • CentOS 7 rpm pkg check
  • Fedora 29 rpm pkg check
  • IPv4 protocols on Ubuntu 18.04
  • Topotests Ubuntu 18.04 i386 part 9
  • Topotests debian 10 amd64 part 2
  • Topotests debian 10 amd64 part 7
  • Topotests Ubuntu 18.04 arm8 part 0
  • Topotests Ubuntu 18.04 amd64 part 8
  • Addresssanitizer topotests part 8
  • Static analyzer (clang)
  • Topotests Ubuntu 18.04 amd64 part 9
  • Ubuntu 20.04 deb pkg check
  • Topotests Ubuntu 18.04 i386 part 0
  • Ubuntu 18.04 deb pkg check
  • Debian 10 deb pkg check
  • Addresssanitizer topotests part 6
  • Topotests Ubuntu 18.04 arm8 part 5
  • Topotests debian 10 amd64 part 1
  • Topotests Ubuntu 18.04 amd64 part 1
  • Topotests debian 10 amd64 part 6
  • Topotests Ubuntu 18.04 arm8 part 6
  • Topotests Ubuntu 18.04 arm8 part 1
  • Topotests debian 10 amd64 part 3
  • Topotests Ubuntu 18.04 amd64 part 6
  • Addresssanitizer topotests part 0
  • Debian 9 deb pkg check
  • Addresssanitizer topotests part 4
  • Addresssanitizer topotests part 1
  • Topotests Ubuntu 18.04 i386 part 4
  • Topotests Ubuntu 18.04 arm8 part 3
  • Topotests debian 10 amd64 part 4

@github-actions
Copy link

github-actions bot commented Dec 8, 2022

This PR is stale because it has been open 180 days with no activity. Comment or remove the autoclose label in order to avoid having this PR closed.

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

Successfully merging this pull request may close these issues.

4 participants