{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/13122","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/13122/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/13122/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/13122/events","html_url":"https://github.com/JuliaLang/julia/issues/13122","id":106375140,"number":13122,"title":"workers die in pmap if function throws an exception that contains a pointer","user":{"login":"simonster","id":470884,"avatar_url":"https://avatars.githubusercontent.com/u/470884?v=3","gravatar_id":"","url":"https://api.github.com/users/simonster","html_url":"https://github.com/simonster","followers_url":"https://api.github.com/users/simonster/followers","following_url":"https://api.github.com/users/simonster/following{/other_user}","gists_url":"https://api.github.com/users/simonster/gists{/gist_id}","starred_url":"https://api.github.com/users/simonster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonster/subscriptions","organizations_url":"https://api.github.com/users/simonster/orgs","repos_url":"https://api.github.com/users/simonster/repos","events_url":"https://api.github.com/users/simonster/events{/privacy}","received_events_url":"https://api.github.com/users/simonster/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JuliaLang/julia/labels/backport%20pending%200.4","name":"backport pending 0.4","color":"fad8c7"},{"url":"https://api.github.com/repos/JuliaLang/julia/labels/bug","name":"bug","color":"e10c02"},{"url":"https://api.github.com/repos/JuliaLang/julia/labels/parallel","name":"parallel","color":"f7e102"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-09-14T16:08:52Z","updated_at":"2015-10-26T15:13:42Z","closed_at":null,"body":"```\r\n>julia -p 2\r\n               _\r\n   _       _ _(_)_     |  A fresh approach to technical computing\r\n  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org\r\n   _ _   _| |_  __ _   |  Type \"?help\" for help.\r\n  | | | | | | |/ _` |  |\r\n  | | |_| | | | (_| |  |  Version 0.5.0-dev+32 (2015-09-10 21:27 UTC)\r\n _/ |\\__'_|_|_|\\__'_|  |  Commit 8f08a1f* (3 days old master)\r\n|__/                   |  x86_64-linux-gnu\r\n\r\njulia> A_mul_B!(plan_fft([1.0]))\r\nERROR: MethodError: `A_mul_B!` has no method matching A_mul_B!(::Base.DFT.FFTW.cFFTWPlan{Complex{Float64},-1,false,1})\r\n\r\njulia> pmap(x->A_mul_B!(plan_fft([1.0])), 1:1)\r\nfatal error on 2: ERROR: cannot serialize a pointer\r\n in serialize at serialize.jl:105\r\n in serialize at serialize.jl:414\r\n in serialize at serialize.jl:119\r\n in serialize at serialize.jl:414 (repeats 4 times)\r\n in send_msg_ at multi.jl:222\r\n in send_msg_now at multi.jl:173\r\n in deliver_result at multi.jl:808\r\n [inlined code] from multi.jl:893\r\n in anonymous at task.jl:63\r\nWorker 2 terminated.\r\nERROR (unhandled task failure): EOFError: read end of file\r\nfatal error on 3: ERROR: cannot serialize a pointer\r\n in serialize at serialize.jl:105\r\n in serialize at serialize.jl:414\r\n in serialize at serialize.jl:119\r\n in serialize at serialize.jl:414 (repeats 4 times)\r\n in send_msg_ at multi.jl:222\r\n in send_msg_now at multi.jl:173\r\n in deliver_result at multi.jl:808\r\n [inlined code] from multi.jl:893\r\n in anonymous at task.jl:63\r\nWorker 3 terminated.\r\n1-element Array{Any,1}ERROR (unhandled task failure): EOFError: read end of file\r\n:\r\n ProcessExitedException()\r\n```\r\n\r\nThe issue here appears to be that `plan_fft` returns a `Base.DFT.FFTW.cFFTWPlan{Complex{Float64},-1,false,1}`, which contains a pointer, and so the MethodError cannot be serialized. The workers definitely shouldn't terminate, and it would be nice if the error were returned in some form, even if the argument can't be fully preserved."},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/151169371","html_url":"https://github.com/JuliaLang/julia/issues/13122#issuecomment-151169371","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/13122","id":151169371,"user":{"login":"andreasnoack","id":505001,"avatar_url":"https://avatars.githubusercontent.com/u/505001?v=3","gravatar_id":"","url":"https://api.github.com/users/andreasnoack","html_url":"https://github.com/andreasnoack","followers_url":"https://api.github.com/users/andreasnoack/followers","following_url":"https://api.github.com/users/andreasnoack/following{/other_user}","gists_url":"https://api.github.com/users/andreasnoack/gists{/gist_id}","starred_url":"https://api.github.com/users/andreasnoack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreasnoack/subscriptions","organizations_url":"https://api.github.com/users/andreasnoack/orgs","repos_url":"https://api.github.com/users/andreasnoack/repos","events_url":"https://api.github.com/users/andreasnoack/events{/privacy}","received_events_url":"https://api.github.com/users/andreasnoack/received_events","type":"User","site_admin":false},"created_at":"2015-10-26T15:13:42Z","updated_at":"2015-10-26T15:13:42Z","body":"The example above is still crashing the workers but the error is different. A simpler example is\r\n```jl\r\njulia> remotecall_fetch(() -> sqrt(C_NULL), workers()[1])\r\nWorker 4 terminated.ERROR: ProcessExitedException()\r\n in yieldto at ./task.jl:67\r\n in wait at ./task.jl:367\r\n in wait at ./task.jl:282\r\n in wait at ./channels.jl:97\r\n in take! at ./channels.jl:84\r\n in take! at ./multi.jl:809\r\n in remotecall_fetch at multi.jl:735\r\n [inlined code] from multi.jl:373\r\n in remotecall_fetch at multi.jl:740\r\n in eval at ./boot.jl:264\r\n```"}}