Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upPi with 1 M digits not equal 3563018237 NE 2188794840 #2462
Comments
andrewdavidwong
added
the
C: other
label
Nov 27, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
andrewdavidwong
Nov 27, 2016
Member
Interesting.
Will it work for some n?
Yes, e.g. for 3:
680648812
Does this mean that you have confirmed that the hashes do match when pi is computed to only three digits?
|
Interesting.
Does this mean that you have confirmed that the hashes do match when pi is computed to only three digits? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
andrewdavidwong
Nov 27, 2016
Member
Does this mean that you have confirmed that the hashes do match when pi is computed to only three digits?
(This is helpful to rule out other possibilities, e.g., problems with the way hashing is being done.)
(This is helpful to rule out other possibilities, e.g., problems with the way hashing is being done.) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
andrewdavidwong
Nov 28, 2016
Member
Discussion thread: https://groups.google.com/d/topic/qubes-devel/rE7SmjGuSzA/discussion
|
Discussion thread: https://groups.google.com/d/topic/qubes-devel/rE7SmjGuSzA/discussion |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
XGlobetrotter
commented
Dec 5, 2016
|
No n = 3 means 10^3 = 1000 digits. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
XGlobetrotter
Dec 5, 2016
Last 3 digits N[Pi,10^6]
Qubes: 149
Windows: 021
149 NE 021
Something is running not well.
XGlobetrotter
commented
Dec 5, 2016
|
Last 3 digits N[Pi,10^6] |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
XGlobetrotter
commented
Dec 5, 2016
|
What will be a good reference for checking the Pi calculation? |
andrewdavidwong
added
the
help wanted
label
Dec 24, 2016
andrewdavidwong
added this to the Far in the future milestone
Dec 24, 2016
andrewdavidwong
added
bug
P: minor
labels
Apr 3, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarta
Jul 13, 2018
I think this is a Mathematica-Xen/large calculations error, not Qubes error (judging from the discussion linked).
marmarta
commented
Jul 13, 2018
|
I think this is a Mathematica-Xen/large calculations error, not Qubes error (judging from the discussion linked). |
XGlobetrotter commentedNov 27, 2016
Qubes OS version (e.g.,
R3.1): QR32Affected TemplateVMs (e.g.,
fedora-23, if applicable):The test was done with a Standalone Machine, because of the Mathematica activation policy it is not possible to run it inside a AppVM.
uname -a
Linux localhost 4.4.14-11.pvops.qubes.x86_64 #1 SMP Tue Jul 19 01:14:58 UTC 2016 x86_64 GNU/Linux
user@localhost:~$ free -m
total used free shared buffers cached
Mem: 7179 1078 6101 10 28 421
-/+ buffers/cache: 628 6551
Swap: 1023 0 1023
Expected behavior: Deterministic calculation of mathematical truth on any kind of system and especially Qubes.
Pi Black Box Testing:
Mathematica:
N[Pi,10^n]
Hash[%,"Adler32"]
or (in one line)
Hash[N[Pi, 10^6], "Adler32"]
Actual behavior:
3563018237 NE 2188794840
AMD Qubes R32:
n = 6
hash = 3563018237
Intel Win8
n = 6
hash = 2188794840
NE not equal
3563018237 NE 2188794840
Conclusion: One hash can be only the right one, because math is 100% deterministic.
Computer should be also deterministic, but it is sometimes hard to test them for 100%.
Here is a strong indicator, that at least one system, is not working correct.
Working-hypothesis: The hypervisor has some memory issues, which pop up here with long-integer-calculations.
Will it work for some n?
Yes, e.g. for 3:
680648812
(Let's assume that here all is right, in theory there might be some hash collision took place. There is an option to use other more long hashes, but this seems not bring us to another conclusion, that the calculations don't fit at all systems)
Steps to reproduce the behavior:
2 Repeat this on different platforms (e.g. Windows versus Qubes versus native Debian)
General notes:
Mathematica might be a useful tool, to check this out, but there are also many other math-libs or computer algebra programs (sage, maple), but the mathematical output is deterministic by definition and must be correct, otherwise there is some bug around.
Security Considerations: If the mathematical calculations will not lead to a deterministic result, cryptography functions can be affected because they are based on mathematical correct operations.
Related issues: Potential XEN MEM