{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/15620","repository_url":"https://api.github.com/repos/JuliaLang/julia","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/15620/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/15620/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/15620/events","html_url":"https://github.com/JuliaLang/julia/issues/15620","id":143421966,"number":15620,"title":"Freeze in GC for multithreaded code","user":{"login":"kpamnany","id":3784427,"avatar_url":"https://avatars.githubusercontent.com/u/3784427?v=3","gravatar_id":"","url":"https://api.github.com/users/kpamnany","html_url":"https://github.com/kpamnany","followers_url":"https://api.github.com/users/kpamnany/followers","following_url":"https://api.github.com/users/kpamnany/following{/other_user}","gists_url":"https://api.github.com/users/kpamnany/gists{/gist_id}","starred_url":"https://api.github.com/users/kpamnany/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kpamnany/subscriptions","organizations_url":"https://api.github.com/users/kpamnany/orgs","repos_url":"https://api.github.com/users/kpamnany/repos","events_url":"https://api.github.com/users/kpamnany/events{/privacy}","received_events_url":"https://api.github.com/users/kpamnany/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JuliaLang/julia/labels/bug","name":"bug","color":"e10c02"},{"url":"https://api.github.com/repos/JuliaLang/julia/labels/multi-threading","name":"multi-threading","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-25T04:38:33Z","updated_at":"2016-03-25T05:02:25Z","closed_at":null,"body":"This is on Linux using commit d72842a, which is 13 days old.\r\n\r\nHere's the backtrace:\r\n```\r\n[inline] at /global/u1/k/kpamnany/julia/src/gc.c:364\r\njl_wait_for_gc at /global/u1/k/kpamnany/julia/src/gc.c:2327\r\n[inline] at /global/u1/k/kpamnany/julia/src/gc.c:1181\r\n__pool_alloc at /global/u1/k/kpamnany/julia/src/gc.c:2445\r\nunknown function (ip: 0x2aacb3fdc038)\r\n[inline] at /global/u1/k/kpamnany/julia/src/julia_internal.h:69\r\njl_call_method_internal at /global/u1/k/kpamnany/julia/src/gf.c:1848\r\n[inline] at /global/homes/k/kpamnany/.julia/v0.5/Celeste/src/SensitiveFloats.jl:63\r\nElboIntermediateVariables at /global/homes/k/kpamnany/.julia/v0.5/Celeste/src/ElboDeriv.jl:132\r\n[inline] at /global/homes/k/kpamnany/.julia/v0.5/Celeste/src/ElboDeriv.jl:102\r\ntile_predicted_image at /global/homes/k/kpamnany/.julia/v0.5/Celeste/src/ElboDeriv.jl:896\r\nunknown function (ip: 0x2aacd78bd3ee)\r\n[inline] at ./boot.jl:331\r\ntrim_source_tiles at /global/homes/k/kpamnany/.julia/v0.5/Celeste/src/ModelInit.jl:676\r\nunknown function (ip: 0x2aacd78c13e4)\r\nunknown function (ip: 0x2aacd78c1609)\r\n[inline] at /global/u1/k/kpamnany/julia/src/julia_internal.h:69\r\njl_call_method_internal at /global/u1/k/kpamnany/julia/src/gf.c:1848\r\n[inline] at ./boot.jl:331\r\n#833###_threadsfor#8141 at ./threadingconsutructs.jl:43\r\nunknown function (ip: 0x2aacd78a1750)\r\n[inline] at /global/u1/k/kpamnany/julia/src/julia_internal.h:69\r\njl_call_method_internal at /global/u1/k/kpamnany/julia/src/gf.c:1848\r\n[inline] at /global/u1/k/kpamnany/julia/src/julia.h:1381\r\njl_eh_restore_state at /global/u1/k/kpamnany/julia/src/threading.c:137\r\nti_threadfun at /global/u1/k/kpamnany/julia/src/threading.c:234\r\nuv__thread_start at /global/u1/k/kpamnany/julia/deps/srccache/libuv/src/uv-common.c:270\r\n```\r\nI see a ``FIXME`` in ``__pool_alloc()`` which is at ``gc.c:1185`` on master; not sure if this is the issue.\r\n\r\nRunning inside gdb, I consistently get a segfault:\r\n```\r\nProgram received signal SIGSEGV, Segmentation fault.\r\n[Switching to Thread 0x2aacb1fbc700 (LWP 35284)]\r\n0x00002aaaaae5c772 in jl_gc_safepoint () at ./julia_threads.h:265\r\n265         size_t v = *jl_gc_signal_page;\r\n(gdb) bt\r\n#0  0x00002aaaaae5c772 in jl_gc_safepoint () at ./julia_threads.h:265\r\n#1  jl_generate_fptr (li=li@entry=0x2aaabd8e4170) at /global/u1/k/kpamnany/julia/src/codegen.cpp:1072\r\n#2  0x00002aaaaadefe12 in jl_call_unspecialized (nargs=3, args=0x2aacb1e82ed8, meth=<optimized out>, sparam_vals=0x2aaab0734010) at /global/u1/k/kpamnany/julia/src/gf.c:859\r\n#3  jl_apply_generic (args=0x2aacb1e82ed8, nargs=<optimized out>) at /global/u1/k/kpamnany/julia/src/gf.c:1845\r\n#4  0x00002aacd2c045c3 in #833###_threadsfor#8298 () at strings/io.jl:73\r\n#5  julia_#833###_threadsfor#8298_24586 () at threadingconstructs.jl:43\r\n#6  0x00002aacd2c05750 in jlcall_#833###_threadsfor#8298_24586 ()\r\n#7  0x00002aaaaadefdbf in jl_call_method_internal (nargs=1, args=0x2aaab073c2b8, meth=<optimized out>) at /global/u1/k/kpamnany/julia/src/julia_internal.h:69\r\n#8  jl_apply_generic (args=args@entry=0x2aaab073c2b8, nargs=<optimized out>) at /global/u1/k/kpamnany/julia/src/gf.c:1848\r\n#9  0x00002aaaaae2d6dd in jl_apply (nargs=<optimized out>, args=0x2aaab073c2b8) at /global/u1/k/kpamnany/julia/src/julia.h:1263\r\n#10 ti_run_fun (args=0x2aaab073c2b0) at /global/u1/k/kpamnany/julia/src/threading.c:138\r\n#11 0x00002aaaaae2da65 in ti_threadfun (arg=arg@entry=0x2aacb4000dd0) at /global/u1/k/kpamnany/julia/src/threading.c:233\r\n#12 0x00002aaaaaead527 in uv__thread_start (arg=<optimized out>) at /global/u1/k/kpamnany/julia/deps/srccache/libuv/src/uv-common.c:267\r\n```\r\n\r\n@JeffBezanson, @vtjnash, @yuyichao."},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/201135730","html_url":"https://github.com/JuliaLang/julia/issues/15620#issuecomment-201135730","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/15620","id":201135730,"user":{"login":"vtjnash","id":330950,"avatar_url":"https://avatars.githubusercontent.com/u/330950?v=3","gravatar_id":"","url":"https://api.github.com/users/vtjnash","html_url":"https://github.com/vtjnash","followers_url":"https://api.github.com/users/vtjnash/followers","following_url":"https://api.github.com/users/vtjnash/following{/other_user}","gists_url":"https://api.github.com/users/vtjnash/gists{/gist_id}","starred_url":"https://api.github.com/users/vtjnash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vtjnash/subscriptions","organizations_url":"https://api.github.com/users/vtjnash/orgs","repos_url":"https://api.github.com/users/vtjnash/repos","events_url":"https://api.github.com/users/vtjnash/events{/privacy}","received_events_url":"https://api.github.com/users/vtjnash/received_events","type":"User","site_admin":false},"created_at":"2016-03-25T05:02:25Z","updated_at":"2016-03-25T05:02:25Z","body":"the segfault is expected (it's a safepoint trigger that forces that thread into gc). it seems at least one thread may not have reached a call to jl_gc_collect or a safepoint trigger (there aren't enough of them currently)?"}}