{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/18433","labels_url":"https://api.github.com/repos/docker/docker/issues/18433/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/18433/comments","events_url":"https://api.github.com/repos/docker/docker/issues/18433/events","html_url":"https://github.com/docker/docker/issues/18433","id":120417506,"number":18433,"title":"OOM event of exec is the same as OOM event of container main process","user":{"login":"garagatyi","id":1851863,"avatar_url":"https://avatars.githubusercontent.com/u/1851863?v=3","gravatar_id":"","url":"https://api.github.com/users/garagatyi","html_url":"https://github.com/garagatyi","followers_url":"https://api.github.com/users/garagatyi/followers","following_url":"https://api.github.com/users/garagatyi/following{/other_user}","gists_url":"https://api.github.com/users/garagatyi/gists{/gist_id}","starred_url":"https://api.github.com/users/garagatyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garagatyi/subscriptions","organizations_url":"https://api.github.com/users/garagatyi/orgs","repos_url":"https://api.github.com/users/garagatyi/repos","events_url":"https://api.github.com/users/garagatyi/events{/privacy}","received_events_url":"https://api.github.com/users/garagatyi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-04T14:56:55Z","updated_at":"2015-12-07T12:06:21Z","closed_at":null,"body":"It is not possible to tell the difference between OOM events of exec and container main process. Example of these events:\r\nOOM of exec\r\n```\r\n{\"status\":\"oom\",\"id\":\"32c6100a9e288e6c68ff9b0f072dab2f9ee5568dbbf1e50df719e2e0bcb8d776\",\"from\":\"800c5e14c91a\",\"time\":1449240479,\"timeNano\":1449240479251111202}\r\n```\r\nOOM  of main process of container\r\n```\r\n{\"status\":\"oom\",\"id\":\"52dfe5cc7cf6d83a2fe5ce9e474cb5023f35146dd6097808771bb94a609d3a50\",\"from\":\"800c5e14c91a\",\"time\":1449240569,\"timeNano\":1449240569798358395}\r\n```\r\nIs it a normal behavior or these events should differ?\r\n\r\nTo reproduce:\r\n```bash\r\nrm -rf /tmp/oomeventstest && \\\r\nmkdir /tmp/oomeventstest && \\\r\ncd /tmp/oomeventstest && \\\r\nwget https://gist.githubusercontent.com/garagatyi/ec0c1a735a8e6b355b38/raw/de3154ded3a2787fae3a93837b5e861919bde41c/Dockerfile && \\\r\ndocker build .\r\n```\r\nThen in other terminal:\r\n```bash\r\ncurl -s http://localhost:2375/events\r\n```\r\nThen in first terminal:\r\n```bash\r\ndocker run -d -m 128M {imageId}\r\ndocker exec -d {containerId} /script.sh\r\n```\r\nWait a minute or two, then:\r\n```bash\r\ndocker run -d -m 128M {imageId} /script.sh\r\n```\r\nWait a minute or two.\r\n\r\nOutput of curl:\r\n```\r\n{\"status\":\"create\",\"id\":\"32c6100a9e288e6c68ff9b0f072dab2f9ee5568dbbf1e50df719e2e0bcb8d776\",\"from\":\"800c5e14c91a\",\"time\":1449240345,\"timeNano\":1449240345443705479}\r\n{\"status\":\"start\",\"id\":\"32c6100a9e288e6c68ff9b0f072dab2f9ee5568dbbf1e50df719e2e0bcb8d776\",\"from\":\"800c5e14c91a\",\"time\":1449240345,\"timeNano\":1449240345798029258}\r\n{\"status\":\"exec_create: /script.sh \",\"id\":\"32c6100a9e288e6c68ff9b0f072dab2f9ee5568dbbf1e50df719e2e0bcb8d776\",\"from\":\"800c5e14c91a\",\"time\":1449240448,\"timeNano\":1449240448515346498}\r\n{\"status\":\"exec_start: /script.sh \",\"id\":\"32c6100a9e288e6c68ff9b0f072dab2f9ee5568dbbf1e50df719e2e0bcb8d776\",\"from\":\"800c5e14c91a\",\"time\":1449240448,\"timeNano\":1449240448515878864}\r\n{\"status\":\"oom\",\"id\":\"32c6100a9e288e6c68ff9b0f072dab2f9ee5568dbbf1e50df719e2e0bcb8d776\",\"from\":\"800c5e14c91a\",\"time\":1449240479,\"timeNano\":1449240479251111202}\r\n{\"status\":\"create\",\"id\":\"52dfe5cc7cf6d83a2fe5ce9e474cb5023f35146dd6097808771bb94a609d3a50\",\"from\":\"800c5e14c91a\",\"time\":1449240539,\"timeNano\":1449240539448591588}\r\n{\"status\":\"start\",\"id\":\"52dfe5cc7cf6d83a2fe5ce9e474cb5023f35146dd6097808771bb94a609d3a50\",\"from\":\"800c5e14c91a\",\"time\":1449240539,\"timeNano\":1449240539823100403}\r\n{\"status\":\"oom\",\"id\":\"52dfe5cc7cf6d83a2fe5ce9e474cb5023f35146dd6097808771bb94a609d3a50\",\"from\":\"800c5e14c91a\",\"time\":1449240569,\"timeNano\":1449240569798358395}\r\n{\"status\":\"die\",\"id\":\"52dfe5cc7cf6d83a2fe5ce9e474cb5023f35146dd6097808771bb94a609d3a50\",\"from\":\"800c5e14c91a\",\"time\":1449240569,\"timeNano\":1449240569897126585}\r\n```"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/162506134","html_url":"https://github.com/docker/docker/issues/18433#issuecomment-162506134","issue_url":"https://api.github.com/repos/docker/docker/issues/18433","id":162506134,"user":{"login":"garagatyi","id":1851863,"avatar_url":"https://avatars.githubusercontent.com/u/1851863?v=3","gravatar_id":"","url":"https://api.github.com/users/garagatyi","html_url":"https://github.com/garagatyi","followers_url":"https://api.github.com/users/garagatyi/followers","following_url":"https://api.github.com/users/garagatyi/following{/other_user}","gists_url":"https://api.github.com/users/garagatyi/gists{/gist_id}","starred_url":"https://api.github.com/users/garagatyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garagatyi/subscriptions","organizations_url":"https://api.github.com/users/garagatyi/orgs","repos_url":"https://api.github.com/users/garagatyi/repos","events_url":"https://api.github.com/users/garagatyi/events{/privacy}","received_events_url":"https://api.github.com/users/garagatyi/received_events","type":"User","site_admin":false},"created_at":"2015-12-07T12:06:21Z","updated_at":"2015-12-07T12:06:21Z","body":"Another option is to add exec ID to this event."}}