It works! Thank you very much, Dave. Much appreciated.

Le mer. 25 mars 2020 à 09:39, Dave Barach (dbarach) <[email protected]> a
écrit :

> OK, no need to see the script... Classifier table out of memory... If
> you’re using the “classify table” debug CLI to set up the tables, change
> (or add) “memory-size xxxM” or “memory-size xxxG” to give the classifier
> enough memory. Depending on how many concurrent entries you expect, set the
> number of buckets somewhere between Nconcurrent/2 and Nconcurrent.
>
>
>
> HTH... Dave
>
>
>
> *From:* [email protected] <[email protected]> *On Behalf Of *Luc
> Pelletier
> *Sent:* Wednesday, March 25, 2020 9:21 AM
> *To:* Dave Barach (dbarach) <[email protected]>
> *Cc:* [email protected]
> *Subject:* Re: [vpp-dev] VPP Crashes When Executing Large Script Using
> 'exec'
>
>
>
> 2nd attempt - replying all. Dave - Apologies for the duplicate response.
>
>
>
> Thanks for your response. You're right -- I should have provided more
> details. My script is trying to set up a large numbers of IPs to block
> using classifiers. I now have a backtrace as well which indicates that it
> seems to run out of memory when creating classifier sessions. Maybe I'm not
> using classifiers correctly, it's been difficult to find documentation on
> how to use that feature. I'd be grateful for any tips or help you can
> provide. Thanks in advance.
>
>
>
> Here's the backtrace:
>
>
>
> #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
> #1  0x00007fd22f118801 in __GI_abort () at abort.c:79
> #2  0x000055be59a05ca3 in os_panic () at
> /usr/src/vpp/src/vpp/vnet/main.c:355
> #3  0x00007fd230484cf5 in clib_mem_alloc_aligned_at_offset
> (os_out_of_memory_on_failure=1, align_offset=0, align=64, size=<optimized
> out>) at /usr/src/vpp/src/vppinfra/mem.h:143
> #4  clib_mem_alloc_aligned (align=64, size=<optimized out>) at
> /usr/src/vpp/src/vppinfra/mem.h:163
> #5  vnet_classify_entry_alloc (t=t@entry=0x7fd1ef4ddd80,
> log2_pages=log2_pages@entry=13) at
> /usr/src/vpp/src/vnet/classify/vnet_classify.c:210
> #6  0x00007fd23048a224 in split_and_rehash (t=t@entry=0x7fd1ef4ddd80,
> old_values=old_values@entry=0x7fd1c1a99600,
> old_log2_pages=old_log2_pages@entry=11,
> new_log2_pages=new_log2_pages@entry=13)
>     at /usr/src/vpp/src/vnet/classify/vnet_classify.c:299
> #7  0x00007fd23048ae78 in vnet_classify_add_del (t=t@entry=0x7fd1ef4ddd80,
> add_v=add_v@entry=0x7fd1ef793a50, is_add=is_add@entry=1) at
> /usr/src/vpp/src/vnet/classify/vnet_classify.c:576
> #8  0x00007fd23048b73b in vnet_classify_add_del_session 
> (cm=cm@entry=0x7fd230bda1a0
> <vnet_classify_main>, table_index=<optimized out>, match=0x7fd1ef7b5140 "",
> hit_next_index=<optimized out>,
>     opaque_index=<optimized out>, advance=<optimized out>,
> action=<optimized out>, metadata=<optimized out>, is_add=<optimized out>)
> at /usr/src/vpp/src/vnet/classify/vnet_classify.c:2706
> #9  0x00007fd23048dfad in classify_session_command_fn (vm=<optimized out>,
> input=0x7fd1ef793d10, cmd=<optimized out>) at
> /usr/src/vpp/src/vnet/classify/vnet_classify.c:2790
> #10 0x00007fd22f9d9a3e in vlib_cli_dispatch_sub_commands 
> (vm=vm@entry=0x7fd22fc58380
> <vlib_global_main>, cm=cm@entry=0x7fd22fc585b0 <vlib_global_main+560>,
> input=input@entry=0x7fd1ef793d10,
>     parent_command_index=<optimized out>) at
> /usr/src/vpp/src/vlib/cli.c:568
> #11 0x00007fd22f9da1f3 in vlib_cli_dispatch_sub_commands 
> (vm=vm@entry=0x7fd22fc58380
> <vlib_global_main>, cm=cm@entry=0x7fd22fc585b0 <vlib_global_main+560>,
> input=input@entry=0x7fd1ef793d10,
>     parent_command_index=parent_command_index@entry=0) at
> /usr/src/vpp/src/vlib/cli.c:528
> #12 0x00007fd22f9da475 in vlib_cli_input (vm=vm@entry=0x7fd22fc58380
> <vlib_global_main>, input=input@entry=0x7fd1ef793d10,
> function=function@entry=0x0, function_arg=function_arg@entry=0)
>     at /usr/src/vpp/src/vlib/cli.c:667
> #13 0x00007fd22fa31999 in unix_cli_exec (vm=0x7fd22fc58380
> <vlib_global_main>, input=<optimized out>, cmd=<optimized out>) at
> /usr/src/vpp/src/vlib/unix/cli.c:3327
> #14 0x00007fd22f9d9a3e in vlib_cli_dispatch_sub_commands 
> (vm=vm@entry=0x7fd22fc58380
> <vlib_global_main>, cm=cm@entry=0x7fd22fc585b0 <vlib_global_main+560>,
> input=input@entry=0x7fd1ef793f60,
>     parent_command_index=parent_command_index@entry=0) at
> /usr/src/vpp/src/vlib/cli.c:568
> #15 0x00007fd22f9da475 in vlib_cli_input (vm=0x7fd22fc58380
> <vlib_global_main>, input=input@entry=0x7fd1ef793f60,
> function=function@entry=0x7fd22fa34bf0 <unix_vlib_cli_output>,
>     function_arg=function_arg@entry=0) at /usr/src/vpp/src/vlib/cli.c:667
> #16 0x00007fd22fa37cf6 in unix_cli_process_input (cm=0x7fd22fc58de0
> <unix_cli_main>, cli_file_index=0) at /usr/src/vpp/src/vlib/unix/cli.c:2572
> #17 unix_cli_process (vm=0x7fd22fc58380 <vlib_global_main>,
> rt=0x7fd1ef753000, f=<optimized out>) at
> /usr/src/vpp/src/vlib/unix/cli.c:2688
> #18 0x00007fd22f9f2c36 in vlib_process_bootstrap (_a=<optimized out>) at
> /usr/src/vpp/src/vlib/main.c:1475
> #19 0x00007fd22f4f3bb4 in clib_calljmp () from
> /usr/lib/x86_64-linux-gnu/libvppinfra.so.20.01
> #20 0x00007fd1eea76b30 in ?? ()
> #21 0x00007fd22f9f8041 in vlib_process_startup (f=0x0, p=0x7fd1ef753000,
> vm=0x7fd22fc58380 <vlib_global_main>) at /usr/src/vpp/src/vlib/main.c:1497
> #22 dispatch_process (vm=0x7fd22fc58380 <vlib_global_main>,
> p=0x7fd1ef753000, last_time_stamp=0, f=0x0) at
> /usr/src/vpp/src/vlib/main.c:1542
>
>
>
> And here's part of the script (I've eliminated a lot of the lines that are
> duplicated) -- please note IPs below are completely random as I'm only at
> the stage where I'm trying things out:
>
>
>
> classify table mask l3 ip4 src
> classify table mask l3 ip4 dst
> classify session hit-next 0 table-index 0 match l3 ip4 src 174.121.118.15
> classify session hit-next 0 table-index 1 match l3 ip4 dst 174.121.118.15
> classify session hit-next 0 table-index 0 match l3 ip4 src 93.154.207.221
> classify session hit-next 0 table-index 1 match l3 ip4 dst 93.154.207.221
> classify session hit-next 0 table-index 0 match l3 ip4 src 48.59.60.149
> classify session hit-next 0 table-index 1 match l3 ip4 dst 48.59.60.149
>
> <snip -- same pattern is repeated for 1000 IPs>
>
> classify session hit-next 0 table-index 1 match l3 ip4 dst 47.50.22.114
> classify session hit-next 0 table-index 0 match l3 ip4 src 36.192.94.210
> classify session hit-next 0 table-index 1 match l3 ip4 dst 36.192.94.210
> classify session hit-next 0 table-index 0 match l3 ip4 src 68.82.35.3
> classify session hit-next 0 table-index 1 match l3 ip4 dst 68.82.35.3
> set interface input acl intfc FailsafeEthernet4 ip4-table 0
> set interface output acl intfc FailsafeEthernet4 ip4-table 1
>
>
>
> Le mer. 25 mars 2020 à 08:19, Dave Barach (dbarach) <[email protected]> a
> écrit :
>
> How about: send a backtrace (preferably from a debug image), and put the
> script somewhere so that we can work the problem?
>
>
>
> *From:* [email protected] <[email protected]> *On Behalf Of *Luc
> Pelletier
> *Sent:* Wednesday, March 25, 2020 7:53 AM
> *To:* [email protected]
> *Subject:* [vpp-dev] VPP Crashes When Executing Large Script Using 'exec'
>
>
>
> Hi all,
>
>
>
> I have a large script (2000 lines, 146,459 bytes) that I'm trying to
> execute using 'exec' in vppctl. When I copy+paste commands from the script,
> it works fine. However, if I try to execute the script with 'exec
> /path/to/myscript.txt', VPP crashes.
>
>
>
> I'm running VPP v20.01 on Ubuntu 18.04 on Azure.
>
>
>
> Any suggestions?
>
>
>
> Thanks
>
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#15863): https://lists.fd.io/g/vpp-dev/message/15863
Mute This Topic: https://lists.fd.io/mt/72538712/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to