-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
panic unprotected error in call to lua api (not enough memory) #120
Comments
Can you provide more details please? Knowing the platform, sysbench version and command line arguments would be helpful. Thanks! |
--test=select.lua mysql --num-threads=4096 |
How much memory is actually available for sysbench? Depending on the contents of the Lua script, sysbench with 4096 threads can allocate about 2 GB of memory, mostly for LuaJIT. I would monitor memory usage with a lower numbers of threads when sysbench doesn't crash and then do the math. |
about 30G available when --max-time >300 then crash |
So it must be either a memory leak in sysbench itself, or garbage collection in LuaJIT not working properly. Can you share the contents of select.lua to me to debug further? |
Closing, feel free to reopen if can provide more details. |
I encounter the same problem with sysbench 1.1.0 "PANIC: unprotected error in call to Lua API (not enough memory)"
it seem's this was caused by LUAJIT and build sysbench with system LUAJIT solve this problem
i think there is something wrong with the bunded LUAJIT |
@luckywhu thanks for the info. It looks like the sysbench version you were using had LuaJIT 2.1.0-beta2, while the latest sysbench bundles LuaJIT 2.1.0-beta3. System LuaJIT is usually 2.0. Can you please try the latest sysbench with LuaJIT 2.1.0-beta3 and see if it makes any difference? But generally, LuaJIT 2.1 is expected to require more memory per interpreter state. So using sysbench with that many threads is not a good idea. I need to spend some time to look at possible solutions. |
@akopytov
but sysbench 1.1.0 (using system LuaJIT 2.1.0-beta2) is ok
|
@luckywhu thanks. I wonder if |
different error message
|
@luckywhu interesting. thanks! |
Hi @akopytov I have met the same problem, below is the detail.
|
I still have this kind of questions. I only need to generate 200 threads, not as much as 4096... |
but I init 1000 tables。./sysbench --mysql-host=127.0.0.1 --mysql-port=3306 --mysql-user=*** --mysql-password=**** --mysql-db=sbtest --tables=1000 --table_size=500000 --rand-type=uniform --threads=250 --time=604800 --report-interval=10 --db-ps-mode=disable --percentile=95 --skip_trx=on --mysql-ignore-errors=6002,6004,4012,2013,4016,1062 lua/oltp_read_write.lua run |
From my testing at large numbers of threads this is luajit hitting the 2GB memory limit. When I switched out the luajit that is included with the current version of sysbench with this one that has a patch to fix the memory limit I can now run more than 2K threads. https://github.com/openresty/luajit2 |
Tried to do the same, finally got Sysbench compiled with this luajit2, but getting error on probe test: any idea what could go wrong ? Rgds, -Dimitri |
Ok, seems to be the false error -- I did not pay attention to update my Lua scripts on the host where I've tested the new Sysbench binary ;-)) -- now seems to work, test in progress! However, I also saw the claim that the latest LuaJIT-2.1 has also the fix for 2GB RAM limit, so I'm curious now to try both and see if the problem is solved for both, let's see.. Rgds, -Dimitri |
So far, I can confirm the latest code of LuaJIT-2.1 has also fix for 2GB limit -- makes sense to upgrade the bundled LuaJIT in Sysbench to the latest code as well ! -- any objections ? Rgds, -Dimitri |
how to upgrade the the bundled LuaJIT in Sysbench to the latest code? |
Hi, I also replace the luajit this version, but it still note me "PANIC: unprotected error in call to Lua API (not enough memory)" how do you do the replace activity? |
To upgrade to the latest LuaJIT-2.1 :
Rgds, -Dimitri |
test mysql
panic unprotected error in call to lua api (not enough memory)
The text was updated successfully, but these errors were encountered: