Open jdemeyer opened 6 years ago
Either I'm incredibly "lucky" or #24735 really triggered this for me. Observations until now:
only happened with the nix package, not sage-the-distribution. But since I only incremented the singular version and added the #24735 patch, it should not be a packaging issue
doesn't happen if the test is run individually
doesn't happen if I unroll the loop (manually copying the assert 29 times)
Description changed:
---
+++
@@ -1,4 +1,4 @@
-This failure has been reported after applying two unrelated patches (#23719 and ##24735):
+This failure has been reported after applying two unrelated patches (#23719 and #24735):
File "src/sage/schemes/elliptic_curves/padics.py", line 315, in sage.schemes.elliptic_curves.padics.padic_regulator
Changed keywords from none to random_fail
I'm not entirely sure to what extent the failure is really random. It might be deterministic but occur only under a very precise set of conditions.
A possible cannon-to-shoot-a-mosquito solution might be #25971.
I cannot reproduce on my desktop PC, even though that is executing the exact same build script in a sandbox with the exact same dependencies. It looks like I can reproduce deterministically on my laptop. Unfortunately that takes forever to run the whole testsuite...
It looks like this was actually triggered by the rc2 -> rc3
upgrade for me, not the singular update. I didn't test the rc upgrade individually and assumed the singular update would be at fault because the rc upgrade only contained a couple of bug fixes.
Although looking at the diff, I can't see anything that might cause this. All the changes in build
can be ignored. So the only things remaining are
Replying to @timokau:
Although looking at the diff, I can't see anything that might cause this. All the changes in
build
can be ignored. So the only things remaining are
- marking a couple of tests as known bugs
- update the version metadata
- add a stopgap to DuadicCodeEvenPair and DuadicCodeOddPair
I don't think that it's any of those changes in particular. This is a kind of non-local bug that I've seen in the past. Most likely it has something to do with precise memory (de)allocations: an unrelated change in Sage triggers some garbage collection which subtly changes something which eventually leads to this bug.
Then what can we do about it? All I can say is that it pretty reliably (2 times in a row) happens after the upgrade and pretty reliable doesn't happen (3 times in a row) before.
Looks like only integer arithmetic is involved; Might be a corrupted mpir limb in the pool due to a preceeding interrupt test. Where exactly the interrupt hits depends on may external factors...
Probably unrelated, but when trying to reproduce this on sage-the-dist (I could not), I got another error in the same file:
sage -t --long src/sage/schemes/elliptic_curves/padics.py
**********************************************************************
File "src/sage/schemes/elliptic_curves/padics.py", line 1409, in sage.schemes.elliptic_curves.padics.padic_E2
Failed example:
EllipticCurve([-1, 1/4]).padic_E2(5, 100)
Expected:
2 + 4*5 + 2*5^3 + 5^4 + 3*5^5 + 2*5^6 + 5^8 + 3*5^9 + 4*5^10 + 2*5^11 + 2*5^12 + 2*5^14 + 3*5^15 + 3*5^16 + 3*5^17 + 4*5^18 + 2*5^19 + 4*5^20 + 5^21 + 4*5^22 + 2*5^23 + 3*5^24 + 3*5^26 + 2*5^27 + 3*5^28 + 2*5^30 + 5^31 + 4*5^33 + 3*5^34 + 4*5^35 + 5^36 + 4*5^37 + 4*5^38 + 3*5^39 + 4*5^41 + 2*5^42 + 3*5^43 + 2*5^44 + 2*5^48 + 3*5^49 + 4*5^50 + 2*5^51 + 5^52 + 4*5^53 + 4*5^54 + 3*5^55 + 2*5^56 + 3*5^57 + 4*5^58 + 4*5^59 + 5^60 + 3*5^61 + 5^62 + 4*5^63 + 5^65 + 3*5^66 + 2*5^67 + 5^69 + 2*5^70 + 3*5^71 + 3*5^72 + 5^74 + 5^75 + 5^76 + 3*5^77 + 4*5^78 + 4*5^79 + 2*5^80 + 3*5^81 + 5^82 + 5^83 + 4*5^84 + 3*5^85 + 2*5^86 + 3*5^87 + 5^88 + 2*5^89 + 4*5^90 + 4*5^92 + 3*5^93 + 4*5^94 + 3*5^95 + 2*5^96 + 4*5^97 + 4*5^98 + 2*5^99 + O(5^100)
Got:
2 + 4*5 + 2*5^3 + 5^4 + 3*5^5 + 2*5^6 + 5^8 + 3*5^9 + 4*5^10 + 2*5^11 + 2*5^12 + 2*5^14 + 3*5^15 + 3*5^16 + 3*5^17 + 4*5^18 + 2*5^19 + 4*5^20 + 5^21 + 4*5^22 + 2*5^23 + 3*5^24 + 3*5^26 + 2*5^27 + 3*5^28 + 2*5^30 + 5^31 + 4*5^33 + 3*5^34 + 4*5^35 + 4*5^36 + 2*5^37 + 2*5^38 + 5^39 + 3*5^41 + 3*5^42 + 3*5^43 + 3*5^44 + 4*5^46 + 5^48 + 3*5^49 + 4*5^51 + 2*5^52 + 3*5^53 + 2*5^54 + 2*5^57 + 3*5^59 + 2*5^60 + 5^61 + 3*5^62 + 2*5^64 + 2*5^65 + 2*5^66 + 2*5^67 + 3*5^68 + 2*5^69 + 2*5^70 + 4*5^71 + 5^72 + 4*5^73 + 4*5^76 + 3*5^77 + 4*5^78 + 2*5^79 + 5^80 + 3*5^81 + 2*5^82 + 4*5^83 + 4*5^84 + 3*5^85 + 3*5^87 + 4*5^88 + 3*5^90 + 2*5^92 + 4*5^94 + 4*5^96 + 4*5^98 + O(5^100)
**********************************************************************
1 item had failures:
1 of 30 in sage.schemes.elliptic_curves.padics.padic_E2
[199 tests, 1 failure, 33.56 s]
Replying to @vbraun:
Looks like only integer arithmetic is involved; Might be a corrupted mpir limb in the pool due to a preceeding interrupt test.
As far as I can see, there is no such test in that file. The doctester tests every file in a separate process, so there can be no interference from interrupt tests in other files.
This failure has been reported after applying two unrelated patches (#23719 and #24735):
Component: misc
Keywords: random_fail
Issue created by migration from https://trac.sagemath.org/ticket/25969