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

runc run from 1.0.0-rc1 release is not working for a previously working config.json #955

Closed
sumitsanghrajka opened this issue Jul 19, 2016 · 14 comments

Comments

@sumitsanghrajka
Copy link
Contributor

I have a simple config (attached) which works fine with 0.1.1 release of runc using runc start command.
Same config does not work as expected with 1.0.0-rc1 release using either runc run command or runc create && runc start commands.

With 0.1.1 release the pid #1 inside the container is the sleep infinity program as specified in the config file.

With 1.0.0-rc1 the pid #1 becomes the runc init program and it seems like sleep infinity is never launched.

Am I am doing something wrong here with 1.0.0-rc1 version?

config.txt

@cyphar
Copy link
Member

cyphar commented Jul 20, 2016

The config file you've specified appears to work for me on master.

% curl -o config.json https://github.com/opencontainers/runc/files/372241/config.txt
% sudo ./runc run test
[sleeps]
% # in another shell
% ps aux | grep sleep
root     16675  0.0  0.0   4216   656 ?        Ss   14:42   0:00 sleep infinity

It also appears to work for me after checking out v1.0.0-rc1.

@sumitsanghrajka
Copy link
Contributor Author

sumitsanghrajka commented Jul 20, 2016

@cyphar it works for me on head. But it just doesn't work on v1.0.0-rc1

This is what I typically do:
runc run -d test
runc ps test
ps command shows me runc init as pid #1.
I will try a fresh checkout of v1.0.0-rc1 again.

@cyphar
Copy link
Member

cyphar commented Jul 20, 2016

runc ps also acts correctly for me:

% sudo ./runc ps test
UID        PID  PPID  C STIME TTY          TIME CMD
root     17541 17531  0 14:44 ?        00:00:00 sleep infinity
% sudo ./runc -v
runc version 1.0.0-rc1
commit: 04f275d4601ca7e5ff9460cec7f65e8dd15443ec
spec: 1.0.0-rc1

@goyalankit
Copy link

Config given by @sumitsanghrajka doesn't work for me either.

% sudo ./runc -v
runc version 1.0.0-rc1
commit: 04f275d4601ca7e5ff9460cec7f65e8dd15443ec
spec: 1.0.0-rc1
% sudo ./runc run test
[hangs]

% sudo ./runc ps test
UID        PID  PPID  C STIME TTY          TIME CMD
root      5158  5154  0 02:17 ?        00:00:00 /home/angoyal/1.0.0-rc1/runc init

@goyalankit
Copy link

Oh and another weird part is:

% sudo ./runc list
ID          PID         STATUS      BUNDLE                     CREATED
test        5158        created     /home/angoyal/containers   2016-07-20T06:17:55.114449949Z

The container is in created state and not in running state.

@cyphar
Copy link
Member

cyphar commented Jul 20, 2016

Can you do a sudo strace -f runc run test and post the log here?

@sumitsanghrajka
Copy link
Contributor Author

sumitsanghrajka commented Jul 20, 2016

Attached end snippet of 2 logs with strace -f.

runc-1.0.0-rc1-log.txt is the one from 1.0.0-rc1 version which never calls sleep infinity.

runc-bd1d3ac-log.txt is the one from current head which is calling sleep infinity at some point of time after it finds the absolute path for sleep command.

@cyphar can you post a similar log for runc-1.0.0-rc1 which seems to be working.

@wking
Copy link
Contributor

wking commented Jul 20, 2016

On Tue, Jul 19, 2016 at 10:31:05PM -0700, sumitsanghrajka wrote:

@cyphar it works for me on head. But it just doesn't work on v1.0.0-rc1

‘git bisect …’?

@goyalankit
Copy link

So i think it's the problem with golang version. I was using golang version1.5.3 and hitting the above case. After upgrading the golang to 1.6.3, runc-1.0.0-rc1 seems to be working fine.

We are upgrading the golang version as a workaround, so please feel free to close the ticket.

@cyphar
Copy link
Member

cyphar commented Jul 20, 2016

Oh right, yeah a couple of the recent changes may require you using Go 1.6.

@mlaventure
Copy link
Contributor

that version of runc was depending on SIGCONT which wasn't forwarded by the runtime before go 1.6.

The requirement is gone on master as it now uses a pipe instead.

@cyphar
Copy link
Member

cyphar commented Jul 20, 2016

@mlaventure is correct. You should be able to use master with earlier versions of the Go runtime. Closing since it's been "fixed" on master.

@cyphar cyphar closed this as completed Jul 20, 2016
@goyalankit
Copy link

thanks guys! that explains why master was working but not 1.0.00-rc1.

@sumitsanghrajka
Copy link
Contributor Author

Thanks guys.

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

5 participants