-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DictChannel not defined error #16091
Comments
The change seems harmless.....I would suspect a race condition. Any recent changes to the code loading logic for Windows? |
Is there a way to search all AV logs under Julia for "LoadError: UndefVarError: DictChannel not defined" to find the earliest logged instance on this error? |
I believe so, there is an API reference at http://www.appveyor.com/docs/api/projects-builds though our history before we switched from the StefanKarpinski account to the JuliaLang account was unfortunately deleted. |
might have something to do with heavy load, it happened on an osx buildbot: https://build.julialang.org/builders/build_osx10.9-x64/builds/705/steps/shell_2/logs/stdio |
Unless code loading has an asynchronous part that completes after |
I tried to queue a few more builds, but it looks like Appveyor's configuration is broken right now |
Doesn't include do something funny now in case the file gets modified while running? Nothing should be getting modified here but maybe the workaround for that is causing issues. |
Request to Test: detect cause of #16091
I suspect this may be caused by the same issue as #15923 |
did you see this again? link? |
yeah, locally |
@ranjanan saw this today in https://ci.appveyor.com/project/JuliaLang/julia/build/1.0.3375/job/tjrdj3erbwok88bm, looks like the new form this can sometimes take is |
Ah, this error makes far more sense. The old bug is probably that this conditional is sometimes wrong: Lines 747 to 752 in a543e0c
I spent a while trying to reproduce this, before I realized that Amit included a patch for this in julia/base/clusterserialize.jl Line 32 in a543e0c
Upon reflecting further, I realized this may only be half of the problem. There seem to be a few candidates for the other half. For one, (A third issue, not encountered yet here due to the aforementioned bugs, but encountered previously by dump.c, the general deserializer for |
https://ci.appveyor.com/project/JuliaLang/julia/build/1.0.4678/job/o2l19ya94nreab0j min repro (in a fresh julia session):
|
This example is expected behavior. You have 2 different definitions for |
I think what's happening is that it tries to send over the local |
While I used the same variable name, note that these are anonymous functions, not the function |
I don't understand, isn't
|
Might be easier to see if you call them |
I tried to explicitly send my |
It is even more confusing now. On master:
On 2:
How can
|
OTOH
|
My understanding was that globals are not captured. Guess the behavior is different for functions vs data? |
I posted the min repro after seeing what needs to be added to my PR to fix this. The conditional at https://github.com/JuliaLang/julia/pull/17619/files#diff-aec7b7bfc3115e923e4137ad38876951R741
|
This behavior is a bit controversial though.
+1, though I think there's a chance we should only exclude |
Right. That brings up the other possibility, which is that the serializer should redirect them into |
Ah! Just to reconfirm, this is due to |
Yes. |
Sounds like either would work. |
also reduce code duplication for easier maintenance ref #16091
should_send_whole_type was sending too many regular type that weren't functions and deserialize was trying to hide that error, but was then not deserializing things that were anonymous functions fix #16091
also reduce code duplication for easier maintenance ref #16091
also use this `client_refs.lock` to protect other data-structures from being interrupted by finalizers, in the multi.jl logic we may want to start indicating which mutable data-structures are safe to call from finalizers, since generally that isn't possible to make a finalizer API gc-safe, that code should observe the standard thread-safe restrictions (there's no guarantee of which thread it'll run on), plus, if the data-structures uses locks for synchronization, use the `islocked` pattern (demonstrated herein) in the `finalizer` to re-schedule the finalizer when the mutable data-structure is not available for mutation. this ensures that the lock cannot be acquired recursively, and furthermore, this pattern will continue to work if finalizers get moved to their own separate thread. close #14445 fix #16550 reverts workaround #14456 (shouldn't break #14295, due to new locks) should fix #16091 (with #17619)
also use this `client_refs.lock` to protect other data-structures from being interrupted by finalizers, in the multi.jl logic we may want to start indicating which mutable data-structures are safe to call from finalizers, since generally that isn't possible to make a finalizer API gc-safe, that code should observe the standard thread-safe restrictions (there's no guarantee of which thread it'll run on), plus, if the data-structures uses locks for synchronization, use the `islocked` pattern (demonstrated herein) in the `finalizer` to re-schedule the finalizer when the mutable data-structure is not available for mutation. this ensures that the lock cannot be acquired recursively, and furthermore, this pattern will continue to work if finalizers get moved to their own separate thread. close #14445 fix #16550 reverts workaround #14456 (shouldn't break #14295, due to new locks) should fix #16091 (with #17619)
also use this `client_refs.lock` to protect other data-structures from being interrupted by finalizers, in the multi.jl logic we may want to start indicating which mutable data-structures are safe to call from finalizers, since generally that isn't possible to make a finalizer API gc-safe, that code should observe the standard thread-safe restrictions (there's no guarantee of which thread it'll run on), plus, if the data-structures uses locks for synchronization, use the `islocked` pattern (demonstrated herein) in the `finalizer` to re-schedule the finalizer when the mutable data-structure is not available for mutation. this ensures that the lock cannot be acquired recursively, and furthermore, this pattern will continue to work if finalizers get moved to their own separate thread. close #14445 fix #16550 reverts workaround #14456 (shouldn't break #14295, due to new locks) should fix #16091 (with #17619) (cherry picked from commit cd8be65) ref #16204
intended to help with anonymous functions that don't have names and JuliaLang#16091
also reduce code duplication for easier maintenance ref JuliaLang#16091
should_send_whole_type was sending too many regular type that weren't functions and deserialize was trying to hide that error, but was then not deserializing things that were anonymous functions fix JuliaLang#16091
also use this `client_refs.lock` to protect other data-structures from being interrupted by finalizers, in the multi.jl logic we may want to start indicating which mutable data-structures are safe to call from finalizers, since generally that isn't possible to make a finalizer API gc-safe, that code should observe the standard thread-safe restrictions (there's no guarantee of which thread it'll run on), plus, if the data-structures uses locks for synchronization, use the `islocked` pattern (demonstrated herein) in the `finalizer` to re-schedule the finalizer when the mutable data-structure is not available for mutation. this ensures that the lock cannot be acquired recursively, and furthermore, this pattern will continue to work if finalizers get moved to their own separate thread. close JuliaLang#14445 fix JuliaLang#16550 reverts workaround JuliaLang#14456 (shouldn't break JuliaLang#14295, due to new locks) should fix JuliaLang#16091 (with JuliaLang#17619)
Happens once in a while, I think I may have caused this actually in https://github.com/JuliaLang/julia/pull/15263/files#diff-58423af65cdd8c791e6fad72e0524984 - but why would
myid()
sometimes not return the right thing? Or is there a race condition?example cases: https://ci.appveyor.com/project/JuliaLang/julia/build/1.0.792/job/sxyalbspyv27fcs2
https://ci.appveyor.com/project/JuliaLang/julia/build/1.0.776/job/jj6iyr4w22kdupi4
https://ci.appveyor.com/project/JuliaLang/julia/build/1.0.770/job/8ftjs48560jpbdh8
https://ci.appveyor.com/project/JuliaLang/julia/build/1.0.760/job/nm0icqna2eyrwpu8
The text was updated successfully, but these errors were encountered: