circonus-labs / fq Goto Github PK
View Code? Open in Web Editor NEWF@#$*&%Q (Message queue that is fast, brokered, in C and gets out of your way)
License: MIT License
F@#$*&%Q (Message queue that is fast, brokered, in C and gets out of your way)
License: MIT License
If a message arrives in a publisher thread, the message is allocated from a TLS free stack. Once that message is done it is deallocated back to the free stack on the original thread to speed future, similar sized msg allocation requests. This is awesome for performance.
When the thread terminates, the cleanup function will correctly tear down the free stacks. However, when the thread exits, that memory is now available for reuse and the message could still point into the free stacks and attempt to return messages into it.
Basically once the thread exits, any live message with a cleanup_stack
points into that TLS has a dangling, invalid pointer that it will use as soon as fq_msg_free is called.
If a binding request is incomplete and the session is terminated, the queue and client and sockets remain. This is likely true for other interrupted cmd messages.
after installing ck and jlog (./configure && make && sudo make install), fq is able to find all of its dependencies, and complies cleanly (aside from loads of warnings)
however, upon installation, we run fqd, and get
/usr/local/sbin/fqd: error while loading shared libraries: libck.so.0: cannot open shared object file: No such file or directory
ldd shows:
linux-vdso.so.1 => (0x00007ffe629c0000)
libck.so.0 => not found
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fd47bec1000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fd47bcbd000)
libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007fd47bab8000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fd47b8b0000)
libjlog.so.2 => not found
libsqlite3.so.0 => /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 (0x00007fd47b5ea000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd47b220000)
/lib64/ld-linux-x86-64.so.2 (0x00007fd47c0df000)
readelf -d
Dynamic section at offset 0x23db8 contains 31 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libck.so.0]
0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0]
0x0000000000000001 (NEEDED) Shared library: [libdl.so.2]
0x0000000000000001 (NEEDED) Shared library: [libuuid.so.1]
0x0000000000000001 (NEEDED) Shared library: [librt.so.1]
0x0000000000000001 (NEEDED) Shared library: [libjlog.so.2]
0x0000000000000001 (NEEDED) Shared library: [libsqlite3.so.0]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x000000000000000c (INIT) 0x4042c0
0x000000000000000d (FINI) 0x41cf74
0x0000000000000019 (INIT_ARRAY) 0x623da0
0x000000000000001b (INIT_ARRAYSZ) 8 (bytes)
0x000000000000001a (FINI_ARRAY) 0x623da8
0x000000000000001c (FINI_ARRAYSZ) 8 (bytes)
0x000000006ffffef5 (GNU_HASH) 0x400298
0x0000000000000005 (STRTAB) 0x402198
0x0000000000000006 (SYMTAB) 0x400788
0x000000000000000a (STRSZ) 4575 (bytes)
0x000000000000000b (SYMENT) 24 (bytes)
0x0000000000000015 (DEBUG) 0x0
0x0000000000000003 (PLTGOT) 0x624000
0x0000000000000002 (PLTRELSZ) 3024 (bytes)
0x0000000000000014 (PLTREL) RELA
0x0000000000000017 (JMPREL) 0x4036f0
0x0000000000000007 (RELA) 0x4036a8
0x0000000000000008 (RELASZ) 72 (bytes)
0x0000000000000009 (RELAENT) 24 (bytes)
0x000000006ffffffe (VERNEED) 0x4035a8
0x000000006fffffff (VERNEEDNUM) 5
0x000000006ffffff0 (VERSYM) 0x403378
0x0000000000000000 (NULL) 0x0
- linking fqd
Undefined symbols for architecture x86_64:
"_fq_debug_stacktrace", referenced from:
_fqd_route_prog__sample__d in fqd_dyn_sample.lo
ld: symbol(s) not found for architecture x86_64
Full build log https://jenkins.brew.sh/job/Homebrew%20Core%20Pull%20Requests/8242/version=sierra/testReport/junit/brew-test-bot/sierra/install_fq/
I get the following error on OmniOS06
$ sudo gmake install
install -d //usr/local/include
install -m 0444 fq.h //usr/local/include/fq.h
find: stat() error //usr/local/include/fq.h: No such file or directory
find: cycle detected for /lib/secure/32/
find: cycle detected for /lib/crypto/32/
find: cycle detected for /lib/32/
find: cycle detected for /usr/lib/32/
find: cycle detected for /usr/lib/secure/32/
find: cycle detected for /usr/lib/elfedit/32/
find: cycle detected for /usr/lib/lwp/32/
find: cycle detected for /usr/lib/link_audit/32/
install: fq.h was not found anywhere!
gmake: *** [install] Error 2
This can be fixed by using /usr/gnu/bin/install
instead of /usr/sbin/install
for installation in the Makefile. (cf. http://zero-knowledge.org/post/80/)
Not sure how to make this portable, though.
Currently auth is present in the protocol, but implemented as an "allow all." Implement a backend for the auth.
I met the error while trying to build fq:
fqd_listener.c: Assembler messages:
fqd_listener.c:134: Error: unknown pseudo-op: `.reference'
fqd_listener.c:134: Error: unknown pseudo-op: `.reference'
fqd_listener.c:80: Error: unknown pseudo-op: `.reference'
fqd_listener.c:80: Error: unknown pseudo-op: `.reference'
Makefile:138: recipe for target 'fqd_listener.o' failed
make: *** [fqd_listener.o] Error 1
My compiler version is:
gcc --version
gcc (GCC) 5.1.1 20150618 (Red Hat 5.1.1-4)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.