{"action":"created","issue":{"url":"https://api.github.com/repos/osrg/gobgp/issues/695","repository_url":"https://api.github.com/repos/osrg/gobgp","labels_url":"https://api.github.com/repos/osrg/gobgp/issues/695/labels{/name}","comments_url":"https://api.github.com/repos/osrg/gobgp/issues/695/comments","events_url":"https://api.github.com/repos/osrg/gobgp/issues/695/events","html_url":"https://github.com/osrg/gobgp/issues/695","id":134023750,"number":695,"title":"Memory leak when querying the RIB","user":{"login":"vincentbernat","id":631446,"avatar_url":"https://avatars.githubusercontent.com/u/631446?v=3","gravatar_id":"","url":"https://api.github.com/users/vincentbernat","html_url":"https://github.com/vincentbernat","followers_url":"https://api.github.com/users/vincentbernat/followers","following_url":"https://api.github.com/users/vincentbernat/following{/other_user}","gists_url":"https://api.github.com/users/vincentbernat/gists{/gist_id}","starred_url":"https://api.github.com/users/vincentbernat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vincentbernat/subscriptions","organizations_url":"https://api.github.com/users/vincentbernat/orgs","repos_url":"https://api.github.com/users/vincentbernat/repos","events_url":"https://api.github.com/users/vincentbernat/events{/privacy}","received_events_url":"https://api.github.com/users/vincentbernat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-16T16:14:40Z","updated_at":"2016-02-19T03:53:13Z","closed_at":null,"body":"Hey!\r\n\r\nHere is a simple way to reproduce the memory leak:\r\n\r\n 1. Start `gobgpd`. Configuration is not important.\r\n 2. Inject 1000 routes:\r\n\r\n  ```\r\ngobgp mrt inject global <(zcat latest-bview.gz) 1000\r\n  ```\r\n\r\n 3. Check memory usage with `ps`:\r\n\r\n  ```\r\nroot       190  5.7 11.6 284344 28668 ?        Sl   17:10   0:00 /mnt/lab/gobgpd -f /mnt/lab/gobgp.U1.conf -t yaml -p -s unix --disable-stdlog\r\n  ```\r\n\r\n 4. Run `gobgp global rib` several times:\r\n\r\n  ```\r\nfor i in $(seq 1 10); do gobgp global rib > /dev/null ; done\r\n  ```\r\n\r\n 5. Check memory usage:\r\n\r\n  ```\r\nroot       190  1.8 57.8 397516 142780 ?       Sl   17:10   0:01 /mnt/lab/gobgpd -f /mnt/lab/gobgp.U1.conf -t yaml -p -s unix --disable-stdlog\r\n  ```\r\n\r\ngobgp is compiled with Go 1.5.3."},"comment":{"url":"https://api.github.com/repos/osrg/gobgp/issues/comments/186040485","html_url":"https://github.com/osrg/gobgp/issues/695#issuecomment-186040485","issue_url":"https://api.github.com/repos/osrg/gobgp/issues/695","id":186040485,"user":{"login":"ishidawataru","id":5915117,"avatar_url":"https://avatars.githubusercontent.com/u/5915117?v=3","gravatar_id":"","url":"https://api.github.com/users/ishidawataru","html_url":"https://github.com/ishidawataru","followers_url":"https://api.github.com/users/ishidawataru/followers","following_url":"https://api.github.com/users/ishidawataru/following{/other_user}","gists_url":"https://api.github.com/users/ishidawataru/gists{/gist_id}","starred_url":"https://api.github.com/users/ishidawataru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ishidawataru/subscriptions","organizations_url":"https://api.github.com/users/ishidawataru/orgs","repos_url":"https://api.github.com/users/ishidawataru/repos","events_url":"https://api.github.com/users/ishidawataru/events{/privacy}","received_events_url":"https://api.github.com/users/ishidawataru/received_events","type":"User","site_admin":false},"created_at":"2016-02-19T03:53:13Z","updated_at":"2016-02-19T03:53:13Z","body":"Could you share the result of  `go tool pprof -inuse_objects http://localhost:6060/debug/pprof/heap` ?\r\n\r\nAlso please refer to https://github.com/osrg/gobgp/issues/404"}}