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

broken console support on ppc64le #1364

Closed
ghost opened this issue Mar 8, 2017 · 9 comments
Closed

broken console support on ppc64le #1364

ghost opened this issue Mar 8, 2017 · 9 comments

Comments

@ghost
Copy link

ghost commented Mar 8, 2017

eea28f4 broke console support on ppc64le.

# runc run spec
Confirmed terminal: true is there in config.json

# runc run root
container_linux.go:247: starting container process caused "process_linux.go:384: container init caused \"ioctl(tty, tcgets): inappropriate ioctl for device\""

Reverted the above commit makes thing works again.

@cyphar FYI

@harche
Copy link

harche commented Mar 13, 2017

Thanks for reporting the issue. Looking into it.

@harche
Copy link

harche commented Mar 13, 2017

Can you provide the output of,

stty -a

@cyphar
Copy link
Member

cyphar commented Mar 13, 2017

I think the issue is that the ppc64le ioctls are different to x86_64. Which is great fun, because Go doesn't provide any front-end to ioctls...

@ghost
Copy link
Author

ghost commented Mar 13, 2017

# stty -a
speed 38400 baud; rows 24; columns 80; line = 0; intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^U; min = 1; time = 0; -parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel -iutf8 opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke

clnperez added a commit to clnperez/runc that referenced this issue Mar 23, 2017
It's necessary to keep syscall for the following types:

- Signal
- Errno
- ProcSysAttr

Otherwise, since sys has replaced syscall, is being updated, and doesn't
require a new version of go to be released to get fixes, we should
switch.

Fixes opencontainers/issues/1364

Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
clnperez added a commit to clnperez/runc that referenced this issue Mar 23, 2017
It's necessary to keep syscall for the following types:

- Signal
- Errno
- ProcSysAttr

Otherwise, since sys has replaced syscall, is being updated, and doesn't
require a new version of go to be released to get fixes, we should
switch.

Fixes opencontainers/issues/1364

Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
clnperez added a commit to clnperez/runc that referenced this issue Mar 23, 2017
It's necessary to keep syscall for the following types:

- Signal
- Errno
- ProcSysAttr

Otherwise, since sys has replaced syscall, is being updated, and doesn't
require a new version of go to be released to get fixes, we should
switch.

Fixes opencontainers/issues/1364

Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
clnperez added a commit to clnperez/runc that referenced this issue Mar 23, 2017
It's necessary to keep syscall for the following types:

- Signal
- Errno
- ProcSysAttr

Otherwise, since sys has replaced syscall, is being updated, and doesn't
require a new version of go to be released to get fixes, we should
switch.

Fixes opencontainers/issues/1364

Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
@clnperez
Copy link
Contributor

It turns out the scripts used to auto-generate TCGETS and TCSETS in go have a bug. If definitely needs to be fixed -- but the better solution is to use x/sys/unix instead of syscall. We've confirmed that they are correct for ppc64le there. I've started a PR to switch runc over (as you can see in the above commit links) but something isn't quite right (tests failing with "operation not supported") so I'll try and get that figured out.

You can also see more discussion in golang/go#19560.

@crosbymichael
Copy link
Member

@clnperez That sounds like a good plan, switching over to sys/unix

However we should probably do this incrementally in a series of PRs and not one large PR switching the entire project over to that package. As sub-packages, functionality gets ported over and it has been verified to work, feel free to open PRs so that we can merge these changes as we go.

clnperez added a commit to clnperez/runc that referenced this issue Mar 27, 2017
It's necessary to keep syscall for the following types:

- Signal
- Errno
- ProcSysAttr

Otherwise, since sys has replaced syscall, is being updated, and doesn't
require a new version of go to be released to get fixes, we should
switch.

Fixes opencontainers/issues/1364

Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
@clnperez
Copy link
Contributor

@crosbymichael would you recommend moving just a few files at a time (e.g. the ones using the values we know are wrong)? Or maybe all of libcontainer?

I'm a little worried about porting over bits of the project since sys and syscall have different values for things like TCGETS.

I did change just the console bits in another patch, and ran the tests on both x86 and power. The tests all passed in my x86 env but not the power env. I re-ran the tests against master in my power vm, and at least the same tests failed for both master and my patch. So, I guess, I'll submit the initial fix that fixes the console issue only for now? Maybe we can open a broader issue for fixing other tests on power -- and another issue for porting the rest of the project to x/sys.

WDYT?

FYI, the new patch (potential PR): clnperez@ddf4486

@crosbymichael
Copy link
Member

@clnperez Ideally the final result is that all of libcontainer and runc are ported over.

Be doing this in one PR will be hard to test and review. We can do it package by package to make sure we don't hit any regressions and we have small, review-able prs to merge.

@clnperez
Copy link
Contributor

@crosbymichael I just had it pointed out to me that libcontainer isn't one big 'libcontainer' package. Sorry I didn't get what you were trying to say earlier. 😸

clnperez added a commit to clnperez/runc that referenced this issue Apr 6, 2017
Fixes opencontainers/issues/1364

Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
adrianreber pushed a commit to adrianreber/runc that referenced this issue Jul 27, 2017
Fixes opencontainers/issues/1364

Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
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

4 participants