{"action":"created","issue":{"url":"https://api.github.com/repos/nim-lang/Nim/issues/7894","repository_url":"https://api.github.com/repos/nim-lang/Nim","labels_url":"https://api.github.com/repos/nim-lang/Nim/issues/7894/labels{/name}","comments_url":"https://api.github.com/repos/nim-lang/Nim/issues/7894/comments","events_url":"https://api.github.com/repos/nim-lang/Nim/issues/7894/events","html_url":"https://github.com/nim-lang/Nim/issues/7894","id":326848677,"node_id":"MDU6SXNzdWUzMjY4NDg2Nzc=","number":7894,"title":"alloc fails after 4GB","user":{"login":"brentp","id":1739,"node_id":"MDQ6VXNlcjE3Mzk=","avatar_url":"https://avatars2.githubusercontent.com/u/1739?v=4","gravatar_id":"","url":"https://api.github.com/users/brentp","html_url":"https://github.com/brentp","followers_url":"https://api.github.com/users/brentp/followers","following_url":"https://api.github.com/users/brentp/following{/other_user}","gists_url":"https://api.github.com/users/brentp/gists{/gist_id}","starred_url":"https://api.github.com/users/brentp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brentp/subscriptions","organizations_url":"https://api.github.com/users/brentp/orgs","repos_url":"https://api.github.com/users/brentp/repos","events_url":"https://api.github.com/users/brentp/events{/privacy}","received_events_url":"https://api.github.com/users/brentp/received_events","type":"User","site_admin":false},"labels":[{"id":167522074,"node_id":"MDU6TGFiZWwxNjc1MjIwNzQ=","url":"https://api.github.com/repos/nim-lang/Nim/labels/GC","name":"GC","color":"5319e7","default":false},{"id":66121,"node_id":"MDU6TGFiZWw2NjEyMQ==","url":"https://api.github.com/repos/nim-lang/Nim/labels/High%20Priority","name":"High Priority","color":"e30c0c","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-05-27T20:40:05Z","updated_at":"2018-07-30T15:23:00Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"on a machine with 20GB of ram and a machine with 256GB, this code:\r\n```Nim\r\nimport os\r\n\r\nvar saved = newSeq[seq[int8]]()\r\n\r\nfor i in 0..20:\r\n  # one of these is 0.25GB.\r\n  echo i\r\n  var x = newSeq[int8](250000000)\r\n  sleep(1000)\r\n  saved.add(x)\r\n\r\nfor x in saved:\r\n  echo x.len\r\n```\r\n\r\nresults in:\r\n```\r\nTraceback (most recent call last)\r\nt.nim(8)                 t\r\nsystem.nim(755)          newSeq\r\ngc.nim(482)              newSeq\r\ngc.nim(475)              newObj\r\nalloc.nim(794)           rawAlloc\r\nalloc.nim(599)           getBigChunk\r\nalloc.nim(543)           splitChunk\r\nalloc.nim(220)           addChunkToMatrix\r\nSIGSEGV: Illegal storage access. (Attempt to read from nil?)\r\n```\r\n\r\nI can adjust the size of the allocation and this appears to happen suspiciously close to 4GB of total memory. Does not happen with boehm collector (though that does give a warning about the large block)."},"comment":{"url":"https://api.github.com/repos/nim-lang/Nim/issues/comments/408902560","html_url":"https://github.com/nim-lang/Nim/issues/7894#issuecomment-408902560","issue_url":"https://api.github.com/repos/nim-lang/Nim/issues/7894","id":408902560,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODkwMjU2MA==","user":{"login":"mratsim","id":22738317,"node_id":"MDQ6VXNlcjIyNzM4MzE3","avatar_url":"https://avatars3.githubusercontent.com/u/22738317?v=4","gravatar_id":"","url":"https://api.github.com/users/mratsim","html_url":"https://github.com/mratsim","followers_url":"https://api.github.com/users/mratsim/followers","following_url":"https://api.github.com/users/mratsim/following{/other_user}","gists_url":"https://api.github.com/users/mratsim/gists{/gist_id}","starred_url":"https://api.github.com/users/mratsim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mratsim/subscriptions","organizations_url":"https://api.github.com/users/mratsim/orgs","repos_url":"https://api.github.com/users/mratsim/repos","events_url":"https://api.github.com/users/mratsim/events{/privacy}","received_events_url":"https://api.github.com/users/mratsim/received_events","type":"User","site_admin":false},"created_at":"2018-07-30T15:23:00Z","updated_at":"2018-07-30T15:23:00Z","author_association":"CONTRIBUTOR","body":"Another case in the forum: https://forum.nim-lang.org/t/4088"}}
{"actor":{"display_login":"mratsim"}}