danyangz / slim Goto Github PK
View Code? Open in Web Editor NEWSlim: OS Kernel Support for a Low-Overhead Container Overlay Network
License: MIT License
Slim: OS Kernel Support for a Low-Overhead Container Overlay Network
License: MIT License
Dear Dr. Zhuo. Sorry to bother you. I have a question in the source code. I try my best but I still can't understand that. So I ask you for help. I'll be very grateful if you explain my doubts.
My question is: on line 268 of the file router.cpp, it calls socket ()
to create a new socket; but, on line 544 of the file router.cpp, it calls close ()
to close the socket just created. Why it creates a new socket (i.e. line 268 of router.cpp),and then close the socket (i.e. line 544 of router.cpp) immediately.
Thanks in advance.
Hi,
I am facing an error when trying to run Slim on nginx.
In host B, I run the command as follows:
root@ubuntu-16:/var/log/nginx# LD_PRELOAD=/slim/socket/SlimSocket.so VNET_PREFIX=10.32.0.0/12 /usr/sbin/nginx
In host A, I run the command:
root@ubuntu-16:/slim# LD_PRELOAD=/slim/socket/SlimSocket.so VNET_PREFIX=10.32.0.0/12 curl -i -X GET http://10.44.0.0/:80
connect() write 8 bytes to router.
curl: (52) Empty reply from server
root@ubuntu-16:/slim#
and the error.log of nginx is:
root@ubuntu-16:/var/log/nginx# cat error.log
2020/12/06 13:17:09 [alert] 1705#1705: worker process 1710 exited on signal 11 (core dumped)
root@ubuntu-16:/var/log/nginx#
note: I run the nginx and wget in ubuntu container.
Would be glad to hear some ideas on how to resolve the issue.
Thanks.
Hi,
I am facing a segmentation fault error when trying to run Slim on Centos 7.5 with Docker 19.03.6.
Below is some output from my debug effort with gdb:
$ docker run --cap-add=SYS_PTRACE --name c1 -v /tmp/slim/:/slim -it pingpong:v1
[root@c1 socket]# gdb --args env LD_PRELOAD=/slim/socket/SlimSocket.so iperf3 -s
(gdb) run
Starting program: /usr/bin/env LD_PRELOAD=/slim/socket/SlimSocket.so iperf3 -s
warning: Error disabling address space randomization: Operation not permitted
process 115 is executing new program: /usr/bin/iperf3
WARNING: VNET_PREFIX is not set. Using 0.0.0.0/0.
All connections are treated as virtual network connections.
[TRACE] New client with sock 4.
[TRACE] result of pthread_create --> 0
[TRACE] Start to handle the request from client sock 4.
[TRACE] Start to read from sock 4
[TRACE] Get request cmd 0
[DEBUG] SOCKET_SOCKET
[TRACE] write rsp 4 bytes to sock 4Program received signal SIGSEGV, Segmentation fault.
fd_store (type=fd_fsocket, host_fd=10, overlay_fd=-1, app_fd=-1) at socket.c:116
116 fdi->host_fd = host_fd;
(gdb) bt
#0 fd_store (type=fd_fsocket, host_fd=10, overlay_fd=-1, app_fd=-1) at socket.c:116
#1 socket (domain=, type=type@entry=1, protocol=protocol@entry=0) at socket.c:507
#2 0x00007ffff78cb640 in netannounce (domain=0, proto=proto@entry=1, local=0x0, port=) at net.c:158
#3 0x00007ffff78c7b5e in iperf_server_listen (test=test@entry=0x603010) at iperf_server_api.c:75
#4 0x00007ffff78c8372 in iperf_run_server (test=test@entry=0x603010) at iperf_server_api.c:469
#5 0x0000000000400f3b in run (test=test@entry=0x603010) at main.c:152
#6 0x0000000000400d29 in main (argc=2, argv=0x7fffffffe778) at main.c:111
Would be glad to hear some ideas on how to resolve the issue.
Thanks,
Vladimir
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.