tried increasing the memory size of the classify table as per the
suggestion in  https://lists.fd.io/g/vpp-dev/topic/72538712#15861 but still
facing the crash

On Mon, Oct 25, 2021 at 3:31 PM Akash S R via lists.fd.io <akashsr.akashsr=
gmail....@lists.fd.io> wrote:

> Hey Stanislav,
>
> We have configured heap-size on .conf as 7GB and it is free.
> Below are the prints:
> ram memory:
> root@5495e5b86e58:/home/Immaculate/Oct12/vpp# free -h
>               total        used        free      shared  buff/cache
>   available
> Mem:           7.6G        2.1G        139M         21M        5.4G
>        5.2G
> Swap:          7.8G        112M        7.6G
> heap memory:
> DBGvpp# show memory main-heap
> Thread 0 vpp_main
>   base 0x7ffe33ab5000, size 7g, locked, unmap-on-destroy, name 'main heap'
>     page stats: page-size 4K, total 1835008, mapped 97293, not-mapped 3,
> unknown 1737712
>       numa 0: 97293 pages, 380.05m bytes
>     total: 6.99G, used: 103.44M, free: 6.89G, trimmable: 6.89G
>
> Regards,
> Akash
>
> On Mon, Oct 25, 2021 at 2:26 PM Stanislav Zaikin <zsta...@gmail.com>
> wrote:
>
>> Hi Akash,
>>
>> Looks like you've run out of memory. Did you try to increase heap-size in
>> the configuration file?
>>
>> On Mon, 25 Oct 2021 at 10:36, Akash S R <akashsr.akas...@gmail.com>
>> wrote:
>>
>>> Hi Mates,
>>>
>>> A fix if done to resolve the crash for classify table in vnet_classify.c
>>>
>>>
>>>
>>> *vnet_classify_new_table*
>>>
>>>
>>>
>>> vec_validate_aligned (t->buckets, nbuckets - 1, CLIB_CACHE_LINE_BYTES);
>>>
>>>   //  oldheap = clib_mem_set_heap (t->mheap);
>>>
>>>
>>>
>>>     clib_spinlock_init (&t->writer_lock);
>>>
>>>   oldheap = clib_mem_set_heap (t->mheap);
>>>
>>>       clib_mem_set_heap (oldheap);
>>>
>>>
>>>
>>> after this change more than 50k classify tables was able to create
>>> without any crash. But now  the crash is observed in creation of classify
>>> session , not able to create classify sessions for more than 32k table
>>> index.
>>>
>>>
>>>
>>> Please share the details like ,how can it be resolved, is there any
>>> additional configurations is needed .
>>>
>>>
>>>
>>> Thanks in advance.
>>>
>>>
>>>
>>> Bt for the crash:
>>>
>>> Program received signal SIGSEGV, Segmentation fault.
>>>
>>> 0x00007ffff60747af in clib_mem_alloc_aligned_at_offset (size=16,
>>> align=8, align_offset=8, os_out_of_memory_on_failure=1)
>>>
>>>     at /home/Immaculate/Oct12/vpp/src/vppinfra/mem.h:238
>>>
>>> 238       p = mspace_get_aligned (h->mspace, size, align, align_offset);
>>>
>>> (gdb) bt
>>>
>>> #0  0x00007ffff60747af in clib_mem_alloc_aligned_at_offset (size=16,
>>> align=8, align_offset=8, os_out_of_memory_on_failure=1)
>>>
>>>     at /home/Immaculate/Oct12/vpp/src/vppinfra/mem.h:238
>>>
>>> #1  0x00007ffff60749f5 in vec_resize_allocate_memory (v=0x0,
>>> length_increment=1, data_bytes=16, header_bytes=8, data_align=8,
>>> numa_id=255)
>>>
>>>     at /home/Immaculate/Oct12/vpp/src/vppinfra/vec.c:67
>>>
>>> #2  0x00007ffff6bd85c2 in _vec_resize_inline (v=0x0, length_increment=1,
>>> data_bytes=8, header_bytes=0, data_align=8, numa_id=255)
>>>
>>>     at /home/Immaculate/Oct12/vpp/src/vppinfra/vec.h:170
>>>
>>> #3  0x00007ffff6bdaf8a in vnet_classify_entry_alloc (t=0x7ffea4a55540,
>>> log2_pages=0) at
>>> /home/Immaculate/Oct12/vpp/src/vnet/classify/vnet_classify.c:255
>>>
>>> #4  0x00007ffff6bdbbc8 in vnet_classify_add_del (t=0x7ffea4a55540,
>>> add_v=0x7ffe2b4f3940, is_add=1)
>>>
>>>     at /home/Immaculate/Oct12/vpp/src/vnet/classify/vnet_classify.c:513
>>>
>>> #5  0x00007ffff6be44f7 in vnet_classify_add_del_session
>>> (cm=0x7ffff7db9460 <vnet_classify_main>, table_index=32352,
>>> match=0x7ffe8ee1c2f0 "",
>>>
>>>     hit_next_index=2, opaque_index=1, advance=0, action=0 '\000',
>>> metadata=0, is_add=1) at
>>> /home/Immaculate/Oct12/vpp/src/vnet/classify/vnet_classify.c:2911
>>>
>>> #6  0x00007ffff6be490b in classify_session_command_fn
>>> (vm=0x7ffe73ab7680, input=0x7ffe2b4f3ef0, cmd=0x7ffe7854f238)
>>>
>>>     at /home/Immaculate/Oct12/vpp/src/vnet/classify/vnet_classify.c:3004
>>>
>>> #7  0x00007ffff7e7584c in vlib_cli_dispatch_sub_commands
>>> (vm=0x7ffe73ab7680, cm=0x7ffff7f8fe60 <vlib_global_main+32>,
>>> input=0x7ffe2b4f3ef0,
>>>
>>>     parent_command_index=1062) at
>>> /home/Immaculate/Oct12/vpp/src/vlib/cli.c:591
>>>
>>> #8  0x00007ffff7e755d7 in vlib_cli_dispatch_sub_commands
>>> (vm=0x7ffe73ab7680, cm=0x7ffff7f8fe60 <vlib_global_main+32>,
>>> input=0x7ffe2b4f3ef0,
>>>
>>>     parent_command_index=0) at
>>> /home/Immaculate/Oct12/vpp/src/vlib/cli.c:548
>>>
>>> #9  0x00007ffff7e75d77 in vlib_cli_input (vm=0x7ffe73ab7680,
>>> input=0x7ffe2b4f3ef0, function=0x7ffff7f19fa1 <unix_vlib_cli_output>,
>>> function_arg=0)
>>>
>>>     at /home/Immaculate/Oct12/vpp/src/vlib/cli.c:694
>>>
>>> #10 0x00007ffff7f212a3 in unix_cli_process_input (cm=0x7ffff7f90280
>>> <unix_cli_main>, cli_file_index=0) at
>>> /home/Immaculate/Oct12/vpp/src/vlib/unix/cli.c:2613
>>>
>>> #11 0x00007ffff7f2203d in unix_cli_process (vm=0x7ffe73ab7680,
>>> rt=0x7ffe74a4eb80, f=0x0) at
>>> /home/Immaculate/Oct12/vpp/src/vlib/unix/cli.c:2731
>>>
>>> #12 0x00007ffff7ebe5f7 in vlib_process_bootstrap (_a=140730715027168) at
>>> /home/Immaculate/Oct12/vpp/src/vlib/main.c:1299
>>>
>>> #13 0x00007ffff5feb638 in clib_calljmp () at
>>> /home/Immaculate/Oct12/vpp/src/vppinfra/longjmp.S:123
>>>
>>> #14 0x00007ffe6c4736b0 in ?? ()
>>>
>>> #15 0x00007ffff7ebe720 in vlib_process_startup (vm=0x7ffe74a90808,
>>> p=0x7ffe73ab73b8, f=0x7ffff5facd1a <mspace_usable_size_with_delta+60>)
>>>
>>>     at /home/Immaculate/Oct12/vpp/src/vlib/main.c:1324
>>>
>>> #16 0x00007ffe74a90808 in ?? ()
>>>
>>> #17 0x00007ffe6c473730 in ?? ()
>>>
>>> #18 0x00007ffe74a1e1a0 in ?? ()
>>>
>>> #19 0x00007ffff7f14daa in vec_header_bytes
>>> (header_bytes=140730855186832) at
>>> /home/Immaculate/Oct12/vpp/src/vppinfra/vec_bootstrap.h:81
>>>
>>> #20 0x00007ffff5facd1a in mspace_usable_size_with_delta
>>> (p=0x7ffe74a1e1a8) at
>>> /home/Immaculate/Oct12/vpp/src/vppinfra/dlmalloc.c:4333
>>>
>>> #21 0x00007ffff7f14c6a in clib_mem_size_nocheck (p=0x7ffe74a1e1a8) at
>>> /home/Immaculate/Oct12/vpp/src/vppinfra/mem.h:217
>>>
>>> #22 0x00007ffff7f14d87 in clib_mem_size (p=0x7ffe74a1e1a8) at
>>> /home/Immaculate/Oct12/vpp/src/vppinfra/mem.h:346
>>>
>>> #23 0x00007ffff7f14f37 in _vec_resize_inline (v=0x0, length_increment=1,
>>> data_bytes=0, header_bytes=0, data_align=4, numa_id=255)
>>>
>>>     at /home/Immaculate/Oct12/vpp/src/vppinfra/vec.h:157
>>>
>>> #24 0x00007ffff7f17bbb in vlib_process_signal_event_helper
>>> (nm=0x7ffe73ab77f0, n=0x7ffe74a1da30, p=0x7ffe74a4eb80, t=0, n_data_elts=1,
>>> n_data_elt_bytes=8)
>>>
>>>     at /home/Immaculate/Oct12/vpp/src/vlib/node_funcs.h:903
>>>
>>> #25 0x000000000000000a in ?? ()
>>>
>>> #26 0x00007ffe6c473958 in ?? ()
>>>
>>> #27 0x00007ffff604c1c7 in vec_aligned_header (v=<error reading variable:
>>> Cannot access memory at address 0xfffffffffffffff8>,
>>>
>>>     header_bytes=<error reading variable: Cannot access memory at
>>> address 0xfffffffffffffff0>,
>>>
>>>     align=<error reading variable: Cannot access memory at address
>>> 0xffffffffffffffe8>) at
>>> /home/Immaculate/Oct12/vpp/src/vppinfra/vec_bootstrap.h:118
>>>
>>> Backtrace stopped: previous frame inner to this frame (corrupt stack?)
>>>
>>>
>>> Regards,
>>>
>>> Akash
>>>
>>>
>>>
>>>
>>
>> --
>> Best regards
>> Stanislav Zaikin
>>
>
> 
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#20380): https://lists.fd.io/g/vpp-dev/message/20380
Mute This Topic: https://lists.fd.io/mt/86572564/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to