You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Semi-random test failure of QTable operations #6291
Seems somewhat unlikely. Given the sporadic nature, I worry more about the change of info._parent to a weak reference - maybe sometimes the reference has disappeared. @taldcroft?
I have played with this a little. I ran the tests 20+ times locally (macosx + py3.5 + numpy 1.11 / 1.12) and could not reproduce the problem. It is a bit perplexing because (to first order) if there is a problem related to #6277 we should be seeing the AttributeError that comes if you access col.info somewhere and that is a dead weak reference. The try/except in the code is not catching AttributeError.
Just a wild guess - with weak references, if the weak reference is the last reference to an object, the exact point where the object will be garbage-collected is non-deterministic, so this might be what is happening here? (i.e. something is relying on the attribute existing but it is sometimes getting garbage collected too soon?)
One way to test my hypothesis - when creating a weakref, you can add a callback function when the original object is deleted, so this would help find out when exactly this happens and how this correlates with the test failures.
Looking at this because of #6725 - where the xfail on the tests might get reverted. Could this be the same bug that bit @larrybradley (#6703), where there was sometimes a reuse of the format function. If so, then this should be solved by #6714.
Activity
pllim commentedon Jun 27, 2017
git blameinastropy/units/quantity.pyaround the line of interest points to maybe #6137? The other commits are much older.mhvk commentedon Jun 27, 2017
Seems somewhat unlikely. Given the sporadic nature, I worry more about the change of
info._parentto a weak reference - maybe sometimes the reference has disappeared. @taldcroft?bsipocz commentedon Jun 27, 2017
now it seems to be disappeared from master PR runs, but was there a few hours ago with no related changes merged since...
taldcroft commentedon Jun 27, 2017
I have played with this a little. I ran the tests 20+ times locally (macosx + py3.5 + numpy 1.11 / 1.12) and could not reproduce the problem. It is a bit perplexing because (to first order) if there is a problem related to #6277 we should be seeing the
AttributeErrorthat comes if you accesscol.infosomewhere and that is a dead weak reference. The try/except in the code is not catchingAttributeError.mhvk commentedon Jun 27, 2017
Very weird.
bsipocz commentedon Jun 27, 2017
I've just restarted a travis job on v2.0.x branch on py3.4+np1.9 with the failure.
olebole commentedon Jun 28, 2017
I can confirm this failure with my first test build on Debian sid with Python 3.5.3. Test environment as reported in the log:
astrofrog commentedon Jun 28, 2017
Just a wild guess - with weak references, if the weak reference is the last reference to an object, the exact point where the object will be garbage-collected is non-deterministic, so this might be what is happening here? (i.e. something is relying on the attribute existing but it is sometimes getting garbage collected too soon?)
astrofrog commentedon Jun 28, 2017
One way to test my hypothesis - when creating a weakref, you can add a callback function when the original object is deleted, so this would help find out when exactly this happens and how this correlates with the test failures.
taldcroft commentedon Jun 28, 2017
Hmm, I ran 20 times on linux (CentOS-6) and could not generate the error:
32 remaining items
mhvk commentedon Oct 13, 2017
Looking at this because of #6725 - where the
xfailon the tests might get reverted. Could this be the same bug that bit @larrybradley (#6703), where there was sometimes a reuse of the format function. If so, then this should be solved by #6714.bsipocz commentedon Dec 5, 2017
We don't see this issue for a while, so the fix mention above seem to be working. I'm closing it now, but reopen if it pops up again.