{"action":"created","issue":{"url":"https://api.github.com/repos/svinota/pyroute2/issues/205","labels_url":"https://api.github.com/repos/svinota/pyroute2/issues/205/labels{/name}","comments_url":"https://api.github.com/repos/svinota/pyroute2/issues/205/comments","events_url":"https://api.github.com/repos/svinota/pyroute2/issues/205/events","html_url":"https://github.com/svinota/pyroute2/issues/205","id":120863599,"number":205,"title":"[iproute2 rules] unstable result reading rules table","user":{"login":"grandrew","id":243218,"avatar_url":"https://avatars.githubusercontent.com/u/243218?v=3","gravatar_id":"","url":"https://api.github.com/users/grandrew","html_url":"https://github.com/grandrew","followers_url":"https://api.github.com/users/grandrew/followers","following_url":"https://api.github.com/users/grandrew/following{/other_user}","gists_url":"https://api.github.com/users/grandrew/gists{/gist_id}","starred_url":"https://api.github.com/users/grandrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grandrew/subscriptions","organizations_url":"https://api.github.com/users/grandrew/orgs","repos_url":"https://api.github.com/users/grandrew/repos","events_url":"https://api.github.com/users/grandrew/events{/privacy}","received_events_url":"https://api.github.com/users/grandrew/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/svinota/pyroute2/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-07T20:44:19Z","updated_at":"2015-12-09T14:40:54Z","closed_at":null,"body":"On a musl libc system I experience unstable table reads\r\n\r\nI get partial table read on first request each time I re-init the IPRoute object:\r\n\r\n```\r\n9000 /opt/py_modules # python\r\nPython 2.7.10 (default, Jul 23 2015, 11:57:55) \r\n[GCC 4.8.3] on linux2\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import pyroute2\r\n>>> r=pyroute2.IPRoute()\r\n>>> len(r.get_rules())\r\n68\r\n>>> len(r.get_rules())\r\n102\r\n>>> ^D\r\n9000 /opt/py_modules # python\r\nPython 2.7.10 (default, Jul 23 2015, 11:57:55) \r\n[GCC 4.8.3] on linux2\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import pyroute2\r\n>>> r=pyroute2.IPRoute()\r\n>>> len(r.get_rules())\r\n68\r\n>>> len(r.get_rules())\r\n102\r\n>>> len(pyroute2.IPRoute().get_rules())\r\n68\r\n>>> len(pyroute2.IPRoute().get_rules())\r\n68\r\n>>> ^D\r\n9000 /opt/py_modules #\r\n```\r\n\r\n```\r\n9000 /opt/py_modules # /lib/libc.so \r\nmusl libc\r\nVersion 1.1.10\r\nDynamic Program Loader\r\nUsage: /lib/libc.so [options] [--] pathname [args]\r\n```\r\n\r\nworkaround is to always do a double read after init"},"comment":{"url":"https://api.github.com/repos/svinota/pyroute2/issues/comments/163266599","html_url":"https://github.com/svinota/pyroute2/issues/205#issuecomment-163266599","issue_url":"https://api.github.com/repos/svinota/pyroute2/issues/205","id":163266599,"user":{"login":"svinota","id":814602,"avatar_url":"https://avatars.githubusercontent.com/u/814602?v=3","gravatar_id":"","url":"https://api.github.com/users/svinota","html_url":"https://github.com/svinota","followers_url":"https://api.github.com/users/svinota/followers","following_url":"https://api.github.com/users/svinota/following{/other_user}","gists_url":"https://api.github.com/users/svinota/gists{/gist_id}","starred_url":"https://api.github.com/users/svinota/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svinota/subscriptions","organizations_url":"https://api.github.com/users/svinota/orgs","repos_url":"https://api.github.com/users/svinota/repos","events_url":"https://api.github.com/users/svinota/events{/privacy}","received_events_url":"https://api.github.com/users/svinota/received_events","type":"User","site_admin":false},"created_at":"2015-12-09T14:40:54Z","updated_at":"2015-12-09T14:40:54Z","body":"Looks strange. Most important is that you can reproduce it, while I can not.\r\n\r\nIt should not be a libc issue, libc has nothing to do with it. It can not be a socket buffer issue as well. It doesn't rise a timeout exception, so it gets proper end-of-data message. Still trying to play around."}}