Skip to content

vcl error:os_out_of_memory_on_failure #3601

Open
@miaoisacat

Description

@miaoisacat

use libvcl_ldpreload.so
High traffic will result in errors:

#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=140736675296832) at ./nptl/pthread_kill.c:44
#1 __pthread_kill_internal (signo=6, threadid=140736675296832) at ./nptl/pthread_kill.c:78
#2 __GI___pthread_kill (threadid=140736675296832, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3 0x00007ffff7db6476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4 0x00007ffff7d9c7f3 in __GI_abort () at ./stdlib/abort.c:79
#5 0x00007ffff7ce88e6 in os_panic () at /work/git/vpp/src/vppinfra/unix-misc.c:227
#6 0x00007ffff7cb0b6c in clib_mem_heap_alloc_inline (size=, align=8,
os_out_of_memory_on_failure=, heap=) at /work/git/vpp/src/vppinfra/mem_dlmalloc.c:655
#7 clib_mem_heap_realloc_aligned (heap=, p=0x7fffe7b43fd0, new_size=303199262, align=)
at /work/git/vpp/src/vppinfra/mem_dlmalloc.c:752
#8 0x00007ffff7cea893 in _vec_realloc_internal (v=0x7fffe7b43fd8, n_elts=11229602, attr=)
at /work/git/vpp/src/vppinfra/vec.c:96
#9 0x00007ffff7d4190e in _vec_add1 (vp=0x7fffe7b39808, hdr_sz=0, align=8, elt_sz=18)
at /work/git/vpp/src/vppinfra/vec.h:635
#10 vcl_handle_mq_event (wrk=wrk@entry=0x7fffe7b39740, e=0x7fffd79a1fde) at /work/git/vpp/src/vcl/vppcom.c:1044
#11 0x00007ffff7d40f68 in vcl_worker_flush_mq_events (wrk=wrk@entry=0x7fffe7b39740) at /work/git/vpp/src/vcl/vppcom.c:1248
#12 0x00007ffff7d46da5 in vppcom_session_read_internal (session_handle=0, buf=0x7fffc8000b70, n=8, peek=0 '\000')
at /work/git/vpp/src/vcl/vppcom.c:2161
#13 0x00007ffff7d5fa02 in vls_read (vlsh=0, buf=buf@entry=0x7fffc8000b70, nbytes=nbytes@entry=8)
at /work/git/vpp/src/vcl/vcl_locked.c:1283
#14 0x00007ffff7faa843 in read (fd=32, buf=0x7fffc8000b70, nbytes=8) at /work/git/vpp/src/vcl/ldp.c:380
#15 0x00005555555555ec in thread_loop (userdata=0x7fffcf89c010) at udpreceiver1.c:62
#16 0x00005555555565ba in _thread_start (userdata=0x55555555b6b0) at net.c:179
#17 0x00007ffff7e08ac3 in start_thread (arg=) at ./nptl/pthread_create.c:442
#18 0x00007ffff7e9a850 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

The reason is that the memory has not been released

source file:
src/vcl/vppcom.c
func:
vcl_handle_mq_event
code:
case SESSION_IO_EVT_RX:
case SESSION_IO_EVT_TX:
s = vcl_session_get (wrk, e->session_index);
if (!s || !vcl_session_is_open (s))
break;
vec_add1 (wrk->unhandled_evts_vector, *e);
break;

Modify as follows.
case SESSION_IO_EVT_RX:
case SESSION_IO_EVT_TX:
s = vcl_session_get (wrk, e->session_index);
if (!s || !vcl_session_is_open (s))
break;
vec_add1 (wrk->unhandled_evts_vector, *e);
u32 index = ~0;
vec_del1(wrk->unhandled_evts_vector, index);
break;

This way, there won't be any out of bounds errors reported

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions