I used ab with ldp, for nginx bench test. Below is my start command: > > sudo env \ > VCL_CONFIG=/tmp/vcl-test-3af8e.conf \ > VCL_DEBUG=1 \ > LDP_DEBUG=1 \ > LDP_SID_BIT=9 \ > gdb -x /tmp/gdb-3af8e >
I got the vppcom_session_write_inline assert failds. Obviously apache ab's write function send the wrong params. But we in vppcom_session_write_inline only check the param: buf, not check the param: n. If I add the param n check, apache ab tools will work well. I think it's necessary to add the param:n check for vppcom_session_write_inline funcion. Here is my patch: https://gerrit.fd.io/r/c/vpp/+/23584 > > vppcom_session_create:1142: vcl<15458:0>: created session 1 > fcntl:503: ldp<15458>: fd 513 vlsh 1, cmd 3 > fcntl:503: ldp<15458>: fd 513 vlsh 1, cmd 4 > connect:1255: ldp<15458>: fd 513: calling vls_connect(): vlsh 1 addr > 0x555555768f18 len 16 > vppcom_session_connect:1608: vcl<15458:0>: session handle 1: connecting to > server IPv4 192.168.7.130 port 80 proto TCP > epoll_ctl:2203: ldp<15458>: epfd 512 ep_vlsh 0, fd 513 vlsh 1, op 1 > connect:1255: ldp<15458>: fd 513: calling vls_connect(): vlsh 1 addr > 0x555555768f18 len 16 > vppcom_session_connect:1592: vcl<15458:0>: session handle 1 [0x100000001]: > session already connected to IPv4 192.168.7.130 port 80 proto TCP, state > 0x1 (STATE_CONNECT) > epoll_ctl:2203: ldp<15458>: epfd 512 ep_vlsh 0, fd 513 vlsh 1, op 2 > epoll_ctl:2203: ldp<15458>: epfd 512 ep_vlsh 0, fd 513 vlsh 1, op 1 > /home/dev/net-base/build/vpp/src/vcl/vppcom.c:1968 > (vppcom_session_write_inline) assertion `n_write > 0' fails > > Program received signal SIGABRT, Aborted. > 0x00007ffff5b98337 in __GI_raise (sig=sig@entry=6) at > ../nptl/sysdeps/unix/sysv/linux/raise.c:55 > 55 return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig); > Missing separate debuginfos, use: debuginfo-install > keyutils-libs-1.5.8-3.el7.x86_64 libuuid-2.23.2-61.el7.x86_64 > pcre-8.32-17.el7.x86_64 > (gdb) bt > #0 0x00007ffff5b98337 in __GI_raise (sig=sig@entry=6) at > ../nptl/sysdeps/unix/sysv/linux/raise.c:55 > #1 0x00007ffff5b99a28 in __GI_abort () at abort.c:90 > #2 0x00007ffff506e8f3 in os_panic () at > /home/dev/net-base/build/vpp/src/vppinfra/unix-misc.c:176 > #3 0x00007ffff4fd6c93 in debugger () at > /home/dev/net-base/build/vpp/src/vppinfra/error.c:84 > #4 0x00007ffff4fd7062 in _clib_error (how_to_die=2, function_name=0x0, > line_number=0, fmt=0x7ffff57483f0 "%s:%d (%s) assertion `%s' fails") at > /home/dev/net-base/build/vpp/src/vppinfra/error.c:143 > #5 0x00007ffff571f70e in vppcom_session_write_inline (session_handle=1, > buf=0x555555763240 <_request>, n=0, is_flush=1 '\001') at > /home/dev/net-base/build/vpp/src/vcl/vppcom.c:1968 > #6 0x00007ffff571f81a in vppcom_session_write_msg (session_handle=1, > buf=0x555555763240 <_request>, n=0) at > /home/dev/net-base/build/vpp/src/vcl/vppcom.c:1986 > #7 0x00007ffff57467f5 in vls_write_msg (vlsh=1, buf=0x555555763240 > <_request>, nbytes=0) at > /home/dev/net-base/build/vpp/src/vcl/vcl_locked.c:505 > #8 0x00007ffff7bd0f3f in write (fd=513, buf=0x555555763240 <_request>, > nbytes=0) at /home/dev/net-base/build/vpp/src/vcl/ldp.c:424 > #9 0x00007ffff666e67b in apr_socket_send (sock=0x555555787fc0, > buf=0x555555763240 <_request> "GET / HTTP/1.0\r\nConnection: > Keep-Alive\r\nHost: 192.168.7.130\r\nUser-Agent: > ApacheBench/2.3\r\nAccept: */*\r\n\r\n", len=len@entry=0x7fffffffdc20) at > network_io/unix/sendrecv.c:41 > #10 0x000055555555b4f4 in write_request (c=c@entry=0x5555557870e0) at > ab.c:707 > #11 0x0000555555557f9e in write_request (c=0x5555557870e0) at ab.c:1793 > #12 test () at ab.c:1871 > > > > >
gdb.log
Description: Binary data
gdb-3af8e
Description: Binary data
vcl-test-3af8e.conf
Description: Binary data
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#14661): https://lists.fd.io/g/vpp-dev/message/14661 Mute This Topic: https://lists.fd.io/mt/61080258/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-