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

Packaging broken because of uint64 overflow in auditbeat #5783

Closed
ruflin opened this issue Dec 1, 2017 · 5 comments · Fixed by elastic/fsevents#2
Closed

Packaging broken because of uint64 overflow in auditbeat #5783

ruflin opened this issue Dec 1, 2017 · 5 comments · Fixed by elastic/fsevents#2

Comments

@ruflin
Copy link
Contributor

ruflin commented Dec 1, 2017

Packaging for auditbeat currently fails with the following error:

23:56:44 /usr/local/osx-ndk-x86/bin/../SDK/MacOSX10.11.sdk/usr/include/dispatch/module.map:1:27: warning: unknown attribute 'extern_c' [-Wignored-attributes]
23:56:44 # github.com/elastic/beats/vendor/github.com/fsnotify/fsevents
23:56:44 vendor/github.com/fsnotify/fsevents/wrap.go:38: constant 36893488147419103231 overflows uint64
23:56:47 make[2]: *** [prepare-package-cgo] Error 2
23:56:47 make[2]: Leaving directory `/var/lib/jenkins/workspace/elastic+beats+master+package/src/github.com/elastic/beats/auditbeat'
23:56:47 make[1]: *** [package] Error 2
23:56:47 make[1]: Leaving directory `/var/lib/jenkins/workspace/elastic+beats+master+package/src/github.com/elastic/beats/auditbeat'

The culprit seems to be the following line: https://github.com/elastic/beats/blob/master/vendor/github.com/fsnotify/fsevents/wrap.go#L38

Strangely the dependency did not change in the last 5 months. I will test if I can reproduce it locally.

@ruflin
Copy link
Contributor Author

ruflin commented Dec 1, 2017

@adriansr @andrewkroh The problem was introduced with this PR: #5575 We had the package in beats before but it was not used. It started to be used in the above PR.

Also locally on my machine go build returns the overflow issue. I think our CI did not catch this issue because currently it's not complied for OS X. I will open a PR for that.

@andrewkroh
Copy link
Member

fsnotify/fsevents#31

@ruflin
Copy link
Contributor Author

ruflin commented Dec 1, 2017

Probably related to golang/go#21708

ruflin added a commit to ruflin/beats that referenced this issue Dec 7, 2017
For travis tests were added to run the testsuite also on OS X on travis and a crosscompile target was added for auditbeat. Having auditbeat built on OS X should prevent issues like elastic#5783.

In addition a global crosscompile target was added which should be used in Jenkins in the future. It does not use the BEATS array because packetbeat cannot be just crosscompiled on each machine for the different platforms because of the pcap dependencies. Currently the list of beats is hardcoded.
andrewkroh pushed a commit that referenced this issue Dec 7, 2017
* Add targets to crosscompile auditbeat and test on OS X

For travis tests were added to run the testsuite also on OS X on travis and a crosscompile target was added for auditbeat. Having auditbeat built on OS X should prevent issues like #5783.

In addition a global crosscompile target was added which should be used in Jenkins in the future. It does not use the BEATS array because packetbeat cannot be just crosscompiled on each machine for the different platforms because of the pcap dependencies. Currently the list of beats is hardcoded.

* Remove darwin because it uses cgo
@ruflin
Copy link
Contributor Author

ruflin commented Dec 12, 2017

@andrewkroh @adriansr I'm reopening this issue as this was auto closed by elastic/fsevents#2 I think merging the PR does not fix it yet as it first needs to make it into the vendor directory of beats.

@ruflin ruflin reopened this Dec 12, 2017
@andrewkroh
Copy link
Member

Fixed by #5866

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants