-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
doubts about OpenSSL asynchronous mode #6864
Comments
As far as I can see LuaJIT doesn't use This doesn't mean there isn't a |
@paulidale I have tried to disable the |
I used the dasync engine and captured another backtrace:
|
Clearly something isn't dealing with the changing stack frames. I'd expect a byte code interpreter to be tolerant in this regard (they rarely consume much stack space). It is possible LuaJIT is using lots of stack during compilation. Perhaps, try disabling compilation in LuaJIT -- once it is back to being just an interpreter, the stack use should be small. |
I have tried to close the JIT compiler, it reduces the frequency of the process core dump, the abnormal phenomenon still remain (but the stack information now is clear). |
ping @mattcaswell |
Possibly a stack overflow? You could try adjusting the stack size defined here: openssl/crypto/async/arch/async_posix.c Line 18 in 28c5b7d
|
@mattcaswell |
When you call an async capable function in OpenSSL (with async mode on), we create a new stack for that function to use. This enables us to temporarily return to the top level calling function at any time, and then resume where we left off at some later time. |
@mattcaswell |
Well, that probably rules out a stack overflow! Looking at the stack trace it seems to fail somewhere in lua code (in the certificate callback). Strangely I can't match up the line numbers given in the stacktrace with the 1.1.1-pre2 version that you reported using. Anyway, I think you're going to have to turn your attention to lua and see if anyone there can help identify what is causing this. One other thing is that pre2 is quite old and a lot of bugs have been fixed since then. You might want to consider upgrading. |
One other thing is that pre2 is quite old and a lot of bugs have been fixed since then. You might want to consider upgrading. Thanks! I will try to upgrade my OpenSSL firstly. Is there some relevant bugs about the async mode? By the way, another type of backtrace was capture:
|
This backtrace also crashes in the certificate callback (in lua code). Without knowing what that is doing, its going to be difficult for us to make progress. |
Unfortunately after the upgrade, the problem still exists. |
After I closed the JIT Compiler in LuaJIT, our process crashed at another point:
One of the event handler pointer was reset to |
After I consulted the LuaJIT community, what the said is:
For example,
Our service set the What I need now is disable the async engine temporarily (in the current |
@mattcaswell |
It looks like https://www.openssl.org/docs/man1.1.0/crypto/ASYNC_start_job.html
|
@mejedi |
Seems the problem was fixed after added the |
Hi @mattcaswell adjusting the stack size is work for me, thanks for your information. maybe can adjust default
|
Hello!
We are trying to use the Intel qat service with the asynchronous mode OpenSSL in our OpenResty/Nginx service.
Problem is that we found our Nginx workers will exit on signal 11 (coredump) when running inside the libluajit (but start with the
ASYNC_start_job
), for example:I consulted a staff for Intel QAT in this issue: intel/QAT_Engine#79. What he guessed is that since both luajit and async mode openssl use the coroutine, maybe the two kinds of implements contain some conflicts.
Any idea and suggestion for this?
1.1.1-pre2
Best Regards
Alex Zhang
The text was updated successfully, but these errors were encountered: