Skip to content
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

Added an Initial version of a NGINX demo #1451

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dzobbe
Copy link

@dzobbe dzobbe commented Dec 15, 2023

Hi all,

I started to work on the setup of a NGINX demo in Occlum. Unfortunately, it still does not work completely. I addressed many startup errors and now the servers starts. However, when a client request is made, the clients connect to the server but it hangs.

It seems this is the issue:

[2023-12-15T13:06:18.256Z][TRACE][T2][#7824][···Write] Retval = 0x2c
[2023-12-15T13:06:18.256Z][TRACE][T2][#7825][RtSigsuspend] Syscall { num = RtSigsuspend }
[2023-12-15T13:06:18.256Z][ERROR][T2][#7825][RtSigsuspend] Error = ENOSYS (#38, Function not implemented): Unimplemented or unknown syscall [line = 1017, file = src/syscall/mod.rs]
[2023-12-15T13:06:18.256Z][TRACE][T2][#7825][RtSigsuspend] Retval = 0xffffffffffffffda
[2023-12-15T13:06:18.256Z][TRACE][T2][#7826][ClockGettime] Syscall { num = ClockGettime, clockid = 0, ts_u = 0x7f09543ff960 }
[2023-12-15T13:06:18.256Z][TRACE][T2][#7826][ClockGettime] Retval = 0x0
[2023-12-15T13:06:18.256Z][TRACE][T2][#7827][ClockGettime] Syscall { num = ClockGettime, clockid = 1, ts_u = 0x7f09543ff980 }
[2023-12-15T13:06:18.256Z][TRACE][T2][#7827][ClockGettime] Retval = 0x0
[2023-12-15T13:06:18.256Z][TRACE][T2][#7828][···Write] Syscall { num = Write, fd = 4, buf = 0x7f09543ff150, size = 50 }
[2023-12-15T13:06:18.256Z][DEBUG][T2][#7828][···Write] write: fd: 4
[2023-12-15T13:06:18.256Z][TRACE][T2][#7828][···Write] Retval = 0x32
[2023-12-15T13:06:18.257Z][TRACE][T2][#7829][···Write] Syscall { num = Write, fd = 4, buf = 0x7f09543ff150, size = 44 }
[2023-12-15T13:06:18.257Z][DEBUG][T2][#7829][···Write] write: fd: 4
[2023-12-15T13:06:18.257Z][TRACE][T2][#7829][···Write] Retval = 0x2c
[2023-12-15T13:06:18.257Z][TRACE][T2][#7830][RtSigsuspend] Syscall { num = RtSigsuspend }

I would like to have some help :)

Cheers.

@qzheng527
Copy link
Contributor

@dzobbe By my undestanding, the nginx uses fork which is not supported by Occlum.
That was also why we didn't add nginx demo.
Is "fork" not necessary in nginx now? Or you can modify the "fork“ with "vfork" or "posix_spawn" which Occlum supports?

@dzobbe
Copy link
Author

dzobbe commented Dec 18, 2023

@jessehui
Copy link
Contributor

@dzobbe Thanks for your contribution. It looks like the rt_sigsuspend is not supported and it looks like an important syscall for Nginx.

@dzobbe
Copy link
Author

dzobbe commented Dec 19, 2023

Oh, didn't notice that. So it seems there is no way to make it work? :(

@jessehui
Copy link
Contributor

Not really. For rt_sigsuspend, it doesn't seem to be an impossible task. We will have a discussion about that. May we know the scenario of your use case or the reason why you want to support Nginx?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants