-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The local n_lcores configuration of gt.lua exceeds 2, resulting in policy matching exception. #651
Comments
Could you post the log entries that are added when |
Before 17:28, 4 cores were configured. [2023-07-24 17:13:07] GT/3: Successfully updated the Lua state incrementally |
capture this log |
|
What are you updating incrementally? |
Which version of Gatekeeper are you running? What are the largest data structures in your policy? |
You copied the snipped above from file Have you found this log entry in your log file as well? It doesn't match the log entry |
“failed to allocate new lua state to GT block 0 at lcore 4” |
I have created more than 6000 policies in lua table. #637 mentioned that the policy consumes 1M memory. Is this a single policy consumption? Or is it the total consumption of policies? |
The problem has been found. The reason is that I designed a global and regional lpm table, enter the global ip, and distinguish the region by id. The global ip txt file is 31MB, and lua jit can only be fully loaded under 2 lcores. 4 lcore lua jit failed to reload because lua jit has insufficient memory space. Finally back to the issue #637, need to upgrade to lua jit 2.1, may solve this problem. |
This problem will not occur if the data entered into the lpm table is halved. If it is global complete ip data, this problem will occur. I am in the production and test environments, and the test results are consistent. |
This ip file has 1.6 million pieces of data.Doesn't luajit 2.0 support so much data? |
If your Lua policy uses Could you run the script lua_memory.lua with the command |
Yes, there is a lua function, which uses lua table to save these ip data.I will modify this function and test it later. |
Good news, after modifying the lua function, the 4 lcores can load these data normally. |
when grantor
gt.lua is configured with local n_lcores = 4, reload_policy is unsuccessful, and there is no error message or success message. Policy matches to nil.
When the configuration is local n_lcores = 2, we can reload_policy, there is a prompt of success, and the policy matches successfully
The text was updated successfully, but these errors were encountered: