-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Support Freebsd #732
Comments
Hi @sjolicoeur thanks for this! And yes, we'd love to support the BSD family. We're working on expanding our support as much as possible. Vector depends on @a-rodin was able to, impressively, compile Vector by statically linking all dependencies in #689. You might be able to use that for inspiration. Otherwise I can start to look for someone that can help. |
Looks like there were related changes in leveldb-sys recently, have you tried replacing the release version of leveldb deps with the git one? |
A workaround currently for FreeBSD support is to compile vector with this command: $ cargo build --release --no-default-features This will build a version of vector without any of the C/C++ depedencies. This means there would be no kafka sink and no disk buffering. |
leveldb-sys 2.0.4 should work |
Apologies for the delay I tried
adding
|
@sjolicoeur the message is telling you to install protobuf |
installed
is there a way to list the supported variants from the command line? |
@sjolicoeur odd, could you paste what commit sha you are on? |
Could it be the same issue as in #791? The problem there was mitigated by use of GNU Assuming that the system C compiler is |
The system linker is indeed LLD on modern FreeBSD. You don't need the full path btw, just // Is this a bug in LLD or in |
It might be related to this issue. But if it is an LLD and not Rust compiler problem, then I think it should be isolated (i.e. reproduced without Rust) before reporting. |
Same issue here on OpenBSD 6.6. Using GNU ld didn't help either. |
Seems to build fine for me in debug mode on FreeBSD 12.0-RELEASE-p10 (
That last test is a little worrying though. |
@phyber that is one interesting error...possibly a |
Bumping
It's likely a random test is segfaulting, since the tests aren't run in any specific order. I'll try to narrow this down later by removing |
@phyber cargo test -- --test-threads 1 which would run tests serially and thus the latest printed test would be the one causing segmentation fault. I've observed |
OK, running with a single thread I see
Most of the time, however, we occasionally get slightly further:
|
btw al the encode tests rely on serde_json and chrono, nothing to do with actually talking to cloudwatch. |
One way to find out what exactly code is causing the segmentation fault is to use a debugger to print backtrace. Using LLDB it can be done as
or using GDB as
|
For anyone else unfamiliar with debugging this on FreeBSD, you'll either need to run the debugger as root, or enable debugging for unprivileged users with Running this with
Another run:
A successful run!
Failure earlier on:
The failures seem to always be in the hyper DNS threads, and it appears to be a race condition, given that it sometimes doesn't occur, and the switches between the threads that are crashing (first crash is After I've updated to FreeBSD 12.1 in a while, I'll try getting the libc debug symbols onto the machine to hopefully get slightly nicer output. |
What does hyper use for DNS resolution? The system resolver, c-ares, something written in Rust? |
So I believe this is the call itself https://github.com/hyperium/hyper/blob/0.12.x/src/client/connect/dns.rs#L212 this may be a bug with rust itself since it looks like its just using https://doc.rust-lang.org/stable/std/net/trait.ToSocketAddrs.html |
I think we are not going to support this anytime soon. There are the following complications:
|
Well, what does "support" even mean? :) No one has asked for official binaries (we like to build packages ourselves) or any kind of guarantees, we're just here to discuss solutions to bugs.
Note that Tier 2 includes official binary builds of Rust and all Rust commits being gated on these platforms building. Tier 1 is just the "extra special", the most mainstream platforms.
Note that FreeBSD keeps compatibility with old binaries around for ages (4.x binaries still work), the issue with the C bindings is with the compilation process (Rust Looks like the dependency update fixing the LLD bug has landed, yay. I'm going to test on my machines now. |
On -current with rust nightly, the aws_cloudwatch_logs tests actually crash with a malloc assertion
from setting thread name
Googling the assertion revealed jemalloc/jemalloc#1234 (hah, wow, issue number 1-2-3-4) aaand tests consistently pass with Would be interesting to try on Linux with jemallocator! |
Supported platforms have the following:
So for supported platforms there are certain guarantees provided by the items listed above. Of course it doesn't prevent Vector from happening to work on some of other platforms too, but no claims about feature completeness or stability are made for them. |
Hmm! Actually turns out |
Apologies for not getting around to performing the |
Now you should be able to just |
@myfreeweb It works! It looks like it could use a update with 0.7, could you recommend where we can send a version bump? |
Looks like https://svnweb.freebsd.org/ports/head/sysutils/vector/pkg-descr?view=log has a contact for the maintainer. |
@Hoverbear that's me! :) I'll look into bumping the version soon. |
Port is at 0.7.1 now, binary packages should get built soon. |
@myfreeweb Thank you so much! |
@Hoverbear can we close this as a result? And thank you @myfreeweb! |
I would be great to be able to run vector in FreeBSD ( or any other *BSD ). So I tried to do the manual steps and encountered a few errors. The first one was solved by using gnu-make (
gmake
) instead of bsd-make. I am not familiar with Rust, but I hope that this can help bring vector to FreeBSD. (it shouldn't be too far from MacOS support, I hope).Platform:
FreeBSD 11.2-RELEASE-p10
cargo 1.35.0
vector Source Version:
0.4.0-dev
Env options:
RUST_BACKTRACE=1
error:
The text was updated successfully, but these errors were encountered: