Skip to content
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

constant 10737418240 overflows int #4700

Closed
hongchaodeng opened this issue Mar 6, 2016 · 16 comments
Closed

constant 10737418240 overflows int #4700

hongchaodeng opened this issue Mar 6, 2016 · 16 comments

Comments

@hongchaodeng
Copy link
Contributor

I have a PR which failed with following message:

etcd/storage/backend/backend.go:41: constant 10737418240 overflows int

Full log is here.

Note that I am perfectly fine while using Go 1.5

@heyitsanthony
Copy link
Contributor

From the logs: +++ [0305 17:42:51] linux/arm: go build started

32-bit builds aren't supported

@gyuho
Copy link
Contributor

gyuho commented Mar 6, 2016

Yeah we define https://github.com/coreos/etcd/blob/master/storage/backend/backend.go#L41 with over int32 max.

@gyuho
Copy link
Contributor

gyuho commented Mar 6, 2016

Maybe we should document that in backend package?

@xiang90
Copy link
Contributor

xiang90 commented Mar 6, 2016

@gyuho We can fix the build. But there might be other issues for 32bit. Basically, go has some additional requirement for 32bit to work well (padding when you want to access data atomically). We have a lot of dependencies and we cannot make sure everyone takes care of this additional requirement. So we say we do not really support 32bit.

@xiang90
Copy link
Contributor

xiang90 commented Mar 6, 2016

/cc @heyitsanthony

@heyitsanthony
Copy link
Contributor

Probably should have a better 32-bit build failure indicator than overflows int, at least. It's certainly been a source of confusion.

@hongchaodeng
Copy link
Contributor Author

@heyitsanthony
Can we fix the failure?

@heyitsanthony
Copy link
Contributor

@hongchaodeng the sort of fix I have in mind would still be a build failure, just a less confusing one

@luxas
Copy link
Contributor

luxas commented Mar 7, 2016

etcd godeps haven't been a problem with arm
On the other hand arm64 had a boltdb issue as you know #3830

@xiang90 Is it possible to include arm, arm64 and maybe ppc64le in Travis build CI?
Just thinking out loud about possible solutions.

@luxas
Copy link
Contributor

luxas commented Mar 7, 2016

Got it compiled on both arm and amd64 by just

// backend.go
InitialMmapSize int64 = 10 * 1024 * 1024 * 1024

// boltoption_unix.go
InitialMmapSize: int(InitialMmapSize),

WDYT? I may send a PR if it fixes the problem.

@xiang90
Copy link
Contributor

xiang90 commented Mar 7, 2016

@luxas We can fix the build, that is simple. But the thing is that there might be data races in 32 bit even if it builds and we are not going to fix them.

@xiang90
Copy link
Contributor

xiang90 commented Mar 7, 2016

@luxas In another word, we do not officially support or extensively test etcd on 32 bit.

@luxas
Copy link
Contributor

luxas commented Mar 7, 2016

@xiang90 What about arm64 then?
I know the fix is simple, but I'd like to get it building at least.
You know, arm support isn't enterprise support, it's build-your-own-lab support. So I'm not super-worried about maybe-data races that could exist. You don't have to support arm for that reason.
arm64 on the other hand, could have enterprise interest.

I really do understand you, but I would be glad if the community would be allowed to make etcd build on arm at least. And a cross-build CI that tries to compile etcd for all arches go provides or just some of them would be an extra (cool) feature.

@xiang90
Copy link
Contributor

xiang90 commented Mar 7, 2016

@luxas I think arm64 can build as it is today. No? If you want to make it "builds". That is fine. Send a PR to us?

@luxas
Copy link
Contributor

luxas commented Mar 8, 2016

Yeah, arm64 do build since #3830, but I wondered if you are "supporting" it when you just said no support for 32-bit.

@xiang90 How about the cross-build CI just for automatically knowing on which platforms it compiles, so any arm (or any other arch) breakers may be spotted already at PR review. Of course, because you're not supporting it, you may merge anyway, but the thing is that you always know whether it's building. Would shippable be an alternative?

@xiang90
Copy link
Contributor

xiang90 commented Mar 9, 2016

Now 32bit builds and complaints when starts, closing this.

@xiang90 xiang90 closed this as completed Mar 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants