-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
db-less kong get empty reply when targets numbers > 3 in post json #5869
Comments
we recently added a workaround for a bug in OpenResty's fork of LuaJIT in #5797. Can you try in your version of Kong? |
@javierguerragiraldez we have try the workaround method, which is disable luajit get_bulk, however problem still exist. Also I think this is another problem, because this is not a random problem. It can reproduce in any arm64 machine and also see a core dump in log.
|
@javierguerragiraldez @hbagdi @guanlan I have confirm the bug is from https://github.com/Kong/lua-resty-dns-client/blob/master/src/resty/dns/balancer/ring.lua L136 self.indices = table.move(self.indices, 1, size, 1, {}) table.move will lead to core dumped in arm64 environment if the number of any backend upstream is larger than 3. Finally, If I replace the table.move to a simple loop assignment then problem solved. |
oh, this is very interesting! table.move() is a Lua 5.3 feature, as you point, but it was backported into LuaJIT. probably there's something not quite right when compiled on ARM64, or on the OpenResty's fork. maybe we should force the fallback on ARM64 until these kinks are ironed out. |
I've confirmed that |
@hbagdi Yes, we compile the Ingress Controller for arm64. @javierguerragiraldez Thank you. Is there any way to disable luajit in arm64? Maybe this make us easy to debug problem. |
This issue is a bug in LuaJIT's interpreter, not in the JIT itself. specifically, it's in the bytecode instruction used to set a table element within a "spliced in" built-in function, like table.move. the best solution is not to use table.move until it's fixed. Since in this case it's just copying to a new table, you can use local function copy_n(t, n)
local o = {}
for i = 1, n do
o[i] = t[i]
end
return o
end and replace the |
@javierguerragiraldez thanks, I have make a patch for our kong in arm64 environment and it works. |
Summary
I use kong and kubernetes ingress controller in arm64v8 environment, but I encountered a strange problem, kubernetes-ingress-controller failed to send post to kong admin api. At first, I thought it was a kubernetes-ingress-controller bug, and later I found that it was a kong problem.
kong ingress controller error message:
Steps To Reproduce
Additional Details & Logs
Kubernetes version: 1.14.6
Kong version 1.4.3
kubernetes-ingress-controller version: 0.7.1
Kong debug-level startup logs ($ kong start --vv)
Kong error logs ( It seems that none error message) log link
Kubernetes-ingress-controller error logs: log link
Json post to kong admin api: JSON
Operating system: Ubuntu 9.1.0-2ubuntu2~16.04
Arch: arm64v8
The text was updated successfully, but these errors were encountered: