spawned processes no longer propagate modules loaded in master memory? #11209 Closed jiahao opened this Issue on May 8, 2015 · 2 comments Projects None yet Labels parallel Milestone No milestone Assignees No one assigned 3 participants @jiahao @simonster @JeffBezanson Notifications You’re not receiving notifications from this thread. @jiahao The Julia Language member jiahao commented on May 8, 2015 This seems to be a regression from 0.3. In 0.4, a module loaded into memory before addprocs no longer gets broadcast to the spawned processes. A pmap involving a function in that module throws a "module not defined" warning, then an UndefVarError, which apparently causes the serializer to panic with an EOFError, resulting in all workers committing suicide en masse and ending in unmitigated chaos. julia> using Color julia> addprocs(4); julia> pmap(identity, [RGB(rand(3)...) for i=1:100]) #pmap 100 random RGB colors WARNING: Module Color not defined on process 3WARNING: Module Color not defined on process 4WARNING: Module Color not defined on process 5 WARNING: Module Color not defined on process 2 fatal error on fatal error on 4: 3: fatal error on 5: fatal error on 2: ERROR: UndefVarError: Color not defined in deserialize at serialize.jl:433 in handle_deserialize at serialize.jl:403 in deserialize at serialize.jl:555 in handle_deserialize at serialize.jl:403 in anonymous at task.jl:834 ... Worker 4 terminated. Worker 2 terminated.ERROR (unhandled task failure): EOFError: read end of file in read at ./iobuffer.jl:89 in read at stream.jl:715 in anonymous at task.jl:819 4-element Array{Any,1}Worker 5 terminated.ERROR (unhandled task failure): EOFError: read end of file in yieldto at task.jl:21 in wait at ./task.jl:309 in wait at ./task.jl:225 in wait_full at ./multi.jl:572 in remotecall_fetch at multi.jl:672 in remotecall_fetch at multi.jl:677 in anonymous at task.jl:1392 : ... ProcessExitedException()ERROR (unhandled task failure): EOFError: read end of file in yieldto at task.jl:21 in wait at ./task.jl:309 in wait at ./task.jl:225 in wait_full at ./multi.jl:572 in remotecall_fetch at multi.jl:672 in remotecall_fetch at multi.jl:677 in anonymous at task.jl:1392 ProcessExitedException() ProcessExitedException() ProcessExitedException() julia> ans 4-element Array{Any,1}: ProcessExitedException() ProcessExitedException() ProcessExitedException() ProcessExitedException() julia> procs() 1-element Array{Int64,1}: 1 On julia 0.3, the result of the pmap is the expected Array of random RGB colors: julia> pmap(identity, [RGB(rand(3)...) for i=1:100]) 100-element Array{Any,1}: RGB{Float64}(0.6337511173541939,0.6040774608484489,0.2725514360446333) RGB{Float64}(0.3116625267416464,0.33448474093539704,0.2139489260536025) ... @jiahao jiahao added parallel regression labels on May 8, 2015 @simonster The Julia Language member simonster commented on May 10, 2015 This fails for me on 0.3 on OS X. The issue for the using/addprocs order dependency is #3674, which is still open, so I'm not sure it was ever supposed to work. @JeffBezanson JeffBezanson removed the regression label on Jul 20, 2015 @JeffBezanson The Julia Language member JeffBezanson commented on Jul 20, 2015 Yes I think this is a dup of #3674. @JeffBezanson JeffBezanson closed this on Jul 20, 2015