{"action":"opened","issue":{"url":"https://api.github.com/repos/factor/factor/issues/1828","repository_url":"https://api.github.com/repos/factor/factor","labels_url":"https://api.github.com/repos/factor/factor/issues/1828/labels{/name}","comments_url":"https://api.github.com/repos/factor/factor/issues/1828/comments","events_url":"https://api.github.com/repos/factor/factor/issues/1828/events","html_url":"https://github.com/factor/factor/issues/1828","id":233330829,"number":1828,"title":"32-bit - Why Crash?","user":{"login":"AlexIljin","id":169039,"avatar_url":"https://avatars0.githubusercontent.com/u/169039?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexIljin","html_url":"https://github.com/AlexIljin","followers_url":"https://api.github.com/users/AlexIljin/followers","following_url":"https://api.github.com/users/AlexIljin/following{/other_user}","gists_url":"https://api.github.com/users/AlexIljin/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexIljin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexIljin/subscriptions","organizations_url":"https://api.github.com/users/AlexIljin/orgs","repos_url":"https://api.github.com/users/AlexIljin/repos","events_url":"https://api.github.com/users/AlexIljin/events{/privacy}","received_events_url":"https://api.github.com/users/AlexIljin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-03T00:25:49Z","updated_at":"2017-06-03T00:25:49Z","closed_at":null,"body":"Hello!\r\n\r\n  I have created the following vocab:\r\n\r\n```\r\nUSING: arrays checksums checksums.openssl kernel sequences ;\r\nIN: crash-factor\r\n\r\n: 1hash ( bytes -- hash ) openssl-sha1 checksum-bytes ;\r\n: 5hash ( bytes -- h h h h h ) 1hash dup 1hash dup 1hash dup 1hash dup 1hash ;\r\n: hashes ( seed -- seed' seq ) 300000 iota [ drop 5hash [ 4array ] dip swap ] map ;\r\n: crash ( -- h h h h h h ) B{ } hashes swap hashes swap hashes swap hashes swap hashes ;\r\n```\r\n\r\nTo run it, use: `USE: crash-factor crash`.\r\n\r\nI'd like someone to tell me why does it crash the 32-bit build of Factor. Is it simply memory exhaustion, or is it something else?\r\n\r\nThe code was developed to reproduce a crash that was happening with much smaller memory load, but involving reading about 300'000 records from an SQLite DB twice (always good the first time, always crash the second). With this code I see that the Factor.exe process uses about 500Mb of memory at the time of the crash. It's about a quarter of the way to its theoretical limit for the 32-bit build. That's why I suspect GC issues or at least some fixable error of some kind.\r\n\r\nI have tried to debug the app, but had little success. Despite having no VS2016 solution file in the Git repository, I managed to create a 32-bit debug build, and crash it with the vocab from under VS2016, but I see nothing useful I can do with it. First it throws a whole lot of `factor::must_start_gc_again` exceptions (which I think is a normal way it operates), then it says \"factor.exe has triggered a breakpoint\" while pointing at line 590 of the slot_visitor.hpp (again, many times - and I didn't set any breakpoints in VS), and then I see a lot of the following messages:\r\n\r\n```\r\nDebug Error!\r\n\r\nProgram: C:\\Programs\\Dev\\factor.git\\Debug\\factor.exe\r\n\r\nabort() has been called\r\n```\r\n\r\nAnd \"The program '[10932] factor.exe' has exited with code 3 (0x3).\" at the end.\r\n\r\nMaybe I misunderstand, but it looks like debugging fails to be useful in this case, especially with the breakpoint nonsense, and the unclear reason for abort(). I was hoping to see some \"OutOfMemory\" or \"AccessViolation\" exception immediately before the termination, but no such luck. Could someone try my vocab and see if it crashes?\r\n\r\nI have so far reproduced the crash of the 32-bit Factor build (but not 64-bit Factor) on two PCs: Win XP 32-bit, and Win 8.1 64-bit."}}
{"actor":{"display_login":"AlexIljin"}}