-
Bug
-
Resolution: Done
-
Highest
-
None
-
None
-
None
- VPP version: v18.01-rc0~476-g6f8273a
- After the server's first call to ssize_t read(int fd, void *buf, size_t count) has returned all expected data sent by a client,
the same subsequent read() call loops endlessly in the VCL-LDPRELOAD library.
svm_fifo_dequeue_internal() returns -2 at svm_fifo.c:626:
625 if (PREDICT_FALSE (cursize == 0))
626 return -2; /* nothing in the fifo */
Therefore, the following do/while from within vppcom_session_read_internal() in src/vcl/vppcom.c loops endlessly (is_nonblocking == 0, n_read == -2):
2730 do
2731 {
2732 if (peek)
2733 n_read = svm_fifo_peek (rx_fifo, 0, n, buf);
2734 else
2735 n_read = svm_fifo_dequeue_nowait (rx_fifo, n, buf);
2736 }
2737 while (!is_nonblocking && (n_read <= 0));
- Stack trace:
#0 svm_fifo_dequeue_internal (f=0x200f07040, max_bytes=1024, copy_here=0x7fffffffd6a0 "Hallo Dude!") at /home/palmar/dev/vpp/build-data/../src/svm/svm_fifo.c:626
#1 0x00007ffff7b5cd35 in svm_fifo_dequeue_nowait_ma (f=0x200f07040, max_bytes=1024, copy_here=0x7fffffffd6a0 "Hallo Dude!") at /home/palmar/dev/vpp/build-data/../src/svm/svm_fifo.c:673
#2 0x00007ffff7b5cdb6 in svm_fifo_dequeue_nowait (f=0x200f07040, max_bytes=1024, copy_here=0x7fffffffd6a0 "Hallo Dude!") at /home/palmar/dev/vpp/build-data/../src/svm/svm_fifo.c:693
#3 0x00007ffff799fcd4 in vppcom_session_read_internal (session_index=1, buf=0x7fffffffd6a0, n=1024, peek=0 '\000') at /home/palmar/dev/vpp/build-data/../src/vcl/vppcom.c:2735
#4 0x00007ffff799ff8b in vppcom_session_read (session_index=1, buf=0x7fffffffd6a0, n=1024) at /home/palmar/dev/vpp/build-data/../src/vcl/vppcom.c:2793
#5 0x00007ffff7980c34 in vcom_socket_read (__fd=8, __buf=0x7fffffffd6a0, __nbytes=1024) at /home/palmar/dev/vpp/build-data/../src/vcl/vcom_socket.c:472
#6 0x00007ffff7977b39 in vcom_read (__fd=8, __buf=0x7fffffffd6a0, __nbytes=1024) at /home/palmar/dev/vpp/build-data/../src/vcl/vcom.c:228
#7 0x00007ffff7977bad in read (__fd=8, __buf=0x7fffffffd6a0, __nbytes=1024) at /home/palmar/dev/vpp/build-data/../src/vcl/vcom.c:246
(...)