Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upTest failures in 32-bit architectures #887
Comments
TheTincho
changed the title
Build issues in 32-bit architectures
Test failures in 32-bit architectures
Jul 11, 2015
This comment has been minimized.
This comment has been minimized.
|
Strange. Especially in the Do you happen to have access to some 32-bit system? :) |
This comment has been minimized.
This comment has been minimized.
|
(just running the tests with GOARCH=368 didn't reproduce the problem for me) |
This comment has been minimized.
This comment has been minimized.
|
Hi julius, I do have access to 32-bit machines, but these are only for Debian Developers, sadly.. :( Now, looking at the build log for i386, I see it is actually a 64bit machine running a 32bit system. So I tried doing the same here, and I was able to reproduce the problem using a i386 chroot inside my amd64 system. Maybe you could do the same? If you run Debian or Ubuntu, creating a 32bit chroot is as easy as running
|
This comment has been minimized.
This comment has been minimized.
|
So I did the above under Ubuntu on a 64bit machine and ran Hmmm, maybe could you detail all the exact steps (after the debootstrap) that led to your test failure? Maybe I did something slightly different... |
This comment has been minimized.
This comment has been minimized.
|
As this is rooted in the storage, my best guess would be some difference at the file system level. Do you have information on that @TheTincho? |
This comment has been minimized.
This comment has been minimized.
|
Oh, that'd be really strange. I'd still bet on something in the double-delta encoding manual bit fiddling magic being off on 32 bit. |
This comment has been minimized.
This comment has been minimized.
|
The steps I used are the ones from the Debian build, namely I have now tried doing a build with an untouched prometheus 0.14.0 tree and Makefile, and the tests don't fail in the chroot either. So I guess I am hitting some bug in one of the dependencies that was solved in a different commit, and that the tests for that package are not detecting. The debian tree separates the dependencies in different packages, and I might have made a mistake getting the right version... I will try checking the dependencies' versions one by one then. Any hints as to which package might be responsible for this? goleveldb maybe? |
This comment has been minimized.
This comment has been minimized.
|
Oh, interesting! If it is indeed a dependency issue, the only one that I can imagine having any effect on this would be |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
There was a alignment change for mutex correctness a while back - prometheus/client_golang@944920c |
This comment has been minimized.
This comment has been minimized.
|
Without this change those tests wouldn't even have the chance to error on the used 32-bit machine as they would have paniced immediately. |
This comment has been minimized.
This comment has been minimized.
|
Yeah, that also shouldn't be able to cause e.g. the |
This comment has been minimized.
This comment has been minimized.
|
I checked the client_golang, and I am using exactly the same commit. |
This comment has been minimized.
This comment has been minimized.
|
I also managed to reproduce the test failures using the build steps you described now (took me a while to figure out the necessary Debianisms). It seems that it's actually the sample values, not the timestamps, which are off. Adding some debug statements to the
The sample values here (7, 8, 9, 10) do not match the test fixture data, which is:
I suspect that the delta/double-delta-encoded chunks have a bug on 32-bit systems somewhere. Still looking into it, but probably won't make much progress anymore today due to jetlag and going to bed soon. |
This comment has been minimized.
This comment has been minimized.
|
(No clue of course why this doesn't happen when compiling via Makefile) |
This comment has been minimized.
This comment has been minimized.
|
So, you say this might be a bug in the prometheus code and not in the dependencies then? Thanks a lot for looking into this! |
This comment has been minimized.
This comment has been minimized.
|
Maybe! I still don't understand why it would only happen when using all the Debian dependencies (including the Debian Go compiler, etc.), and not when using the Makefile. So far, the actual bug could still be anywhere... |
This comment has been minimized.
This comment has been minimized.
|
I think I found something.. I tried compiling with the Makefile, but using Debian dependencies and it still works ok. So, what I tried now is to use the Debian go binaries instead of the official ones, and then I get the test failures. So this might actually be a problem with the go compiler. |
This comment has been minimized.
This comment has been minimized.
|
(or with the go runtime) |
This comment has been minimized.
This comment has been minimized.
|
I found out one deviation. The following program:
...prints |
This comment has been minimized.
This comment has been minimized.
|
So turns out with the Debian compiler, you have to change this to get correct results:
That initial conversion to signed integer seems to make the later conversion to unsigned work equivalently in both compilers. Will look into this some more tomorrow. |
This comment has been minimized.
This comment has been minimized.
|
This issue explains why: https://code.google.com/p/go/issues/detail?id=3966 "In all non-constant conversions involving floating-point or complex values, if the result type cannot represent the value the conversion succeeds but the result value is implementation-dependent." |
This comment has been minimized.
This comment has been minimized.
|
Ah, great find!! The bad news is that then it cannot be considered a bug in the Debian golang-go packages :-) Meanwhile, I was able to make the debian package work with only using the upstream go complier and not changing anything else. |
juliusv
added a commit
that referenced
this issue
Jul 13, 2015
juliusv
referenced this issue
Jul 13, 2015
Merged
storage: Fix float->uint conversions on some compilers. #890
This comment has been minimized.
This comment has been minimized.
|
#890 to fix this. With this PR, all tests pass for me when I run them manually with Debian's Go compiler and a HEAD checkout of Prometheus. When I do a local modification to Debian's Prometheus source install, I still get some errors, including some which seem to have different causes, like YAML errors. There might be other bad dependencies in there. |
This comment has been minimized.
This comment has been minimized.
|
I have backported #890 to 0.14.0 as a Debian patch, and I get no errors now! I am not sure what could be the cause of the errors you are seeing, I'd be happy to help debug them. |
This comment has been minimized.
This comment has been minimized.
|
@TheTincho Oh, I don't need my errors debugged - I probably just did something wrong in my chroot. If it works for you without errors in your installation now, that sounds good :) |
This comment has been minimized.
This comment has been minimized.
|
I will double check this in real 32 bit hardware, but I think it is solved now. |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
@TheTincho Please close this once you have verified with the real 32bit hardware. |
This comment has been minimized.
This comment has been minimized.
|
@beorn7 The main issue seems solved, but I experienced other errors, like Julius did. I am trying to determine if these are related or not. |
This comment has been minimized.
This comment has been minimized.
|
So it seems it is a different issue, closing this now, and will report on the other issues separately. |
TheTincho
closed this
Jul 26, 2015
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 24, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
TheTincho commentedJul 11, 2015
Hi,
I got a report from the Debian autobuilders that Prometheus fails to build in i386, armel and armhf; all 32-bit architectures.
They all have similar failures: the tests were expecting a value, but got a different one. Any idea of what could be causing this?
You can see the full logs here:
https://buildd.debian.org/status/fetch.php?pkg=prometheus&arch=i386&ver=0.14.0%2Bds-1&stamp=1436512554
https://buildd.debian.org/status/fetch.php?pkg=prometheus&arch=armel&ver=0.14.0%2Bds-1&stamp=1436512912
https://buildd.debian.org/status/fetch.php?pkg=prometheus&arch=armhf&ver=0.14.0%2Bds-1&stamp=1436512972