-
Notifications
You must be signed in to change notification settings - Fork 202
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
nginx - php-fpm | Function not implemented #468
Comments
This particular line in the log doesn't look good. I guess this is the root cause. I wouldn't pay attention to the What is this combination of Also, what does it mean exactly "it doesn't work when both applications are graminized"? What happens exactly? Nginx doesn't respond to client requests? The Nginx process fails? The child PHP-FPM process fails? |
nginx uses SCM_RIGHTS to pass an FD, which isnt implemented in gramine, probably for nginx worker comunication? /// ./src/os/unix/ngx_channel.c
33 } else {
34 msg.msg_control = (caddr_t) &cmsg; // ./LibOS/shim/src/sys/shim_socket.c
1264 if (msg->msg_controllen != 0) {
1265 log_warning("\"struct msghdr\" ancillary data is not supported");
1266 return -ENOSYS; // edit I now roughly understand how the gramine implementation of sockets works now and this is not going to be a fun ride. I guess we could implement socket passing by short circuiting it in the PAL? Assuming the heap is shared, it's just a matter of passing around the handle with some locking. If it's not shared, we'd have to use an indirection on the host, which i think contradcits the whole reason nginx does that in first place. |
worker 1 fixes this, but the underlying issue with fcgi is actually #489 the workaround is
|
@aep We are actively working on the Big Sockets Rewrite -- this is one of the few parts of Gramine that wasn't overwritten in the past 5 years. So there are still many bugs and unimplemented functionality in the sockets emulation in Gramine. But this should be fixed rather soon (in ~1 month time). The Using the |
aight, let me know how I can help. |
You can try #499 to see if it helps |
nginx in enclave: - do not fork workers due to gramineproject/gramine#468 (also generally dont) - use select instead of epoll due to gramineproject/gramine#489 - link pcre static due to undetermined dynloader bug php in enclave: - patch away sockopt SO_LISTENQLEN and TCP_INFO due to gramineproject/gramine#503 - do not fork workers - manually force linking libm static, because the ld loader implements glibc versions incorrectly - remove apparmor from AC wordpress in enclave: - installer loads fine but needs mysql server to proceed
nginx in enclave: - do not fork workers due to gramineproject/gramine#468 (also generally dont) - use select instead of epoll due to gramineproject/gramine#489 - link pcre static due to undetermined dynloader bug php in enclave: - patch away sockopt SO_LISTENQLEN and TCP_INFO due to gramineproject/gramine#503 - do not fork workers - manually force linking libm static, because the ld loader implements glibc versions incorrectly - remove apparmor from AC wordpress in enclave: - installer loads fine but needs mysql server to proceed
nginx in enclave: - do not fork workers due to gramineproject/gramine#468 (also generally dont) - use select instead of epoll due to gramineproject/gramine#489 - link pcre static due to undetermined dynloader bug php in enclave: - patch away sockopt SO_LISTENQLEN and TCP_INFO due to gramineproject/gramine#503 - do not fork workers - manually force linking libm static, because the ld loader implements glibc versions incorrectly - remove apparmor from AC wordpress in enclave: - installer loads fine but needs mysql server to proceed
nginx in enclave: - do not fork workers due to gramineproject/gramine#468 (also generally dont) - use select instead of epoll due to gramineproject/gramine#489 - link pcre static due to undetermined dynloader bug php in enclave: - patch away sockopt SO_LISTENQLEN and TCP_INFO due to gramineproject/gramine#503 - do not fork workers - manually force linking libm static, because the ld loader implements glibc versions incorrectly - remove apparmor from AC wordpress in enclave: - installer loads fine but needs mysql server to proceed
What is the status of this? What errors you are seeing? |
yeah i don't think nginx will ever work in gramine. |
but it does work, at least in most configurations (and this seems to be the only one that used
which issue? I thought we fixed all problems with epoll |
I try to use nginx to proxy to backend server which listen with What is puzzling, it work well when the backend server which listen with nginx.conf
the error logs
|
Maybe you did not add all necessary files to protected, trusted or allowed files in manifest file? |
Closing this as: #579 was merged, so all issues should be fixed (except for missing support |
It will not be, beacase I run the app in container, so I scan all the file, and add to manifest as trusted. Maybe have some other problem, the trace log when I requested is as fellow: trace log
|
EAGAIN is possibly due to epoll. TLS has different timing than naked http. just disable it.
|
I swich to select, but still not work nginx.conf
error log
|
@yanzhichao The first log seems to be ok, I don't see anything failing in there... Actually, there is @aep That was fixed over two months ago, why would you think it's related? |
I have try the last commit which Completely rewrite networking code the error is same, still not work @boryspoplawski |
@yanzhichao Could you provide log trace of the failing run? |
sorry, I rebuild the gramine use latest master again, it work now. I may have just confused the version. ok, summary:
|
Good to hear |
Hi,
I'm using
nginx
in combination withphp-fpm
. My OS is ubuntu20.04.nginx
graminized standalone is working fine andphp-fpm
graminized standalone is working, too.Also if
php-fpm
is graminized with a not graminizednginx
is working.Unfortunately, it doesn't work when both applications are graminized.
We could see following
alert
messages, which are suspicious:Do you have an idea what I'm doing wrong?
I get the following error.log from
nginx
, when I rungramine-sgx nginx
:We did also a
strace
while we requested thephp-fpm
withoutgramine-sgx
:And a second log with
gramine-sgx nginx
:This is our
manifest.template
Thanks in advance!
The text was updated successfully, but these errors were encountered: