-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Int Overflow Bug Reoccurs - Please Add Better Testing #1182
Comments
Thanks @bonedaddy . We should be able to add build options for 32-bit platforms to our travis.yml file |
@jarifibrahim could that a look at https://github.com/mitchellh/gox it's how I handle this stuff and its been working pretty well. |
@bonedaddy https://github.com/mitchellh/gox looks great but I think it might an overkill for us. I think if we just add a |
@jarifibrahim So no need to add unit tests, just a build on i386 platform is enough for the test? |
Yes. Adding a |
I've uploaded badger to Debian a while ago, which means it gets built on a number of different architectures. Full logs available here (click red/green status column for full build logs): As can be seen by cherry-picking the already committed fix, badger builds on 32bit architectures but testsuite has multiple failures and even crashes and even compilation failures. Maybe it's just the test-suite being broken and badger actually works on 32bit, but I'm scared to just disable the testsuite on all 32bit archs. Would be great if the test-suite also worked on 32 bit archs, so actually running it in your CI would IMHO be nice. Here are four examples of failures:
(FWIW, I guess the last one crashes because the tbl is dereferenced before
|
I've created a patch that seems to make everything build and testsuite pass for me on (atleast) 32bit (arm). Please scream at me if I'm messing something up in badger with my changes. Please feel free to apply my patch (as I don't think it reaches https://en.wikipedia.org/wiki/Threshold_of_originality so no copyright). |
Any updates on this? Version v2.0.1 can not be compiled on 32 bit systems. |
@andhe your patch looks fine to me. I have one question, why did you have to do @vardhanapoorv will send a PR to fix this. |
Hey @bonedaddy and @luca-moser, I've merged the fix for this issue #1216. Hopefully, the 32-bit overflow issue won't reappear :) |
Hi @jarifibrahim, sorry for not finding the time to get back to you earlier. I just wanted to report back that I've uploaded badger 2.0.2 to Debian (with all my previous local patches dropped) and the test suite doesn't pass (failing the Debian build). For full build/test logs click the red box at https://buildd.debian.org/status/package.php?p=badger My previous patches that actually both built and passed the testsuite on 32bit can be found at https://sources.debian.org/src/badger/2.0.1-4/debian/patches/ Note however that it seems like badger will still not actually be usable on 32bit because your allocating all free memory space when running badger standalone, means that when an application that includes badger does a single memory allocation before initializing badger means there's not enough memory space for badger anymore. (At least that's my guess, I haven't really found time to look closer at this.) I spent a few minutes on trying to get garagemq (which uses badger) to work on 32bit but quickly gave up... My comments for that are at valinurovam/garagemq#26 (comment) |
Hey @andhe I see
on https://buildd.debian.org/status/package.php?p=badger . What version of go are you using? I've seen the
|
I don't think I understand this correctly. Why does the application which uses badger consume all the memory? |
I think this bug is back again: ./../go/pkg/mod/github.com/dgraph-io/badger/[email protected]/value.go:50:5: constant 4294967295 overflows int |
This is the second time in less than two months that an issue with integer overflow happens, breaking builds on 32-bit platforms. Given that this is the second occurrence of such a bug, I think testing needs to be improved to catch this, because if it has already happened twice in 2 months, it will probably happen a 3rd, and a 4th if testing isn't improved to catch this.
Previous bug report #1142, commit fixing the first time the bug happened fb0cdb8, and the most recent commit to fix the same issue 465f28a
The text was updated successfully, but these errors were encountered: