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

execve is throwing "No such file or directory" for a statically-linked executable #63

Closed
minhducsun2002 opened this issue Nov 9, 2018 · 13 comments

Comments

@minhducsun2002
Copy link

Running statically compiled C programs failed.

# isolate --run -- "./a" --time=1
execve("./a"): No such file or directory

The source code of the program is a simple while(1){}; wrapped in int main(), compiled with gcc -static -no-pie.

The existence of the a executable in the directory isolate was invoked can be confirmed.

@minhducsun2002 minhducsun2002 changed the title execve is throwing errors execve is throwing "No such file or directory" for a statically-linked executable Nov 9, 2018
@gollux
Copy link
Member

gollux commented Nov 9, 2018 via email

@minhducsun2002
Copy link
Author

I ran the command above from the sandbox directory.

@gollux
Copy link
Member

gollux commented Nov 10, 2018 via email

@minhducsun2002
Copy link
Author

Yes.

@minhducsun2002
Copy link
Author

minhducsun2002 commented Nov 14, 2018

Actually, I ran cd $(isolate --init) though.
(Afterward I can still confirm it's the sandbox directory isolate printed.)

@gollux
Copy link
Member

gollux commented Jan 2, 2019

If you still experience the problem, please send me the executable file with which it fails.

@minhducsun2002
Copy link
Author

Here I am bundling the source code and the executable itself.
a.zip

/var/local/lib/isolate/0 # isolate --run -- ./a --time=1
execve("./a"): No such file or directory
/var/local/lib/isolate/0 # ls 
a

@gollux
Copy link
Member

gollux commented Jan 2, 2019 via email

@minhducsun2002
Copy link
Author

Okay, problem solved. Thank you very much for your support.

But, however. (You may have seen that the source code contains only an infinite loop.)

# isolate --run -- a --time=1 --wall-time=1

It's there for over 2 seconds.

@gollux
Copy link
Member

gollux commented Jan 2, 2019 via email

@minhducsun2002
Copy link
Author

Okay, the program stopped now.

Thank you very much!

I wanted to ask for a long time but it seems like digging through the source code was kinda too tedious. :)

@gollux
Copy link
Member

gollux commented Jan 2, 2019 via email

@minhducsun2002
Copy link
Author

Sorry, my fault. Have a nice day ;)

isolate options --run -- program arguments

(http://www.ucw.cz/moe/isolate.1.html)

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

No branches or pull requests

2 participants