libos-nuse / linux-libos-tools

userspace tools for linux libos
GNU General Public License v2.0
95 stars 19 forks source link

libos-nuse/net-next-nuse#45 ? #22

Open vincentmli opened 9 years ago

vincentmli commented 9 years ago

I found a common pattern here that when I run either ping, iperf, or my own simple http client using libos-nuse, after ping or iperf run for a little while, the packet will stop completely, at one time ping test, I get:

ping: sendmsg: No buffer space available ping: sendmsg: No buffer space available ping: sendmsg: No buffer space available ping: sendmsg: No buffer space available

I tried libos-nuse with DPDK 1.7.1 or DPDK git upstream. both have same issue. I can try libos-nuse without DPDK, will let you know the result

vincentmli commented 9 years ago

I tested without DPDK, libos-nuse experienced same issue that the packet completely stops after some packet passing.( I ran tcpdump at the destination host to monitor traffic). please let me know what detail information you need to help you understand the issue.

thehajime commented 9 years ago

@vincentmli I'm going to reproduce this issue on my local machine.

thank you again.

vincentmli commented 9 years ago

I think this issue maybe same as https://github.com/libos-nuse/net-next-nuse/issues/45. here is my own simple c code to send http get request to reproduce the issue http://www.vcn.bc.ca/~vli/httpgettfo.c.txt

to compile the program:

gcc -g -dH -o httpgettfo httpgettfo.c

cp httpgettfo /bin

in my code i have usleep in the for loop, if it sleep 100 microsecond, it core dumps each run with same backtrace as https://github.com/libos-nuse/net-next-nuse/issues/45. If it sleep 0.1 second, the program would not core dump, but hang forever after running for a while (maybe 1 - 2 mintues). do you think it might be different than https://github.com/libos-nuse/net-next-nuse/issues/45 ?

for (;;) { //sleep(1); usleep(100);
if(get_page_thread(hpptr)){ perror("Can't get page"); exit(2); } }

my /home/vincent/nuse-raw.conf

interface p1p1 address 10.9.1.9 netmask 255.255.255.0 macaddr 00:01:01:01:01:02 viftype RAW

route network 10.9.1.0 netmask 255.255.255.0 gateway 10.9.1.2

I put the NUSECONF in the nuse bash script as:

export NUSECONF=/home/vincent/nuse-raw.conf

if [ -e /usr/lib64 ]; then sudo ln -f -s pwd/libnuse-linux.so /usr/lib64/libnuse-linux.so fi sudo ln -f -s pwd/libnuse-linux.so /usr/lib/libnuse-linux.so sudo chown root libnuse-linux.so sudo chmod 4755 libnuse-linux.so

LD_LIBRARY_PATH=.:../../../ LD_PRELOAD=liblinux.so:libnuse-linux.so $*

and run the command as:

./nuse httpgettfo 10.9.1.2

by the way, has https://github.com/libos-nuse/net-next-nuse/issues/45 been fixed ?

thehajime commented 9 years ago

@vincentmli thanks, I will look at this issue with your program.

I had a tentative patch for libos-nuse/net-next-nuse#45, but it's not a generic solution so need to work more.

https://gist.github.com/thehajime/65e58a101f0c50a04764