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

Sa from clang #1547

Merged
merged 3 commits into from
Dec 15, 2017
Merged

Sa from clang #1547

merged 3 commits into from
Dec 15, 2017

Conversation

donaldsharp
Copy link
Member

A small grab-bag of SA issues cleaned up.

@LabN-CI
Copy link
Collaborator

LabN-CI commented Dec 13, 2017

🛑 Basic BGPD CI results: FAILURE

Results table
_ _
Result FAILURE git merge/1547 ca88eba Crash -- 3 cores
Date 12/13/2017
Start 11:55:09
Finish 11:55:59
Run-Time 00:50
Total 62
Pass 60
Fail 2
Valgrind-Errors
Valgrind-Loss
Details vncregress-2017-12-13-11:55:09.txt
Log autoscript-2017-12-13-11:55:45.log.bz2

For details, please contact louberger

@louberger
Copy link
Member

Stack decode
core.8039-bgpd-2017-12-13

Core was generated by `./bgpd -f /scratch/home/sw/regression/frr-reference/master/github/testconfigs/R'.
Program terminated with signal 6, Aborted.
[New process 8039]
[New process 8041]
[New process 8042]
#0 0x0000003acc432495 in raise () from /lib64/libc.so.6
(gdb) #0 0x0000003acc432495 in raise () from /lib64/libc.so.6
#1 0x0000003acc433c75 in abort () from /lib64/libc.so.6
#2 0x00000000004ccf07 in core_handler (signo=11, siginfo=0x7ffdfe5b7fb0,
context=0x7ffdfe5b7e80) at lib/sigevent.c:249
#3
#4 bgp_info_mpath_update (rn=0x1737760, new_best=0x0, old_best=0x172b3a0,
mp_list=) at bgp_mpath.c:313
#5 0x0000000000446c6a in bgp_best_selection (bgp=) at bgp_route.c:1933
#6 0x0000000000446d69 in bgp_process_main_one (bgp=0x165be60, rn=0x1737760,
afi=) at bgp_route.c:2073
#7 0x0000000000447201 in bgp_process_wq (wq=,
data=0x171cab0) at bgp_route.c:2254
#8 0x00000000004dac97 in work_queue_run (thread=0x7ffdfe5b8930)
at lib/workqueue.c:282
#9 0x00000000004d41ba in thread_call (thread=0x7ffdfe5b8930)
at lib/thread.c:1486
#10 0x00000000004bf7fc in frr_run (master=0x12fb6e0) at lib/libfrr.c:879
#11 0x000000000042073f in main (argc=15, argv=) at bgp_main.c:404
(gdb)

Stack decode
core.8017-bgpd-2017-12-13

Core was generated by `./bgpd -f /scratch/home/sw/regression/frr-reference/master/github/testconfigs/R'.
Program terminated with signal 6, Aborted.
[New process 8017]
[New process 8020]
[New process 8019]
#0 0x0000003acc432495 in raise () from /lib64/libc.so.6
(gdb) #0 0x0000003acc432495 in raise () from /lib64/libc.so.6
#1 0x0000003acc433c75 in abort () from /lib64/libc.so.6
#2 0x00000000004ccf07 in core_handler (signo=11, siginfo=0x7ffe8bb25870,
context=0x7ffe8bb25740) at lib/sigevent.c:249
#3
#4 bgp_info_mpath_update (rn=0x123d250, new_best=0x0, old_best=0x1236320,
mp_list=) at bgp_mpath.c:313
#5 0x0000000000446c6a in bgp_best_selection (bgp=) at bgp_route.c:1933
#6 0x0000000000446d69 in bgp_process_main_one (bgp=0x116ee60, rn=0x123d250,
afi=) at bgp_route.c:2073
#7 0x0000000000447201 in bgp_process_wq (wq=,
data=0x116ee00) at bgp_route.c:2254
#8 0x00000000004dac97 in work_queue_run (thread=0x7ffe8bb261f0)
at lib/workqueue.c:282
#9 0x00000000004d41ba in thread_call (thread=0x7ffe8bb261f0)
at lib/thread.c:1486
#10 0x00000000004bf7fc in frr_run (master=0xe0e6e0) at lib/libfrr.c:879
#11 0x000000000042073f in main (argc=15, argv=) at bgp_main.c:404
(gdb)

Stack decode
core.8061-bgpd-2017-12-13

