{"action":"created","issue":{"url":"https://api.github.com/repos/slavapestov/factor/issues/1319","labels_url":"https://api.github.com/repos/slavapestov/factor/issues/1319/labels{/name}","comments_url":"https://api.github.com/repos/slavapestov/factor/issues/1319/comments","events_url":"https://api.github.com/repos/slavapestov/factor/issues/1319/events","html_url":"https://github.com/slavapestov/factor/issues/1319","id":76301036,"number":1319,"title":"Threaded server gc crash","user":{"login":"bjourne","id":142475,"avatar_url":"https://avatars.githubusercontent.com/u/142475?v=3","gravatar_id":"","url":"https://api.github.com/users/bjourne","html_url":"https://github.com/bjourne","followers_url":"https://api.github.com/users/bjourne/followers","following_url":"https://api.github.com/users/bjourne/following{/other_user}","gists_url":"https://api.github.com/users/bjourne/gists{/gist_id}","starred_url":"https://api.github.com/users/bjourne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjourne/subscriptions","organizations_url":"https://api.github.com/users/bjourne/orgs","repos_url":"https://api.github.com/users/bjourne/repos","events_url":"https://api.github.com/users/bjourne/events{/privacy}","received_events_url":"https://api.github.com/users/bjourne/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-14T09:39:17Z","updated_at":"2015-05-14T18:06:03Z","closed_at":null,"body":"Annoying heisenbug in `benchmark.tcp-echo1`. Here is a small repro with code adapted from Doug's vocab:\r\n\r\n```factor\r\nUSING: accessors byte-arrays io io.encodings.binary io.servers\r\nio.sockets io.streams.duplex kernel math memoize namespaces sequences ;\r\nIN: benchmark.craschbench2\r\n\r\nMEMO: test-bytes ( n -- byte-array ) iota >byte-array ;\r\n\r\nTUPLE: tcp-echo < threaded-server ;\r\n\r\n: <tcp-echo2> ( -- obj )\r\n    binary \\ tcp-echo new-threaded-server\r\n    f 0 <inet4> >>insecure ;\r\n\r\n: write-read ( bytes -- )\r\n    [ write flush ] [ length read drop ] bi ;\r\n\r\nM: tcp-echo handle-client*\r\n    drop 10,000 [ 64 test-bytes write-read ] times ;\r\n\r\n: server>address ( server -- port )\r\n    servers>> first addr>> port>> local-server ;\r\n\r\n: inner ( -- )\r\n    <tcp-echo2> start-server server>address\r\n    dup remote-address set binary <client> local-address set\r\n    [ in>> input-stream set ]\r\n    [ out>> output-stream set ] bi\r\n    10,000 [ 64 read write flush ] times ;\r\n\r\n: tcp-echo1-benchmark ( -- )\r\n    \"TEST START\" print\r\n    inner ;\r\n\r\nMAIN: tcp-echo1-benchmark\r\n```\r\n\r\nIf Factor is compiled in debug mode it crashes like once every third run. Maybe it has something with thread context switching to do?"},"comment":{"url":"https://api.github.com/repos/slavapestov/factor/issues/comments/102120758","html_url":"https://github.com/slavapestov/factor/issues/1319#issuecomment-102120758","issue_url":"https://api.github.com/repos/slavapestov/factor/issues/1319","id":102120758,"user":{"login":"bjourne","id":142475,"avatar_url":"https://avatars.githubusercontent.com/u/142475?v=3","gravatar_id":"","url":"https://api.github.com/users/bjourne","html_url":"https://github.com/bjourne","followers_url":"https://api.github.com/users/bjourne/followers","following_url":"https://api.github.com/users/bjourne/following{/other_user}","gists_url":"https://api.github.com/users/bjourne/gists{/gist_id}","starred_url":"https://api.github.com/users/bjourne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjourne/subscriptions","organizations_url":"https://api.github.com/users/bjourne/orgs","repos_url":"https://api.github.com/users/bjourne/repos","events_url":"https://api.github.com/users/bjourne/events{/privacy}","received_events_url":"https://api.github.com/users/bjourne/received_events","type":"User","site_admin":false},"created_at":"2015-05-14T18:06:03Z","updated_at":"2015-05-14T18:06:03Z","body":"It's probably earlier than that. I'm checking out old versions and the bug happens at least since November last year."}}