Comments (2)
once you export 'LD_PRELOAD=libvma.so' to the shell, all following commands will get executed and run while loading VMA to the process's memory space. I'm guessing that that was not your intention.
So in your case above you dynamically loaded VMA into GDB memory space.
I don't know why it failed. We'll need to check that.
if you want to debug your './client_vma' with VMA then you need to use 'set environment LD_PRELOAD=libvma.so' in the gdb shell.
You might also need to specify the solib search path with '_gdb solib-search-path '.
Example:
$ gdb sockperf
(gdb) set args server
(gdb) set environment LD_PRELOAD=libvma.so
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/bin/sockperf server
VMA INFO: ---------------------------------------------------------------------------
VMA INFO: VMA_VERSION: 7.0.14-0 Release built on Jan 28 2016 21:08:18
VMA INFO: Cmd Line: /bin/bash -c exec /usr/bin/sockperf server
VMA INFO: OFED Version: MLNX_OFED_LINUX-3.2-1.0.1.1:
VMA INFO: Log Level INFO [VMA_TRACELEVEL]
VMA INFO: ---------------------------------------------------------------------------
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
VMA INFO: ---------------------------------------------------------------------------
VMA INFO: VMA_VERSION: 7.0.14-0 Release built on Jan 28 2016 21:08:18
VMA INFO: Cmd Line: /usr/bin/sockperf server
Detaching after fork from child process 15429.
VMA INFO: OFED Version: MLNX_OFED_LINUX-3.2-1.0.1.1:
VMA INFO: Log Level INFO [VMA_TRACELEVEL]
VMA INFO: ---------------------------------------------------------------------------
[New Thread 0x7ffff61f4700 (LWP 15433)]
sockperf: == version #2.7-43.git3ee62bd8107a ==
sockperf: [SERVER] listen on:
[ 0] IP = 0.0.0.0 PORT = 11111 # UDP
sockperf: Warmup stage (sending a few dummy messages)...
sockperf: [tid 15420] using recvfrom() to block on socket(s)
please tell me if this solves your debugging issue.
from libvma.
Thanks a lot for the details.. Specified steps worked for me.
$ gdb ./client_vma
GNU gdb (GDB) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./client_vma...done.
(gdb) set args 192.168.1.1 8000 1024 10 100
(gdb) set environment LD_PRELOAD=libvma.so
(gdb) r
Starting program: /home/dce/vikram/client_vma 192.168.1.1 8000 1024 10 100
VMA INFO: ---------------------------------------------------------------------------
VMA INFO: VMA_VERSION: 7.0.14-0 Release built on Jan 28 2016 20:41:00
VMA INFO: Cmd Line: /bin/bash -c exec /home/dce/vikram/client_vma 192.168.1.1 8000 1024 10 100
VMA INFO: OFED Version: MLNX_OFED_LINUX-3.2-1.0.1.1:
VMA INFO: Log Level INFO [VMA_TRACELEVEL]
VMA INFO: ---------------------------------------------------------------------------
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
VMA INFO: ---------------------------------------------------------------------------
VMA INFO: VMA_VERSION: 7.0.14-0 Release built on Jan 28 2016 20:41:00
VMA INFO: Cmd Line: /home/dce/vikram/client_vma 192.168.1.1 8000 1024 10 100
VMA INFO: OFED Version: MLNX_OFED_LINUX-3.2-1.0.1.1:
VMA INFO: Log Level INFO [VMA_TRACELEVEL]
VMA INFO: ---------------------------------------------------------------------------
[New Thread 0x7ffff61eb700 (LWP 8716)]
Buf[0] sent (Total data sent: 1024)
Buf[1] sent (Total data sent: 2048)
Buf[2] sent (Total data sent: 3072)
Buf[3] sent (Total data sent: 4096)
Buf[4] sent (Total data sent: 5120)
Buf[5] sent (Total data sent: 6144)
Buf[6] sent (Total data sent: 7168)
Buf[7] sent (Total data sent: 8192)
Buf[8] sent (Total data sent: 9216)
Buf[9] sent (Total data sent: 10240)
##Overall Total data sent = 10240 bytes
[Thread 0x7ffff61eb700 (LWP 8716) exited]
[Inferior 1 (process 8704) exited normally]
(gdb) quit
$ gdb ./server_vma_zcopy
GNU gdb (GDB) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./server_vma_zcopy...done.
(gdb) set args 192.168.1.1 8000
(gdb) set environment LD_PRELOAD=libvma.so
(gdb) r
Starting program: /home/dce/vikram/tmp/vikram/libvma_examples/server_vma_zcopy 192.168.1.1 8000
VMA INFO: ---------------------------------------------------------------------------
VMA INFO: VMA_VERSION: 7.0.14-0 Release built on Jan 28 2016 20:41:00
VMA INFO: Cmd Line: /bin/bash -c exec /home/dce/vikram/tmp/vikram/libvma_examples/server_vma_zcopy 192.168.1.1 8000
VMA INFO: OFED Version: MLNX_OFED_LINUX-3.2-1.0.1.1:
VMA INFO: Log Level INFO [VMA_TRACELEVEL]
VMA INFO: ---------------------------------------------------------------------------
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
VMA INFO: ---------------------------------------------------------------------------
VMA INFO: VMA_VERSION: 7.0.14-0 Release built on Jan 28 2016 20:41:00
VMA INFO: Cmd Line: /home/dce/vikram/tmp/vikram/libvma_examples/server_vma_zcopy 192.168.1.1 8000
VMA INFO: OFED Version: MLNX_OFED_LINUX-3.2-1.0.1.1:
VMA INFO: Log Level INFO [VMA_TRACELEVEL]
VMA INFO: ---------------------------------------------------------------------------
[New Thread 0x7ffff61eb700 (LWP 34733)]
Accepted connection on descriptor 23 (host=192.168.1.2, port=52799)
Total Data Recieved [socketfd: 23]: Based on iovec: 2048 bytes, Based on return value: 2048 bytes
Total Data Recieved [socketfd: 23]: Based on iovec: 3508 bytes, Based on return value: 3508 bytes
Total Data Recieved [socketfd: 23]: Based on iovec: 6428 bytes, Based on return value: 6428 bytes
Total Data Recieved [socketfd: 23]: Based on iovec: 7888 bytes, Based on return value: 7888 bytes
## ERROR: Datalen from vma_packet's iovec: 893 != Return value from recvfrom_zcopy: 2352 !!!
Total Data Recieved [socketfd: 23]: Based on iovec: 8781 bytes, Based on return value: 10240 bytes
from libvma.
Related Issues (20)
- can't sent/receive between internal threads with libvma HOT 4
- VMA TCP connect() call takes much longer than OS HOT 4
- Libvma : 8.9.4 arp caching HOT 4
- Use MADV_HUGEPAGE as ALLOC_TYPE_HUGEPAGES fallback
- NOT see any rocev2 packet HOT 9
- epoll_ctl EPOLL_CTL_MOD called incorrectly HOT 2
- issue: errno=111 Connection refused
- Rust TcpStream clone cannot send/recv through libvma HOT 5
- Unable to build libvma rpm follow the build instruction wiki HOT 2
- How do I fix the warning "Not enough hugepage resources for VMA memory allocation"?
- Running vma inside docker container HOT 9
- libvma uses huge amount of memory (~4x8G) with max RLIMIT_NOFILE HOT 2
- `libvma` load failed in some situation HOT 1
- `ibv_create_comp_channel` fails with ENOTTY (Inappropriate ioctl for device)
- Trouble Getting Timestamps in vma_recv_callback HOT 3
- failed to build libvma with gcc-12 HOT 5
- How to estimate a number of huge pages required by libvma? HOT 2
- Unable to find the libibverbs-devel header files HOT 2
- VMA support with Connectx-6 VPI HCAs HOT 3
- verify_qp_creation() QP creation failed on ConnectX-6 IPoIB interface HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libvma.