{"action":"created","issue":{"url":"https://api.github.com/repos/cilium/cilium/issues/5827","repository_url":"https://api.github.com/repos/cilium/cilium","labels_url":"https://api.github.com/repos/cilium/cilium/issues/5827/labels{/name}","comments_url":"https://api.github.com/repos/cilium/cilium/issues/5827/comments","events_url":"https://api.github.com/repos/cilium/cilium/issues/5827/events","html_url":"https://github.com/cilium/cilium/pull/5827","id":367825748,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxMTQ0NzA2","number":5827,"title":"protect bpf.PerfEvent.Read from infinite loop","user":{"login":"nebril","id":1417888,"node_id":"MDQ6VXNlcjE0MTc4ODg=","avatar_url":"https://avatars0.githubusercontent.com/u/1417888?v=4","gravatar_id":"","url":"https://api.github.com/users/nebril","html_url":"https://github.com/nebril","followers_url":"https://api.github.com/users/nebril/followers","following_url":"https://api.github.com/users/nebril/following{/other_user}","gists_url":"https://api.github.com/users/nebril/gists{/gist_id}","starred_url":"https://api.github.com/users/nebril/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nebril/subscriptions","organizations_url":"https://api.github.com/users/nebril/orgs","repos_url":"https://api.github.com/users/nebril/repos","events_url":"https://api.github.com/users/nebril/events{/privacy}","received_events_url":"https://api.github.com/users/nebril/received_events","type":"User","site_admin":false},"labels":[{"id":300384439,"node_id":"MDU6TGFiZWwzMDAzODQ0Mzk=","url":"https://api.github.com/repos/cilium/cilium/labels/kind/bug","name":"kind/bug","color":"fc2929","default":false},{"id":930690043,"node_id":"MDU6TGFiZWw5MzA2OTAwNDM=","url":"https://api.github.com/repos/cilium/cilium/labels/needs-backport/1.0","name":"needs-backport/1.0","color":"59f7df","default":false},{"id":893193455,"node_id":"MDU6TGFiZWw4OTMxOTM0NTU=","url":"https://api.github.com/repos/cilium/cilium/labels/needs-backport/1.1","name":"needs-backport/1.1","color":"5319e7","default":false},{"id":1007718548,"node_id":"MDU6TGFiZWwxMDA3NzE4NTQ4","url":"https://api.github.com/repos/cilium/cilium/labels/needs-backport/1.2","name":"needs-backport/1.2","color":"4f3daa","default":false},{"id":403149902,"node_id":"MDU6TGFiZWw0MDMxNDk5MDI=","url":"https://api.github.com/repos/cilium/cilium/labels/pending-review","name":"pending-review","color":"fbca04","default":false},{"id":562648678,"node_id":"MDU6TGFiZWw1NjI2NDg2Nzg=","url":"https://api.github.com/repos/cilium/cilium/labels/priority/release-blocker","name":"priority/release-blocker","color":"b60205","default":false},{"id":732924468,"node_id":"MDU6TGFiZWw3MzI5MjQ0Njg=","url":"https://api.github.com/repos/cilium/cilium/labels/release-note/bug","name":"release-note/bug","color":"c2e0c6","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/cilium/cilium/milestones/18","html_url":"https://github.com/cilium/cilium/milestone/18","labels_url":"https://api.github.com/repos/cilium/cilium/milestones/18/labels","id":3568158,"node_id":"MDk6TWlsZXN0b25lMzU2ODE1OA==","number":18,"title":"1.3-bugfix-exception","description":"","creator":{"login":"tgraf","id":1417913,"node_id":"MDQ6VXNlcjE0MTc5MTM=","avatar_url":"https://avatars1.githubusercontent.com/u/1417913?v=4","gravatar_id":"","url":"https://api.github.com/users/tgraf","html_url":"https://github.com/tgraf","followers_url":"https://api.github.com/users/tgraf/followers","following_url":"https://api.github.com/users/tgraf/following{/other_user}","gists_url":"https://api.github.com/users/tgraf/gists{/gist_id}","starred_url":"https://api.github.com/users/tgraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgraf/subscriptions","organizations_url":"https://api.github.com/users/tgraf/orgs","repos_url":"https://api.github.com/users/tgraf/repos","events_url":"https://api.github.com/users/tgraf/events{/privacy}","received_events_url":"https://api.github.com/users/tgraf/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":65,"state":"open","created_at":"2018-08-14T09:53:10Z","updated_at":"2018-10-09T13:03:37Z","due_on":"2018-10-09T07:00:00Z","closed_at":null},"comments":3,"created_at":"2018-10-08T14:47:47Z","updated_at":"2018-10-09T13:09:47Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/cilium/cilium/pulls/5827","html_url":"https://github.com/cilium/cilium/pull/5827","diff_url":"https://github.com/cilium/cilium/pull/5827.diff","patch_url":"https://github.com/cilium/cilium/pull/5827.patch"},"body":"Infinite loop in `Read` can be caused by `state->begin` pointer in\r\nperf_event_read getting ahead of `state->end` pointer.\r\n\r\nCondition is changed to make sure that this situation is handled not by\r\nreading further data from perf buffer.\r\n\r\nFixes: #5826\r\n\r\n<!-- Reviewable:start -->\r\n---\r\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/cilium/cilium/5827)\r\n<!-- Reviewable:end -->\r\n"},"comment":{"url":"https://api.github.com/repos/cilium/cilium/issues/comments/428185248","html_url":"https://github.com/cilium/cilium/pull/5827#issuecomment-428185248","issue_url":"https://api.github.com/repos/cilium/cilium/issues/5827","id":428185248,"node_id":"MDEyOklzc3VlQ29tbWVudDQyODE4NTI0OA==","user":{"login":"nebril","id":1417888,"node_id":"MDQ6VXNlcjE0MTc4ODg=","avatar_url":"https://avatars0.githubusercontent.com/u/1417888?v=4","gravatar_id":"","url":"https://api.github.com/users/nebril","html_url":"https://github.com/nebril","followers_url":"https://api.github.com/users/nebril/followers","following_url":"https://api.github.com/users/nebril/following{/other_user}","gists_url":"https://api.github.com/users/nebril/gists{/gist_id}","starred_url":"https://api.github.com/users/nebril/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nebril/subscriptions","organizations_url":"https://api.github.com/users/nebril/orgs","repos_url":"https://api.github.com/users/nebril/repos","events_url":"https://api.github.com/users/nebril/events{/privacy}","received_events_url":"https://api.github.com/users/nebril/received_events","type":"User","site_admin":false},"created_at":"2018-10-09T13:09:47Z","updated_at":"2018-10-09T13:09:47Z","author_association":"MEMBER","body":"seems like @borkmann  was right, my fix would cause us to lose some perf events that wrap around ring buffer.\r\n\r\nSince we don't know what is the underlying cause of the bug, it seems that the sensible thing to do would be to put a timeout on the loop in `PerfEvent.Read` and log as much as we can when the timeout is hit. @tgraf are you OK with going that route?"}}
{"actor":{"display_login":"nebril"}}