These are most of the changes to channel.c and channel_mgmt.c from upstream.
They are needed to apply a proposed patch to fix yet another kernel crash
we reported. This patch is also included.
With these patches applied many thousand connections with random data and up
to 10 concurrent connections are sustained without kernel crashes.
This patch also updates the core Hyper-V socket support to v11 (which
also obsoletes the previous patch added to work around a kernel bug)
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
The Hyper-V socket patch has a bug which was triggered by a race condition when
the client connected and then immediately closed the connection before the
server would call accept(). This caused a kernel crash.
This patch was discussed with Dexuan Cui <decui@microsoft.com>, the original
author of the Hyper-V socket support.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This required pulling in the Qualcom IPC patches as those changed
the socket family enumeration.
All other patches should be the same.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
No practical change, but adds the "cherry-picked from" to aid tracking. This
has also been queued for stable so will eventually show up in a 4.4.x and can
be dropped from here.
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
Previously the logs for a single connection would be something like:
2016/05/04 12:44:41 171 Accepted connection on fd 5 from 00000002.00010006
2016/05/04 12:44:41 171 Connected to docker &{{0xc82008a5b0}}
2016/05/04 12:44:44 171 copying from vsock to docker: 4465 bytes done
2016/05/04 12:44:44 171 copying from docker to vsock: 1324 bytes done
2016/05/04 12:44:44 171 Done. read: 4465 written: 1324
2016/05/04 12:44:44 171 Closing docker &{{0xc82008a5b0}}
2016/05/04 12:44:44 171 Closing vsock &{0xc820086840}
The "Connected" and "Closing" lines are not useful now that it is debugged and
working well. The "copying..." lines are redundant with the "Done" line. Reduce
to just:
2016/05/04 14:00:41 4 Accepted connection on fd 10 from 00000002.00010003
2016/05/04 14:00:41 4 Done. read: 90 written: 145
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
Previously the proxy would listen only on the vsock port, which is
fine for accessing the port on the host, but if a container also wants
to access the port (e.g. via `--net=host` and using the Moby IP) then
we need to listen on the IP too.
Related to [docker/pinata#2854]
Signed-off-by: David Scott <dave.scott@docker.com>