From 6359f1de04f1adb790b50293558b7205d08908e0 Mon Sep 17 00:00:00 2001 From: Amit Murthy Date: Thu, 28 Apr 2016 18:52:09 +0530 Subject: [PATCH 1/2] detect cause of #16091 --- test/examples.jl | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/test/examples.jl b/test/examples.jl index 9c8b4a7b543d6..6ea42195a99ea 100644 --- a/test/examples.jl +++ b/test/examples.jl @@ -47,13 +47,37 @@ end dc_path = joinpath(dir, "dictchannel.jl") myid() == 1 || include(dc_path) +# The checks to see if DictChannel is defined is to identify the root cause of +# https://github.com/JuliaLang/julia/issues/16091 . +# To be removed once fixed. +defined_on_worker = false +if (myid() != 1) && !isdefined(:DictChannel) + error("myid : $(myid()). DictChannel not defined.") +else + defined_on_worker = true +end + # Run the remote on pid 1, since runtests may terminate workers # at any time depending on memory usage remotecall_fetch(1, dc_path) do f include(f) nothing end -dc=RemoteChannel(()->DictChannel(), 1) + +defined_on_master = false +if remotecall_fetch(isdefined, 1, :DictChannel) == false + error("myid : $(myid()). DictChannel not defined on 1") +else + defined_on_master = true +end + +dc = nothing +try + dc=RemoteChannel(()->DictChannel(), 1) +catch e + println("myid : ", myid(), ", dc_path : ", dc_path, ", defined_on_worker:", defined_on_worker, ", defined_on_master: ", defined_on_master) + rethrow(e) +end @test typeof(dc) == RemoteChannel{DictChannel} @test isready(dc) == false From 48e969c910406f5744e74013056e29f56c2fc5e0 Mon Sep 17 00:00:00 2001 From: Amit Murthy Date: Fri, 29 Apr 2016 09:35:49 +0530 Subject: [PATCH 2/2] one more check --- test/examples.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/examples.jl b/test/examples.jl index 6ea42195a99ea..d074301bb10b9 100644 --- a/test/examples.jl +++ b/test/examples.jl @@ -59,10 +59,10 @@ end # Run the remote on pid 1, since runtests may terminate workers # at any time depending on memory usage -remotecall_fetch(1, dc_path) do f +@test remotecall_fetch(1, dc_path) do f include(f) - nothing -end + return :infungible +end === :infungible defined_on_master = false if remotecall_fetch(isdefined, 1, :DictChannel) == false