-
-
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
getipaddr
and getprivipaddr
disagree, causing problems with SharedArrays
#6171
Comments
I should have specified: "disagree" → "may disagree". I just restarted Julia and they now agree, but this is what I was getting before:
|
Cc: @amitmurthy |
In your case I am guessing that the ip-address changed sometime after julia was started (laptop sleep-wakeup cycle) and hence the cached ip-address as returned by #6030 does away with However, I still cannot explain the "access to undefined reference", since |
Yes, it's very likely that the issue showed up after I suspended and reawakened my laptop. The issue with |
OK. I'll submit a PR that will test localhost workers differently, i.e., will not use ip-addresses. This would be a typical case for shared arrays. ip-address checks will be done only for non-localhost workers - which would anyway not survive a suspend/awaken cycle. |
Wait, I have actually got around to reproduce the situation when I get different results from |
While testing out SharedArrays, I stumbled upon the fact that simple things like
A * x
whereA
is a SharedArray produce an "undefined reference" error.The reason is that such expressions call
similar
, which calls the constructor which callsassert_same_host
, where the pids are first checked bygetprivipaddr
and then compared togetipaddr
. It happens that these two disagree on the same host, therefore the new SharedArray is not recognized as belonging to the current host and its data becomes inaccessible:A quick fix is using
getprivipaddr(myid())
instead ofgetipaddr()
insizeassert_same_host
; however I'm wondering if those two functions should actually always produce the same result and need to be fixed.The text was updated successfully, but these errors were encountered: