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

ospfd: no router ospf crash fix #4685

Merged
merged 1 commit into from
Jul 16, 2019
Merged

Conversation

chiragshah6
Copy link
Member

@chiragshah6 chiragshah6 commented Jul 14, 2019

no router ospf triggers to cancel all threads including read/write (receive/send packets) threads,
cleans up resources fd, message queue and data.

Last job of write (packet) thread invoked where the ospf instance is referenced is not running nor the socket fd valid.

Thread callback should check if fd is valid and ospf instance is running before proceeding to send a message over socket.

It should address issues 4542 and 4248

Testing Done:

Performed the multiple 'no router ospf' with the fix in topology where the crash was seen.
Post fix the crash is not observed.

Signed-off-by: Chirag Shah chirag@cumulusnetworks.com

Copy link

@polychaeta polychaeta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution to FRR!

  • One of your commits is missing a Signed-off-by line; we can't accept your contribution until all of your commits have one

If you are a new contributor to FRR, please see our contributing guidelines.

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-8358/

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.

Warnings Generated during build:

Checkout code: Successful with additional warnings
Report for ospf_packet.c | 2 issues
===============================================
< WARNING: Prefer using '"%s...", __func__' to using 'ospf_write', this function's name, in a string
< #664: FILE: /tmp/f1-23681/ospf_packet.c:664:

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-8358/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: changelog-should-mention-nmu

CLANG Static Analyzer Summary

  • Github Pull Request 4685, comparing to Git base SHA 96e1097

No Changes in Static Analysis warnings compared to base

1 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-8358/artifact/shared/static_analysis/index.html

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-8357/

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.

Warnings Generated during build:

Checkout code: Successful with additional warnings
Report for ospf_packet.c | 2 issues
===============================================
< WARNING: Prefer using '"%s...", __func__' to using 'ospf_write', this function's name, in a string
< #664: FILE: /tmp/f1-21390/ospf_packet.c:664:

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-8357/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: changelog-should-mention-nmu

CLANG Static Analyzer Summary

  • Github Pull Request 4685, comparing to Git base SHA 96e1097

No Changes in Static Analysis warnings compared to base

1 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-8357/artifact/shared/static_analysis/index.html

Copy link
Member

@odd22 odd22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

no router ospf triggers to cancel all threads
including read/write (receive/send packets) threads,
cleans up resources fd, message queue and data.

Last job of write (packet) thread invoked where the
ospf instance is referenced is not running nor
the socket fd valid.

Write thread callback should check if fd is valid and
ospf instance is running before proceeding to send a
message over socket.

Ticket:CM-20095
Testing Done:

Performed the multiple 'no router ospf' with the fix
in topology where the crash was seen.
Post fix the crash is not observed.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
@chiragshah6
Copy link
Member Author

Thanks @odd22 (Olivier), I have pushed a change to move unguarded debug statement to a ospf debug filter.

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: FAILED

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

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

IPv6 protocols on Ubuntu 14.04: Failed (click for details)
Successful on other platforms
  • IPv4 ldp protocol on Ubuntu 16.04
  • Ubuntu 14.04 deb pkg check
  • Debian 8 deb pkg check
  • Addresssanitizer topotest
  • IPv4 protocols on Ubuntu 14.04
  • Topology tests on Ubuntu 16.04 amd64
  • Debian 9 deb pkg check
  • Topotest tests on Ubuntu 16.04 i386
  • CentOS 7 rpm pkg check
  • Debian 10 deb pkg check
  • Static analyzer (clang)
  • Ubuntu 16.04 deb pkg check
  • Topology tests on Ubuntu 18.04 amd64
  • Fedora 29 rpm pkg check
  • Ubuntu 12.04 deb pkg check

Warnings Generated during build:

Checkout code: Successful with additional warnings
IPv6 protocols on Ubuntu 14.04: Failed (click for details)
Report for ospf_packet.c | 4 issues
===============================================
< WARNING: Prefer using '"%s...", __func__' to using 'ospf_write', this function's name, in a string
< #666: FILE: /tmp/f1-21926/ospf_packet.c:666:
< ERROR: space required after that ',' (ctx:ExV)
< #667: FILE: /tmp/f1-21926/ospf_packet.c:667:

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-8360/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: changelog-should-mention-nmu

CLANG Static Analyzer Summary

  • Github Pull Request 4685, comparing to Git base SHA 96e1097

No Changes in Static Analysis warnings compared to base

1 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-8360/artifact/shared/static_analysis/index.html

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-8360/

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.

Warnings Generated during build:

Checkout code: Successful with additional warnings
Report for ospf_packet.c | 4 issues
===============================================
< WARNING: Prefer using '"%s...", __func__' to using 'ospf_write', this function's name, in a string
< #666: FILE: /tmp/f1-21926/ospf_packet.c:666:
< ERROR: space required after that ',' (ctx:ExV)
< #667: FILE: /tmp/f1-21926/ospf_packet.c:667:

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-8360/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: changelog-should-mention-nmu

CLANG Static Analyzer Summary

  • Github Pull Request 4685, comparing to Git base SHA 96e1097

No Changes in Static Analysis warnings compared to base

1 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-8360/artifact/shared/static_analysis/index.html

@LabN-CI

This comment has been minimized.

Copy link
Member

@riw777 riw777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@riw777
Copy link
Member

riw777 commented Jul 16, 2019

@louberger can you look at why this is failing the labn tests? :-)

@rwestphal
Copy link
Member

This shouldn't fix #4248 as that problem happens during runtime and not when no router ospf is entered. This might fix #4542 though.

@LabN-CI
Copy link
Collaborator

LabN-CI commented Jul 16, 2019

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/4685 c32eba0
Date 07/16/2019
Start 16:38:56
Finish 17:00:36
Run-Time 21:40
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2019-07-16-16:38:56.txt
Log autoscript-2019-07-16-16:39:45.log.bz2
Memory 425 428 361

For details, please contact louberger

@louberger
Copy link
Member

louberger commented Jul 16, 2019 via email

@riw777 riw777 merged commit a046868 into FRRouting:master Jul 16, 2019
@ton31337 ton31337 mentioned this pull request May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants