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

Merge max-next for v2018.02 #1311

Merged
merged 34 commits into from Apr 13, 2018
Merged

Merge max-next for v2018.02 #1311

merged 34 commits into from Apr 13, 2018

Conversation

eugeneia
Copy link
Member

Includes: #1274 #1300 #1308 #1271 #1287 plus some documentaition fixes.

Cc @lukego

Marcel Wiget and others added 30 commits November 20, 2017 14:06
DNS-SD (DNS Service Discovery) is the protocol used by Apple's Bonjour
to discover services and devices in a local network.  It's widely used
as well for discovering IoT devices such as Chromecast, Amazon FireTV or
services such as Spotify in a local area network.

Snabb's dnssd program is similar to avahi-browser. Given an OS network
interface sends a multicast query to discover the services and devices
available in the network.

The program reads incoming traffic and prints out responses.  Currently
supported DNS records are PTR, A, SRV and TXT.
See README for usage.
The accumulators lastfrees, lastfreebytes, lastfreebits for the
counters frees, freebytes and freebits are initialized as Lua numbers
but implicitly converted to cdata objects in the assignments in
pace_breathing(). This causes allocations that cannot be removed by
the sink optimizer.  Conversion to Lua numbers avoids this and reduces
GC noise.
There was a race condition when setting up the supervisor such that in
some cases it was possible to miss a signal when the parent process
died.  We could reproduce this with by running a "snabb lwaftr bench",
but only on our test machine with two NUMA nodes and only when setting
--cpu on the lwaftr.  In that case the problem would appear when
running "snabb lwaftr monitor" on the lwaftr; the monitor process
would hang reading from the signalfd.  Because the monitor process
still had stdout open, then when piping its output to "grep", the grep
process would hang because the write side of its stdin pipe would
still be open as well.

This patch fixes this error by making cleanup reliable.  It does so by
taking a POSIX lock on an unnamed file in the parent, then taking
another lock from the supervisor child process.  In this way we avoid
some of the more arcane parts of Linux.
This is another instance of the bug from commit
93ef6bd.  We didn't see any issue on
upstream Snabb's test suites, but with RaptorJIT's new LJ_GC64 usage did
manifest itself as intermittent heap corruption.

Fixes #1307.
@eugeneia
Copy link
Member Author

Ugh, wrong target branch.

@eugeneia eugeneia closed this Mar 23, 2018
@eugeneia eugeneia changed the base branch from master to next March 23, 2018 16:23
@eugeneia
Copy link
Member Author

Oh, GitHub actually lets me change the base branch without opening a new PR, cool!

@eugeneia eugeneia reopened this Mar 23, 2018
@wingo
Copy link
Contributor

wingo commented Apr 3, 2018

Surely this should be v2018.04 or something? :)

This can be used to easily test Snabb on i.e. MacOS via docker.
@lukego lukego merged commit 4679c9c into next Apr 13, 2018
lukego added a commit that referenced this pull request Apr 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants