-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Very huge memory consumtion of bgpd after several 100 sh commands #5445
Comments
donaldsharp
added a commit
to donaldsharp/frr
that referenced
this issue
Dec 1, 2019
When dumping a large bit of table data via bgp_show_table and if there is no information to display for a particular `struct bgp_node *` the data allocated via json_object_new_array() is leaked. Not a big deal on small tables but if you have a full bgp feed and issue a show command that does not match any of the route nodes ( say `vtysh -c "show bgp ipv4 large-community-list FOO"`) then we will leak memory. Before code change and issuing the above show bgp large-community-list command 15-20 times: Memory statistics for bgpd: System allocator statistics: Total heap allocated: > 2GB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: > 2GB Free small blocks: 31 MiB Free ordinary blocks: 616 KiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 After: Memory statistics for bgpd: System allocator statistics: Total heap allocated: 924 MiB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: 558 MiB Free small blocks: 26 MiB Free ordinary blocks: 340 MiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 Please note the 340mb of free ordinary blocks is from the fact I issued a `show bgp ipv4 uni json` command and generated a large amount of data. Fixes: FRRouting#5445 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
donaldsharp
added a commit
to donaldsharp/frr
that referenced
this issue
Dec 2, 2019
When dumping a large bit of table data via bgp_show_table and if there is no information to display for a particular `struct bgp_node *` the data allocated via json_object_new_array() is leaked. Not a big deal on small tables but if you have a full bgp feed and issue a show command that does not match any of the route nodes ( say `vtysh -c "show bgp ipv4 large-community-list FOO"`) then we will leak memory. Before code change and issuing the above show bgp large-community-list command 15-20 times: Memory statistics for bgpd: System allocator statistics: Total heap allocated: > 2GB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: > 2GB Free small blocks: 31 MiB Free ordinary blocks: 616 KiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 After: Memory statistics for bgpd: System allocator statistics: Total heap allocated: 924 MiB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: 558 MiB Free small blocks: 26 MiB Free ordinary blocks: 340 MiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 Please note the 340mb of free ordinary blocks is from the fact I issued a `show bgp ipv4 uni json` command and generated a large amount of data. Fixes: FRRouting#5445 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
donaldsharp
added a commit
to donaldsharp/frr
that referenced
this issue
Dec 2, 2019
When dumping a large bit of table data via bgp_show_table and if there is no information to display for a particular `struct bgp_node *` the data allocated via json_object_new_array() is leaked. Not a big deal on small tables but if you have a full bgp feed and issue a show command that does not match any of the route nodes ( say `vtysh -c "show bgp ipv4 large-community-list FOO"`) then we will leak memory. Before code change and issuing the above show bgp large-community-list command 15-20 times: Memory statistics for bgpd: System allocator statistics: Total heap allocated: > 2GB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: > 2GB Free small blocks: 31 MiB Free ordinary blocks: 616 KiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 After: Memory statistics for bgpd: System allocator statistics: Total heap allocated: 924 MiB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: 558 MiB Free small blocks: 26 MiB Free ordinary blocks: 340 MiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 Please note the 340mb of free ordinary blocks is from the fact I issued a `show bgp ipv4 uni json` command and generated a large amount of data. Fixes: FRRouting#5445 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
donaldsharp
added a commit
to donaldsharp/frr
that referenced
this issue
Dec 2, 2019
When dumping a large bit of table data via bgp_show_table and if there is no information to display for a particular `struct bgp_node *` the data allocated via json_object_new_array() is leaked. Not a big deal on small tables but if you have a full bgp feed and issue a show command that does not match any of the route nodes ( say `vtysh -c "show bgp ipv4 large-community-list FOO"`) then we will leak memory. Before code change and issuing the above show bgp large-community-list command 15-20 times: Memory statistics for bgpd: System allocator statistics: Total heap allocated: > 2GB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: > 2GB Free small blocks: 31 MiB Free ordinary blocks: 616 KiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 After: Memory statistics for bgpd: System allocator statistics: Total heap allocated: 924 MiB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: 558 MiB Free small blocks: 26 MiB Free ordinary blocks: 340 MiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 Please note the 340mb of free ordinary blocks is from the fact I issued a `show bgp ipv4 uni json` command and generated a large amount of data. Fixes: FRRouting#5445 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Spantik
pushed a commit
to Spantik/frr
that referenced
this issue
Dec 2, 2019
When dumping a large bit of table data via bgp_show_table and if there is no information to display for a particular `struct bgp_node *` the data allocated via json_object_new_array() is leaked. Not a big deal on small tables but if you have a full bgp feed and issue a show command that does not match any of the route nodes ( say `vtysh -c "show bgp ipv4 large-community-list FOO"`) then we will leak memory. Before code change and issuing the above show bgp large-community-list command 15-20 times: Memory statistics for bgpd: System allocator statistics: Total heap allocated: > 2GB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: > 2GB Free small blocks: 31 MiB Free ordinary blocks: 616 KiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 After: Memory statistics for bgpd: System allocator statistics: Total heap allocated: 924 MiB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: 558 MiB Free small blocks: 26 MiB Free ordinary blocks: 340 MiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 Please note the 340mb of free ordinary blocks is from the fact I issued a `show bgp ipv4 uni json` command and generated a large amount of data. Fixes: FRRouting#5445 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Spantik
pushed a commit
to Spantik/frr
that referenced
this issue
Dec 2, 2019
When dumping a large bit of table data via bgp_show_table and if there is no information to display for a particular `struct bgp_node *` the data allocated via json_object_new_array() is leaked. Not a big deal on small tables but if you have a full bgp feed and issue a show command that does not match any of the route nodes ( say `vtysh -c "show bgp ipv4 large-community-list FOO"`) then we will leak memory. Before code change and issuing the above show bgp large-community-list command 15-20 times: Memory statistics for bgpd: System allocator statistics: Total heap allocated: > 2GB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: > 2GB Free small blocks: 31 MiB Free ordinary blocks: 616 KiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 After: Memory statistics for bgpd: System allocator statistics: Total heap allocated: 924 MiB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: 558 MiB Free small blocks: 26 MiB Free ordinary blocks: 340 MiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 Please note the 340mb of free ordinary blocks is from the fact I issued a `show bgp ipv4 uni json` command and generated a large amount of data. Fixes: FRRouting#5445 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
vishaldhingra
pushed a commit
to vishaldhingra/frr
that referenced
this issue
Dec 3, 2019
When dumping a large bit of table data via bgp_show_table and if there is no information to display for a particular `struct bgp_node *` the data allocated via json_object_new_array() is leaked. Not a big deal on small tables but if you have a full bgp feed and issue a show command that does not match any of the route nodes ( say `vtysh -c "show bgp ipv4 large-community-list FOO"`) then we will leak memory. Before code change and issuing the above show bgp large-community-list command 15-20 times: Memory statistics for bgpd: System allocator statistics: Total heap allocated: > 2GB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: > 2GB Free small blocks: 31 MiB Free ordinary blocks: 616 KiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 After: Memory statistics for bgpd: System allocator statistics: Total heap allocated: 924 MiB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: 558 MiB Free small blocks: 26 MiB Free ordinary blocks: 340 MiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 Please note the 340mb of free ordinary blocks is from the fact I issued a `show bgp ipv4 uni json` command and generated a large amount of data. Fixes: FRRouting#5445 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
vishaldhingra
pushed a commit
to vishaldhingra/frr
that referenced
this issue
Dec 3, 2019
When dumping a large bit of table data via bgp_show_table and if there is no information to display for a particular `struct bgp_node *` the data allocated via json_object_new_array() is leaked. Not a big deal on small tables but if you have a full bgp feed and issue a show command that does not match any of the route nodes ( say `vtysh -c "show bgp ipv4 large-community-list FOO"`) then we will leak memory. Before code change and issuing the above show bgp large-community-list command 15-20 times: Memory statistics for bgpd: System allocator statistics: Total heap allocated: > 2GB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: > 2GB Free small blocks: 31 MiB Free ordinary blocks: 616 KiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 After: Memory statistics for bgpd: System allocator statistics: Total heap allocated: 924 MiB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: 558 MiB Free small blocks: 26 MiB Free ordinary blocks: 340 MiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 Please note the 340mb of free ordinary blocks is from the fact I issued a `show bgp ipv4 uni json` command and generated a large amount of data. Fixes: FRRouting#5445 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
vishaldhingra
pushed a commit
to vishaldhingra/frr
that referenced
this issue
Dec 3, 2019
When dumping a large bit of table data via bgp_show_table and if there is no information to display for a particular `struct bgp_node *` the data allocated via json_object_new_array() is leaked. Not a big deal on small tables but if you have a full bgp feed and issue a show command that does not match any of the route nodes ( say `vtysh -c "show bgp ipv4 large-community-list FOO"`) then we will leak memory. Before code change and issuing the above show bgp large-community-list command 15-20 times: Memory statistics for bgpd: System allocator statistics: Total heap allocated: > 2GB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: > 2GB Free small blocks: 31 MiB Free ordinary blocks: 616 KiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 After: Memory statistics for bgpd: System allocator statistics: Total heap allocated: 924 MiB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: 558 MiB Free small blocks: 26 MiB Free ordinary blocks: 340 MiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 Please note the 340mb of free ordinary blocks is from the fact I issued a `show bgp ipv4 uni json` command and generated a large amount of data. Fixes: FRRouting#5445 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Spantik
pushed a commit
to Spantik/frr
that referenced
this issue
Dec 9, 2019
When dumping a large bit of table data via bgp_show_table and if there is no information to display for a particular `struct bgp_node *` the data allocated via json_object_new_array() is leaked. Not a big deal on small tables but if you have a full bgp feed and issue a show command that does not match any of the route nodes ( say `vtysh -c "show bgp ipv4 large-community-list FOO"`) then we will leak memory. Before code change and issuing the above show bgp large-community-list command 15-20 times: Memory statistics for bgpd: System allocator statistics: Total heap allocated: > 2GB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: > 2GB Free small blocks: 31 MiB Free ordinary blocks: 616 KiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 After: Memory statistics for bgpd: System allocator statistics: Total heap allocated: 924 MiB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: 558 MiB Free small blocks: 26 MiB Free ordinary blocks: 340 MiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 Please note the 340mb of free ordinary blocks is from the fact I issued a `show bgp ipv4 uni json` command and generated a large amount of data. Fixes: FRRouting#5445 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Spantik
pushed a commit
to Spantik/frr
that referenced
this issue
Dec 9, 2019
When dumping a large bit of table data via bgp_show_table and if there is no information to display for a particular `struct bgp_node *` the data allocated via json_object_new_array() is leaked. Not a big deal on small tables but if you have a full bgp feed and issue a show command that does not match any of the route nodes ( say `vtysh -c "show bgp ipv4 large-community-list FOO"`) then we will leak memory. Before code change and issuing the above show bgp large-community-list command 15-20 times: Memory statistics for bgpd: System allocator statistics: Total heap allocated: > 2GB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: > 2GB Free small blocks: 31 MiB Free ordinary blocks: 616 KiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 After: Memory statistics for bgpd: System allocator statistics: Total heap allocated: 924 MiB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: 558 MiB Free small blocks: 26 MiB Free ordinary blocks: 340 MiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 Please note the 340mb of free ordinary blocks is from the fact I issued a `show bgp ipv4 uni json` command and generated a large amount of data. Fixes: FRRouting#5445 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Spantik
pushed a commit
to Spantik/frr
that referenced
this issue
Dec 10, 2019
When dumping a large bit of table data via bgp_show_table and if there is no information to display for a particular `struct bgp_node *` the data allocated via json_object_new_array() is leaked. Not a big deal on small tables but if you have a full bgp feed and issue a show command that does not match any of the route nodes ( say `vtysh -c "show bgp ipv4 large-community-list FOO"`) then we will leak memory. Before code change and issuing the above show bgp large-community-list command 15-20 times: Memory statistics for bgpd: System allocator statistics: Total heap allocated: > 2GB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: > 2GB Free small blocks: 31 MiB Free ordinary blocks: 616 KiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 After: Memory statistics for bgpd: System allocator statistics: Total heap allocated: 924 MiB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: 558 MiB Free small blocks: 26 MiB Free ordinary blocks: 340 MiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 Please note the 340mb of free ordinary blocks is from the fact I issued a `show bgp ipv4 uni json` command and generated a large amount of data. Fixes: FRRouting#5445 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Spantik
pushed a commit
to Spantik/frr
that referenced
this issue
Dec 10, 2019
When dumping a large bit of table data via bgp_show_table and if there is no information to display for a particular `struct bgp_node *` the data allocated via json_object_new_array() is leaked. Not a big deal on small tables but if you have a full bgp feed and issue a show command that does not match any of the route nodes ( say `vtysh -c "show bgp ipv4 large-community-list FOO"`) then we will leak memory. Before code change and issuing the above show bgp large-community-list command 15-20 times: Memory statistics for bgpd: System allocator statistics: Total heap allocated: > 2GB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: > 2GB Free small blocks: 31 MiB Free ordinary blocks: 616 KiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 After: Memory statistics for bgpd: System allocator statistics: Total heap allocated: 924 MiB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: 558 MiB Free small blocks: 26 MiB Free ordinary blocks: 340 MiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 Please note the 340mb of free ordinary blocks is from the fact I issued a `show bgp ipv4 uni json` command and generated a large amount of data. Fixes: FRRouting#5445 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Spantik
pushed a commit
to Spantik/frr
that referenced
this issue
Dec 10, 2019
When dumping a large bit of table data via bgp_show_table and if there is no information to display for a particular `struct bgp_node *` the data allocated via json_object_new_array() is leaked. Not a big deal on small tables but if you have a full bgp feed and issue a show command that does not match any of the route nodes ( say `vtysh -c "show bgp ipv4 large-community-list FOO"`) then we will leak memory. Before code change and issuing the above show bgp large-community-list command 15-20 times: Memory statistics for bgpd: System allocator statistics: Total heap allocated: > 2GB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: > 2GB Free small blocks: 31 MiB Free ordinary blocks: 616 KiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 After: Memory statistics for bgpd: System allocator statistics: Total heap allocated: 924 MiB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: 558 MiB Free small blocks: 26 MiB Free ordinary blocks: 340 MiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 Please note the 340mb of free ordinary blocks is from the fact I issued a `show bgp ipv4 uni json` command and generated a large amount of data. Fixes: FRRouting#5445 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Spantik
pushed a commit
to Spantik/frr
that referenced
this issue
Dec 10, 2019
When dumping a large bit of table data via bgp_show_table and if there is no information to display for a particular `struct bgp_node *` the data allocated via json_object_new_array() is leaked. Not a big deal on small tables but if you have a full bgp feed and issue a show command that does not match any of the route nodes ( say `vtysh -c "show bgp ipv4 large-community-list FOO"`) then we will leak memory. Before code change and issuing the above show bgp large-community-list command 15-20 times: Memory statistics for bgpd: System allocator statistics: Total heap allocated: > 2GB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: > 2GB Free small blocks: 31 MiB Free ordinary blocks: 616 KiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 After: Memory statistics for bgpd: System allocator statistics: Total heap allocated: 924 MiB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: 558 MiB Free small blocks: 26 MiB Free ordinary blocks: 340 MiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 Please note the 340mb of free ordinary blocks is from the fact I issued a `show bgp ipv4 uni json` command and generated a large amount of data. Fixes: FRRouting#5445 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Spantik
pushed a commit
to Spantik/frr
that referenced
this issue
Dec 10, 2019
When dumping a large bit of table data via bgp_show_table and if there is no information to display for a particular `struct bgp_node *` the data allocated via json_object_new_array() is leaked. Not a big deal on small tables but if you have a full bgp feed and issue a show command that does not match any of the route nodes ( say `vtysh -c "show bgp ipv4 large-community-list FOO"`) then we will leak memory. Before code change and issuing the above show bgp large-community-list command 15-20 times: Memory statistics for bgpd: System allocator statistics: Total heap allocated: > 2GB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: > 2GB Free small blocks: 31 MiB Free ordinary blocks: 616 KiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 After: Memory statistics for bgpd: System allocator statistics: Total heap allocated: 924 MiB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: 558 MiB Free small blocks: 26 MiB Free ordinary blocks: 340 MiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 Please note the 340mb of free ordinary blocks is from the fact I issued a `show bgp ipv4 uni json` command and generated a large amount of data. Fixes: FRRouting#5445 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Spantik
pushed a commit
to Spantik/frr
that referenced
this issue
Dec 20, 2019
When dumping a large bit of table data via bgp_show_table and if there is no information to display for a particular `struct bgp_node *` the data allocated via json_object_new_array() is leaked. Not a big deal on small tables but if you have a full bgp feed and issue a show command that does not match any of the route nodes ( say `vtysh -c "show bgp ipv4 large-community-list FOO"`) then we will leak memory. Before code change and issuing the above show bgp large-community-list command 15-20 times: Memory statistics for bgpd: System allocator statistics: Total heap allocated: > 2GB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: > 2GB Free small blocks: 31 MiB Free ordinary blocks: 616 KiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 After: Memory statistics for bgpd: System allocator statistics: Total heap allocated: 924 MiB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: 558 MiB Free small blocks: 26 MiB Free ordinary blocks: 340 MiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 Please note the 340mb of free ordinary blocks is from the fact I issued a `show bgp ipv4 uni json` command and generated a large amount of data. Fixes: FRRouting#5445 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Spantik
pushed a commit
to Spantik/frr
that referenced
this issue
Dec 20, 2019
When dumping a large bit of table data via bgp_show_table and if there is no information to display for a particular `struct bgp_node *` the data allocated via json_object_new_array() is leaked. Not a big deal on small tables but if you have a full bgp feed and issue a show command that does not match any of the route nodes ( say `vtysh -c "show bgp ipv4 large-community-list FOO"`) then we will leak memory. Before code change and issuing the above show bgp large-community-list command 15-20 times: Memory statistics for bgpd: System allocator statistics: Total heap allocated: > 2GB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: > 2GB Free small blocks: 31 MiB Free ordinary blocks: 616 KiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 After: Memory statistics for bgpd: System allocator statistics: Total heap allocated: 924 MiB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: 558 MiB Free small blocks: 26 MiB Free ordinary blocks: 340 MiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 Please note the 340mb of free ordinary blocks is from the fact I issued a `show bgp ipv4 uni json` command and generated a large amount of data. Fixes: FRRouting#5445 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Spantik
pushed a commit
to Spantik/frr
that referenced
this issue
Jan 20, 2020
When dumping a large bit of table data via bgp_show_table and if there is no information to display for a particular `struct bgp_node *` the data allocated via json_object_new_array() is leaked. Not a big deal on small tables but if you have a full bgp feed and issue a show command that does not match any of the route nodes ( say `vtysh -c "show bgp ipv4 large-community-list FOO"`) then we will leak memory. Before code change and issuing the above show bgp large-community-list command 15-20 times: Memory statistics for bgpd: System allocator statistics: Total heap allocated: > 2GB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: > 2GB Free small blocks: 31 MiB Free ordinary blocks: 616 KiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 After: Memory statistics for bgpd: System allocator statistics: Total heap allocated: 924 MiB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: 558 MiB Free small blocks: 26 MiB Free ordinary blocks: 340 MiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 Please note the 340mb of free ordinary blocks is from the fact I issued a `show bgp ipv4 uni json` command and generated a large amount of data. Fixes: FRRouting#5445 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
qlyoung
pushed a commit
to qlyoung/frr
that referenced
this issue
Jun 17, 2020
When dumping a large bit of table data via bgp_show_table and if there is no information to display for a particular `struct bgp_node *` the data allocated via json_object_new_array() is leaked. Not a big deal on small tables but if you have a full bgp feed and issue a show command that does not match any of the route nodes ( say `vtysh -c "show bgp ipv4 large-community-list FOO"`) then we will leak memory. Before code change and issuing the above show bgp large-community-list command 15-20 times: Memory statistics for bgpd: System allocator statistics: Total heap allocated: > 2GB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: > 2GB Free small blocks: 31 MiB Free ordinary blocks: 616 KiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 After: Memory statistics for bgpd: System allocator statistics: Total heap allocated: 924 MiB Holding block headers: 0 bytes Used small blocks: 0 bytes Used ordinary blocks: 558 MiB Free small blocks: 26 MiB Free ordinary blocks: 340 MiB Ordinary blocks: 0 Small blocks: 0 Holding blocks: 0 Please note the 340mb of free ordinary blocks is from the fact I issued a `show bgp ipv4 uni json` command and generated a large amount of data. Fixes: FRRouting#5445 Ticket: CM-27537 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've written a script to collect metrics via vtysh for Prometheus. Script is available here: https://git.freestone.net/cramer/frr-prometheus-stats
After running some hours memory of bgpd increased to > 30GB
I run two fill feeds and several peerings.
Config
sh memory
Versions
The text was updated successfully, but these errors were encountered: