-
Notifications
You must be signed in to change notification settings - Fork 204
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
GSC Failed to load entrypoint (missing shebang support in execve()
)
#320
Comments
Graphene doesn't support running scripts as entrypoints. You need to pass an ELF binary as the
Exactly as the error says, you already have this entry in your manifest and you added another, duplicated one. Anyways, this error message seems to be confusing users, I'll try to fix it (there's even an old TODO there). |
@dzygann If this answers your question, please close the issue. Otherwise feel free to ask further. |
Hi @dimakuv,
We have tried e.g.
but it doesn't work. The container stops quietly. What are we doing wrong? |
Hard to say... Did you try to run with debug logs of Graphene? Did you try this without GSC (bare metal, no Dockers)? |
Hi, we could run the shell script by adding the user as a parameter
The postgres docker runs for a short time (~1min) and terminates with the following log entries:
Do you have an idea what the illegal instruction is? |
Which commit of Graphene do you use? (internally, inside GSC) |
Hi @mkow, Now we are back at the starting point:
The workaround to use the |
Ok, seems this time someone used raw Dmitrii said you wanted to start contributing to Graphene, right? If that's true, then this may be a good candidate for your first contribution :) I.e.: adding support for shebang scripts in execve() syscall implementation + entrypoint loading code. You probably should start with reading our loading code and then looking up how Linux implements this, to correctly handle all corner cases. And then some LTP tests may be useful, there should be some with execve+shebangs. |
@mkow It seems like shebang support was built into Also, if a new implementation were to be based on Linux, wouldn't that cause license issues? LGPLv3 is not compatible with Linux's implementation of |
We removed the old shebang code because it was not covered by any tests, we were unaware of any real use cases (IIRC it was actually broken at that point, and nobody complained), and the support was only partial (only We would definitely welcome a patch adding the support again, as long as these problems are solved (at the very least, it would be good to have two tests in
Linux is GPLv2, so yes, we cannot accept any code copied from Linux. That said, it should be OK if you study the Linux sources in order to come up with your own implementation of the same behavior. I haven't seen it, but I would also recommend looking at *BSD sources: they're often simpler. |
execve()
)
Is this issue still exist now? |
@Michael-M-Zhang The implementation of this feature is WIP at the moment: #459 |
Hi,
as you can see in issue gramineproject/graphene#2632 we're trying to run Postgres in Graphene. OS is Ubuntu 20.04.
Contrary to issue gramineproject/graphene#2632 we didn't use our own dockerfile, but instead, we used one from Dockerhub
https://hub.docker.com/_/postgres
Then again we build and signed it using gsc.
When trying to run this image however we encountered the following problem:
If we follow the instruction to add the
sgx.nonpie_binary = 1
we get the following error:We have also used the -L option during the gsc build, but there are no more debug information available.
Do you have any ideas to fix this issue?
Thanks in advance.
The text was updated successfully, but these errors were encountered: