-
Notifications
You must be signed in to change notification settings - Fork 766
Open
Description
Overview
I am running into fatal error when using zebra api to redistribute many (several hundreds) routes.
The operation i did include following steps:
- use iproute2 command to several hundreds of routes into kernel;
- start gobgpd with configuration shown below. I am using GoBGP for network emulation, where I run many GoBGP instances in separate containers. I selected one running into panic, which sets manny neighbor connection and has many policies.
- the gobgpd runs into panic shown below.
Error (Panic) encounterd
The error is shown below, based on commit 911ab22:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1098690]
goroutine 32 [running]:
github.com/osrg/gobgp/v4/internal/pkg/table.UpdatePathAttrs(0xc0004a66b0, 0xc0002e0018, 0xc000262b08, 0x0, 0xc0001e9320)
github.com/osrg/gobgp/v4/internal/pkg/table/path.go:248 +0x450
github.com/osrg/gobgp/v4/pkg/server.(*BgpServer).prePolicyFilterpath(0xc0002e0008, 0xc0001333b0, 0xc0001e9320, 0x0)
github.com/osrg/gobgp/v4/pkg/server/server.go:626 +0x987
github.com/osrg/gobgp/v4/pkg/server.(*BgpServer).filterpath(0xc0002e0008, 0xc0001333b0, 0xc0001e9320, 0x0)
github.com/osrg/gobgp/v4/pkg/server/server.go:658 +0x85
github.com/osrg/gobgp/v4/pkg/server.(*BgpServer).processOutgoingPaths(0xc0002e0008, 0xc0001333b0, {0xc000480228, 0x1, 0x1}, {0xc000480230, 0x1, 0x1})
github.com/osrg/gobgp/v4/pkg/server/server.go:1046 +0x1c5
github.com/osrg/gobgp/v4/pkg/server.(*BgpServer).propagateUpdateToNeighbors(0xc0002e0008, 0xc00055e6f0, 0x0, 0xc0001e9320, {0xc000480208, 0x1, 0x1}, 0x1)
github.com/osrg/gobgp/v4/pkg/server/server.go:1344 +0xc69
github.com/osrg/gobgp/v4/pkg/server.(*BgpServer).propagateUpdate(0xc0002e0008, 0x0, {0xc0004801d0, 0x1, 0x1})
github.com/osrg/gobgp/v4/pkg/server/server.go:1191 +0x7cb
github.com/osrg/gobgp/v4/pkg/server.(*BgpServer).addPathList(0xc0002e0008, {0x0, 0x0}, {0xc0004801d0, 0x1, 0x1})
github.com/osrg/gobgp/v4/pkg/server/server.go:2097 +0x99
github.com/osrg/gobgp/v4/pkg/server.(*BgpServer).addPathStream.func1()
github.com/osrg/gobgp/v4/pkg/server/server.go:2104 +0x76
github.com/osrg/gobgp/v4/pkg/server.(*BgpServer).handleMGMTOp(0xc0002e0008, 0xc0005a0480)
github.com/osrg/gobgp/v4/pkg/server/server.go:236 +0x7e
github.com/osrg/gobgp/v4/pkg/server.(*BgpServer).Serve(0xc0002e0008)
github.com/osrg/gobgp/v4/pkg/server/server.go:382 +0x83e
created by main.main in goroutine 1
github.com/osrg/gobgp/v4/cmd/gobgpd/main.go:230 +0x29c9
Configration used
global:
config:
as: 4637
router-id: 10.0.18.29
local-address-list: ["10.0.18.29"]
use-multiple-paths:
config:
enabled: true
apply-policy:
config:
import-policy-list: ["inbound-policy"]
export-policy-list: ["outbound-policy"]
default-import-policy: "accept-route"
default-export-policy: "reject-route"
# ========= Community sets used above =========
defined-sets:
bgp-defined-sets:
community-sets:
- community-set-name: from_provider
community-list: ["1:300"]
- community-set-name: from_peer
community-list: ["1:200"]
- community-set-name: from_customer
community-list: ["1:100"]
prefix-sets:
- prefix-set-name: connect_address
prefix-list:
- ip-prefix: "10.0.0.0/8"
masklength-range: "32..32"
neighbor-sets:
- neighbor-set-name: provider_set
neighbor-info-list:
- 10.0.36.88
- neighbor-set-name: peer_set
neighbor-info-list:
- 10.0.13.134
- 10.0.14.78
- 10.0.15.218
- 10.0.16.38
- 10.0.17.163
- 10.0.17.186
- 10.0.17.242
- 10.0.18.50
- 10.0.18.229
- 10.0.29.55
- 10.0.36.37
- 10.0.36.47
- 10.0.36.77
- 10.0.37.33
- 10.0.37.208
- 10.0.38.1
- 10.0.38.197
- 10.0.39.119
- 10.0.68.129
- 10.0.70.70
- 10.0.92.197
- 10.0.92.212
- 10.0.219.126
- 10.0.228.85
- 10.0.229.155
- 10.0.231.235
- 10.0.248.143
- 10.0.249.172
- 10.0.250.47
- 10.2.4.107
- 10.2.5.147
- 10.2.12.52
- 10.2.27.11
- 10.2.82.130
- neighbor-set-name: customer_set
neighbor-info-list:
- 10.0.18.201
- 10.0.29.44
- 10.0.36.13
- 10.0.36.28
- 10.0.36.53
- 10.0.37.112
- 10.0.38.158
- 10.0.38.196
- 10.0.39.115
- 10.0.39.127
- 10.0.39.143
- 10.0.39.151
- 10.0.39.238
- 10.0.68.146
- 10.0.68.211
- 10.0.69.45
- 10.0.69.53
- 10.0.70.126
- 10.0.71.3
- 10.0.71.235
- 10.0.71.248
- 10.0.94.118
- 10.0.149.32
- 10.0.150.78
- 10.0.150.178
- 10.0.176.131
- 10.0.177.162
- 10.0.178.185
- 10.0.217.87
- 10.0.218.125
- 10.0.229.3
- 10.0.249.183
- 10.0.249.237
- 10.0.250.78
- 10.2.8.7
- 10.2.8.84
- 10.2.9.22
- 10.2.9.72
- 10.2.9.207
- 10.2.10.120
- 10.2.10.139
- 10.2.11.60
- 10.2.12.222
- 10.2.15.169
- 10.2.15.228
- 10.2.15.246
- 10.2.17.139
- 10.2.20.31
- 10.2.21.14
- 10.2.22.193
- 10.2.24.170
- 10.2.25.35
- 10.2.26.129
- 10.2.30.243
- 10.2.39.131
- 10.2.41.153
- 10.2.42.183
- 10.2.43.38
- 10.2.74.121
# ========= Neighbors (only per-neighbor bits here) =========
neighbors:
- config:
neighbor-address: 10.0.36.88
peer-as: 9304
peer-group: neighbor-group
- config:
neighbor-address: 10.0.13.134
peer-as: 3462
peer-group: neighbor-group
- config:
neighbor-address: 10.0.14.78
peer-as: 3662
peer-group: neighbor-group
- config:
neighbor-address: 10.0.15.218
peer-as: 4058
peer-group: neighbor-group
- config:
neighbor-address: 10.0.16.38
peer-as: 4134
peer-group: neighbor-group
- config:
neighbor-address: 10.0.17.163
peer-as: 4515
peer-group: neighbor-group
- config:
neighbor-address: 10.0.17.186
peer-as: 4538
peer-group: neighbor-group
- config:
neighbor-address: 10.0.17.242
peer-as: 4594
peer-group: neighbor-group
- config:
neighbor-address: 10.0.18.50
peer-as: 4658
peer-group: neighbor-group
- config:
neighbor-address: 10.0.18.229
peer-as: 4837
peer-group: neighbor-group
- config:
neighbor-address: 10.0.29.55
peer-as: 7479
peer-group: neighbor-group
- config:
neighbor-address: 10.0.36.37
peer-as: 9253
peer-group: neighbor-group
- config:
neighbor-address: 10.0.36.47
peer-as: 9263
peer-group: neighbor-group
- config:
neighbor-address: 10.0.36.77
peer-as: 9293
peer-group: neighbor-group
- config:
neighbor-address: 10.0.37.33
peer-as: 9505
peer-group: neighbor-group
- config:
neighbor-address: 10.0.37.208
peer-as: 9680
peer-group: neighbor-group
- config:
neighbor-address: 10.0.38.1
peer-as: 9729
peer-group: neighbor-group
- config:
neighbor-address: 10.0.38.197
peer-as: 9925
peer-group: neighbor-group
- config:
neighbor-address: 10.0.39.119
peer-as: 10103
peer-group: neighbor-group
- config:
neighbor-address: 10.0.68.129
peer-as: 17537
peer-group: neighbor-group
- config:
neighbor-address: 10.0.70.70
peer-as: 17990
peer-group: neighbor-group
- config:
neighbor-address: 10.0.92.197
peer-as: 23749
peer-group: neighbor-group
- config:
neighbor-address: 10.0.92.212
peer-as: 23764
peer-group: neighbor-group
- config:
neighbor-address: 10.0.219.126
peer-as: 56190
peer-group: neighbor-group
- config:
neighbor-address: 10.0.228.85
peer-as: 58453
peer-group: neighbor-group
- config:
neighbor-address: 10.0.229.155
peer-as: 58779
peer-group: neighbor-group
- config:
neighbor-address: 10.0.231.235
peer-as: 59371
peer-group: neighbor-group
- config:
neighbor-address: 10.0.248.143
peer-as: 63631
peer-group: neighbor-group
- config:
neighbor-address: 10.0.249.172
peer-as: 63916
peer-group: neighbor-group
- config:
neighbor-address: 10.0.250.47
peer-as: 64047
peer-group: neighbor-group
- config:
neighbor-address: 10.2.4.107
peer-as: 132203
peer-group: neighbor-group
- config:
neighbor-address: 10.2.5.147
peer-as: 132499
peer-group: neighbor-group
- config:
neighbor-address: 10.2.12.52
peer-as: 134196
peer-group: neighbor-group
- config:
neighbor-address: 10.2.27.11
peer-as: 137995
peer-group: neighbor-group
- config:
neighbor-address: 10.2.82.130
peer-as: 152194
peer-group: neighbor-group
- config:
neighbor-address: 10.0.18.201
peer-as: 4809
peer-group: neighbor-group
- config:
neighbor-address: 10.0.29.44
peer-as: 7468
peer-group: neighbor-group
- config:
neighbor-address: 10.0.36.13
peer-as: 9229
peer-group: neighbor-group
- config:
neighbor-address: 10.0.36.28
peer-as: 9244
peer-group: neighbor-group
- config:
neighbor-address: 10.0.36.53
peer-as: 9269
peer-group: neighbor-group
- config:
neighbor-address: 10.0.37.112
peer-as: 9584
peer-group: neighbor-group
- config:
neighbor-address: 10.0.38.158
peer-as: 9886
peer-group: neighbor-group
- config:
neighbor-address: 10.0.38.196
peer-as: 9924
peer-group: neighbor-group
- config:
neighbor-address: 10.0.39.115
peer-as: 10099
peer-group: neighbor-group
- config:
neighbor-address: 10.0.39.127
peer-as: 10111
peer-group: neighbor-group
- config:
neighbor-address: 10.0.39.143
peer-as: 10127
peer-group: neighbor-group
- config:
neighbor-address: 10.0.39.151
peer-as: 10135
peer-group: neighbor-group
- config:
neighbor-address: 10.0.39.238
peer-as: 10222
peer-group: neighbor-group
- config:
neighbor-address: 10.0.68.146
peer-as: 17554
peer-group: neighbor-group
- config:
neighbor-address: 10.0.68.211
peer-as: 17619
peer-group: neighbor-group
- config:
neighbor-address: 10.0.69.45
peer-as: 17709
peer-group: neighbor-group
- config:
neighbor-address: 10.0.69.53
peer-as: 17717
peer-group: neighbor-group
- config:
neighbor-address: 10.0.70.126
peer-as: 18046
peer-group: neighbor-group
- config:
neighbor-address: 10.0.71.3
peer-as: 18179
peer-group: neighbor-group
- config:
neighbor-address: 10.0.71.235
peer-as: 18411
peer-group: neighbor-group
- config:
neighbor-address: 10.0.71.248
peer-as: 18424
peer-group: neighbor-group
- config:
neighbor-address: 10.0.94.118
peer-as: 24182
peer-group: neighbor-group
- config:
neighbor-address: 10.0.149.32
peer-as: 38176
peer-group: neighbor-group
- config:
neighbor-address: 10.0.150.78
peer-as: 38478
peer-group: neighbor-group
- config:
neighbor-address: 10.0.150.178
peer-as: 38578
peer-group: neighbor-group
- config:
neighbor-address: 10.0.176.131
peer-as: 45187
peer-group: neighbor-group
- config:
neighbor-address: 10.0.177.162
peer-as: 45474
peer-group: neighbor-group
- config:
neighbor-address: 10.0.178.185
peer-as: 45753
peer-group: neighbor-group
- config:
neighbor-address: 10.0.217.87
peer-as: 55639
peer-group: neighbor-group
- config:
neighbor-address: 10.0.218.125
peer-as: 55933
peer-group: neighbor-group
- config:
neighbor-address: 10.0.229.3
peer-as: 58627
peer-group: neighbor-group
- config:
neighbor-address: 10.0.249.183
peer-as: 63927
peer-group: neighbor-group
- config:
neighbor-address: 10.0.249.237
peer-as: 63981
peer-group: neighbor-group
- config:
neighbor-address: 10.0.250.78
peer-as: 64078
peer-group: neighbor-group
- config:
neighbor-address: 10.2.8.7
peer-as: 133127
peer-group: neighbor-group
- config:
neighbor-address: 10.2.8.84
peer-as: 133204
peer-group: neighbor-group
- config:
neighbor-address: 10.2.9.22
peer-as: 133398
peer-group: neighbor-group
- config:
neighbor-address: 10.2.9.72
peer-as: 133448
peer-group: neighbor-group
- config:
neighbor-address: 10.2.9.207
peer-as: 133583
peer-group: neighbor-group
- config:
neighbor-address: 10.2.10.120
peer-as: 133752
peer-group: neighbor-group
- config:
neighbor-address: 10.2.10.139
peer-as: 133771
peer-group: neighbor-group
- config:
neighbor-address: 10.2.11.60
peer-as: 133948
peer-group: neighbor-group
- config:
neighbor-address: 10.2.12.222
peer-as: 134366
peer-group: neighbor-group
- config:
neighbor-address: 10.2.15.169
peer-as: 135081
peer-group: neighbor-group
- config:
neighbor-address: 10.2.15.228
peer-as: 135140
peer-group: neighbor-group
- config:
neighbor-address: 10.2.15.246
peer-as: 135158
peer-group: neighbor-group
- config:
neighbor-address: 10.2.17.139
peer-as: 135563
peer-group: neighbor-group
- config:
neighbor-address: 10.2.20.31
peer-as: 136223
peer-group: neighbor-group
- config:
neighbor-address: 10.2.21.14
peer-as: 136462
peer-group: neighbor-group
- config:
neighbor-address: 10.2.22.193
peer-as: 136897
peer-group: neighbor-group
- config:
neighbor-address: 10.2.24.170
peer-as: 137386
peer-group: neighbor-group
- config:
neighbor-address: 10.2.25.35
peer-as: 137507
peer-group: neighbor-group
- config:
neighbor-address: 10.2.26.129
peer-as: 137857
peer-group: neighbor-group
- config:
neighbor-address: 10.2.30.243
peer-as: 138995
peer-group: neighbor-group
- config:
neighbor-address: 10.2.39.131
peer-as: 141187
peer-group: neighbor-group
- config:
neighbor-address: 10.2.41.153
peer-as: 141721
peer-group: neighbor-group
- config:
neighbor-address: 10.2.42.183
peer-as: 142007
peer-group: neighbor-group
- config:
neighbor-address: 10.2.43.38
peer-as: 142118
peer-group: neighbor-group
- config:
neighbor-address: 10.2.74.121
peer-as: 150137
peer-group: neighbor-group
# ========= Shared settings via peer-groups =========
peer-groups:
- config:
peer-group-name: neighbor-group
timers:
config:
connect-retry: 5
hold-time: 30000
keepalive-interval: 10000
ebgp-multihop:
config:
enabled: true
multihop-ttl: 2
afi-safis:
- config:
afi-safi-name: ipv4-unicast
# ========= Policies (valley-free tagging + export control) =========
policy-definitions:
# Tag routes on import by relationship
- name: inbound-policy
statements:
# Import from providers
- conditions:
match-neighbor-set:
neighbor-set: provider_set
match-set-options: any
actions:
bgp-actions:
set-community:
options: replace
set-community-method:
communities-list: ["1:300"]
route-disposition: accept-route
# Import from peers
- conditions:
match-neighbor-set:
neighbor-set: peer_set
match-set-options: any
actions:
bgp-actions:
set-community:
options: replace
set-community-method:
communities-list: ["1:200"]
route-disposition: accept-route
# Import from customers
- conditions:
match-neighbor-set:
neighbor-set: customer_set
match-set-options: any
actions:
bgp-actions:
set-community:
options: replace
set-community-method:
communities-list: ["1:100"]
route-disposition: accept-route
- actions:
route-disposition: accept-route
- name: outbound-policy
statements:
# Export routes from Providers to Customers only
- conditions:
bgp-conditions:
match-community-set:
community-set: from_provider
match-set-options: any
match-neighbor-set:
neighbor-set: customer_set
match-set-options: any
actions:
bgp-actions:
set-community:
options: remove
set-community-method:
communities-list: ["1:300"]
route-disposition: accept-route
# Export routes from Peers to Customers only
- conditions:
bgp-conditions:
match-community-set:
community-set: from_peer
match-set-options: any
match-neighbor-set:
neighbor-set: customer_set
match-set-options: any
actions:
bgp-actions:
set-community:
options: remove
set-community-method:
communities-list: ["1:200"]
route-disposition: accept-route
# Export routes from Customers to anyone
- conditions:
bgp-conditions:
match-community-set:
community-set: from_customer
match-set-options: any
actions:
bgp-actions:
set-community:
options: remove
set-community-method:
communities-list: ["1:100"]
route-disposition: accept-route
# Export self generated routes (nexthop excluded)
- conditions:
match-prefix-set:
prefix-set: connect_address
match-set-options: invert
bgp-conditions:
# route-type: local
as-path-length:
operator: eq
value: 1
actions:
route-disposition: accept-route
- actions:
route-disposition: reject-route
zebra:
config:
enabled: true
url: "unix:/var/run/frr/zserv.api"
redistribute-route-type-list: ["kernel"]
version: 6
software-name: frr8
Metadata
Metadata
Assignees
Labels
No labels