起因 这一次的问题出现在我开发的安全系统的 agent 中,在正式发布之前,测试到了这个问题,还算幸运😅 在内网测试环境中,agent 一直都没出现问题,直到运行五六天后,突然发现 lua 虚拟机崩溃了…
日志分析 {"level":"error","ts":"2021-05-31 19:50:27.023","caller":"workers/luaworker.go:132","msg":"call run func failed","error":"/data/dep/agent/lua/utils.lua:38: registry overflow\nstack traceback:\n\t[G]: in function 'gsub'\n\t/data/dep/agent/lua/utils.lua:38: in function 'split'\n\tlua/port.lua:42: in function 'inspect'\n\tlua/port.lua:21: in main chunk\n\t[G]: ?","lua":"port.lua"} {"level":"error","ts":"2021-05-31 19:51:27.104","caller":"workers/luaworker.go:132","msg":"call run func failed","error":"/data/dep/agent/lua/utils.lua:38: registry overflow\nstack traceback:\n\t[G]: in function 'gsub'\n\t/data/dep/agent/lua/utils.lua:38: in function 'split'\n\tlua/port.lua:42: in function 'inspect'\n\tlua/port.lua:21: in main chunk\n\t[G]: ?","lua":"port.lua"} {"level":"error","ts":"2021-05-31 19:53:27.296","caller":"workers/luaworker.go:132","msg":"call run func failed","error":"/data/dep/agent/lua/utils.lua:38: registry overflow\nstack traceback:\n\t[G]: in function 'gsub'\n\t/data/dep/agent/lua/utils.lua:38: in function 'split'\n\tlua/port.lua:42: in function 'inspect'\n\tlua/port.lua:21: in main chunk\n\t[G]: ?...