{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/11095","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/11095/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/11095/comments","events_url":"https://api.github.com/repos/apache/spark/issues/11095/events","html_url":"https://github.com/apache/spark/pull/11095","id":131736189,"number":11095,"title":"[SPARK-13210] [SQL] catch OOM when allocate memory and expand array","user":{"login":"davies","id":40902,"avatar_url":"https://avatars.githubusercontent.com/u/40902?v=3","gravatar_id":"","url":"https://api.github.com/users/davies","html_url":"https://github.com/davies","followers_url":"https://api.github.com/users/davies/followers","following_url":"https://api.github.com/users/davies/following{/other_user}","gists_url":"https://api.github.com/users/davies/gists{/gist_id}","starred_url":"https://api.github.com/users/davies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davies/subscriptions","organizations_url":"https://api.github.com/users/davies/orgs","repos_url":"https://api.github.com/users/davies/repos","events_url":"https://api.github.com/users/davies/events{/privacy}","received_events_url":"https://api.github.com/users/davies/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-02-05T19:42:15Z","updated_at":"2016-02-06T00:38:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/11095","html_url":"https://github.com/apache/spark/pull/11095","diff_url":"https://github.com/apache/spark/pull/11095.diff","patch_url":"https://github.com/apache/spark/pull/11095.patch"},"body":"There is a bug when we try to grow the buffer, OOM is ignore wrongly (the assert also skipped by JVM), then we try grow the array again, this one will trigger spilling free the current page, the current record we inserted will be invalid.\r\n\r\nThe root cause is that JVM has less free memory than MemoryManager thought, it will OOM when allocate a page without trigger spilling. We should catch the OOM, and acquire memory again to trigger spilling.\r\n\r\nAnd also, we could not grow the array in `insertRecord` of `InMemorySorter` (it was there just for easy testing)."},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/180636258","html_url":"https://github.com/apache/spark/pull/11095#issuecomment-180636258","issue_url":"https://api.github.com/repos/apache/spark/issues/11095","id":180636258,"user":{"login":"AmplabJenkins","id":4031291,"avatar_url":"https://avatars.githubusercontent.com/u/4031291?v=3","gravatar_id":"","url":"https://api.github.com/users/AmplabJenkins","html_url":"https://github.com/AmplabJenkins","followers_url":"https://api.github.com/users/AmplabJenkins/followers","following_url":"https://api.github.com/users/AmplabJenkins/following{/other_user}","gists_url":"https://api.github.com/users/AmplabJenkins/gists{/gist_id}","starred_url":"https://api.github.com/users/AmplabJenkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmplabJenkins/subscriptions","organizations_url":"https://api.github.com/users/AmplabJenkins/orgs","repos_url":"https://api.github.com/users/AmplabJenkins/repos","events_url":"https://api.github.com/users/AmplabJenkins/events{/privacy}","received_events_url":"https://api.github.com/users/AmplabJenkins/received_events","type":"User","site_admin":false},"created_at":"2016-02-06T00:38:58Z","updated_at":"2016-02-06T00:38:58Z","body":"Merged build finished. Test PASSed."}}