Core was generated by `./bgpd -f /scratch/home/sw/regression/frr-reference/master/github/testconfigs/R'.
Program terminated with signal 6, Aborted.
[New process 8061]
[New process 8063]
[New process 8064]
#0 0x0000003acc432495 in raise () from /lib64/libc.so.6
(gdb) #0 0x0000003acc432495 in raise () from /lib64/libc.so.6
#1 0x0000003acc433c75 in abort () from /lib64/libc.so.6
#2 0x00000000004ccf07 in core_handler (signo=11, siginfo=0x7ffe97880b70,
context=0x7ffe97880a40) at lib/sigevent.c:249
#3
#4 bgp_info_mpath_update (rn=0x1288ab0, new_best=0x0, old_best=0x1366050,
mp_list=) at bgp_mpath.c:313
#5 0x0000000000446c6a in bgp_best_selection (bgp=) at bgp_route.c:1933
#6 0x0000000000446d69 in bgp_process_main_one (bgp=0x1289e60, rn=0x1288ab0,
afi=) at bgp_route.c:2073
#7 0x0000000000447201 in bgp_process_wq (wq=,
data=0x134b3a0) at bgp_route.c:2254
#8 0x00000000004dac97 in work_queue_run (thread=0x7ffe97881510)
at lib/workqueue.c:282
#9 0x00000000004d41ba in thread_call (thread=0x7ffe97881510)
at lib/thread.c:1486
#10 0x00000000004bf7fc in frr_run (master=0xf296e0) at lib/libfrr.c:879
#11 0x000000000042073f in main (argc=15, argv=) at bgp_main.c:404
(gdb)

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: FAILED

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

This is a comment from an EXPERIMENTAL 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 and apply patch from patchwork: Successful

Building Stage: Successful

Basic Tests: Failed

Ubuntu 16.04 deb pkg check: Successful
CentOS 7 rpm pkg check: Successful
IPv4 ldp protocol on Ubuntu 16.04: Successful
Ubuntu 14.04 deb pkg check: Successful
Addresssanitizer topotest: Successful
Debian 8 deb pkg check: Successful
Fedora 24 rpm pkg check: Successful
Topology tests on Ubuntu 16.04 amd64: Successful
Debian 9 deb pkg check: Successful
CentOS 6 rpm pkg check: Successful
Static analyzer (clang): Successful
Ubuntu 12.04 deb pkg check: Successful

IPv4 protocols on Ubuntu 14.04: Failed

RFC Compliance Test ANVL-BGP4-1.3 failing:
Test Summary
Router adds routes contained in the newly received Update Message to
its routing table
Test Reference
ANVL, setup verification
Test Classification
MUST
Test ANVL-BGP4-1.3: !FAILED!
External peer failed to open BGP4 Connection
with DUT through

RFC Compliance Test ANVL-BGP4-1.4 failing:
Test Summary
Router forwards new Update routes
Test Reference
ANVL, setup verification
Test Classification
MUST
Test ANVL-BGP4-1.4: !FAILED!
External peer failed to open BGP4 Connection
with DUT through

RFC Compliance Test ANVL-BGP4-4.1 failing:
Test Summary
An UPDATE message MAY simultaneously advertise a feasible route and
withdraw multiple unfeasible routes from service.
Test Reference
RFC4271, Sect. 4.3, p 15,
UPDATE Message Format
Test Classification
MAY
Test ANVL-BGP4-4.1: !FAILED!
External peer failed to open BGP4 Connection
with DUT through

RFC Compliance Test ANVL-BGP4-21.4 failing:
Test Summary
Start event is ignored in the OpenSent state.
Test Reference
RFC4271, Sect. 8.2.2, p 63,
BGP Finite State machine
Test Classification
MUST
Test ANVL-BGP4-21.4: !FAILED!
External peer failed to open TCP connection
with DUT through

RFC Compliance Test ANVL-BGP4-21.8 failing:
Test Summary
At OpenSent state if there are no errors in the OPEN message, the
local system:
- sends a KEEPALIVE message, and
- sets a KeepaliveTimer
Test Reference
RFC4271, Sect. 8.2.2, p 65,
BGP Finite State machine
Test Classification
MUST
Test ANVL-BGP4-21.8: !FAILED!
External peer failed to open TCP connection
with DUT through

RFC Compliance Test ANVL-BGP-AS4-2.6 failing:
Test Summary
To preserve AS path information with 4-octet AS numbers across OLD
BGP speakers, this document defines a new AS path attribute, called
AS4_PATH.This is an optional transitive attribute that contains the
AS path encoded with 4-octet AS numbers.
Test Reference
RFC4893 Section 3 Page 2 'Protocol Extensions'
Note: Here we check for the value in the field
Test Classification
MUST
Test ANVL-BGP-AS4-2.6: !FAILED!
External peer failed to open BGP4 Connection
with DUT through

IPv6 protocols on Ubuntu 14.04: Failed

RFC Compliance Test ANVL-BGPPLUS-1.1 failing:
Test Summary
DUT Listens on TCP port 179 for BGP4 Connection
Test Reference
ANVL, setup verification
Test Classification
MUST
Test ANVL-BGPPLUS-1.1: !FAILED!
External peer failed to open TCP connection
with port 179 of DUT through

RFC Compliance Test ANVL-BGPPLUS-6.3 failing:
Test Summary
To have a bi-directional exchange of routing information for a
particular <AFI, SAFI> between a pair of BGP speakers, each such
speaker must advertise to the other (via the Capability Advertisement
mechanism) the capability to support that particular <AFI, SAFI>
routes.
Test Reference
RFC 4760, Sect. 8, p 9,
Use of BGP Capability Advertisement
Test Classification
MUST
Test ANVL-BGPPLUS-6.3: !FAILED!
External peer failed to open TCP connection
with DUT through


Warnings Generated during build:

Ubuntu1404 amd64 build: Successful with additional warnings:

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

W: frr-dbg: debug-file-with-no-debug-symbols usr/lib/debug/usr/lib/libfrrfpm_pb.so.0.0.0
N: 5 tags overridden (5 warnings)

Debian8 amd64 build: Successful with additional warnings:

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

W: frr-dbg: debug-file-with-no-debug-symbols usr/lib/debug/usr/lib/libfrrfpm_pb.so.0.0.0
N: 5 tags overridden (5 warnings)

CLANG Static Analyzer Summary

  • Github Pull Request 1547, comparing to Git base SHA db33b83

Fixed warnings:

  • Logic error: Dereference of null pointer in bgpd/bgp_mpath.c, function bgp_info_mpath_update, line 452
  • Logic error: Dereference of null pointer in bgpd/bgp_mpath.c, function bgp_info_nexthop_cmp, line 107
  • Logic error: Dereference of null pointer in pimd/pim_iface.c, function pim_if_new, line 209
  • Logic error: Dereference of null pointer in zebra/interface.c, function if_delete_connected, line 591

Static Analysis warning summary compared to base:

  • Fixed warnings: 4
  • New warnings: 0

19 Static Analyzer issues remaining.

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

It is technically possible to attempt to use a NULL pointer.
Remove this from happening.

Additionally cleanup code indentation a small bit.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
When creating the pim_ifp, and we run out of memory there
existed a chance that we would dereference the failed memory
pointer.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
offset and offsetlen are never used without reassigning
in the code.  So comment out the assignments and
in case we want to start using the code for snmp
changes in the future.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
@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-2178/

This is a comment from an EXPERIMENTAL 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:

Ubuntu1404 amd64 build: Successful with additional warnings:

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

W: frr-dbg: debug-file-with-no-debug-symbols usr/lib/debug/usr/lib/libfrrfpm_pb.so.0.0.0
N: 5 tags overridden (5 warnings)

Debian8 amd64 build: Successful with additional warnings:

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

W: frr-dbg: debug-file-with-no-debug-symbols usr/lib/debug/usr/lib/libfrrfpm_pb.so.0.0.0
N: 5 tags overridden (5 warnings)

CLANG Static Analyzer Summary

  • Github Pull Request 1547, comparing to Git base SHA 9b7e34e

Fixed warnings:

  • Logic error: Dereference of null pointer in pimd/pim_iface.c, function pim_if_new, line 209
  • Logic error: Dereference of null pointer in zebra/interface.c, function if_delete_connected, line 591

Static Analysis warning summary compared to base:

  • Fixed warnings: 2
  • New warnings: 0

21 Static Analyzer issues remaining.

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

@LabN-CI
Copy link
Collaborator

LabN-CI commented Dec 14, 2017

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/1547 a35bb96
Date 12/14/2017
Start 11:33:18
Finish 11:56:25
Run-Time 23:07
Total 1805
Pass 1805
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2017-12-14-11:33:18.txt
Log autoscript-2017-12-14-11:33:56.log.bz2

For details, please contact louberger

@rzalamena rzalamena merged commit acf43be into FRRouting:master Dec 15, 2017
@donaldsharp donaldsharp deleted the sa_from_clang branch January 19, 2018 19:33
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

Successfully merging this pull request may close these issues.

5 participants