RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1474280 - Run container on non-target platform cause golang panic
Summary: Run container on non-target platform cause golang panic
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker
Version: 7.4
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: ---
Assignee: Daniel Walsh
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-24 09:56 UTC by Luwen Su
Modified: 2019-03-06 01:15 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-07-24 12:13:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Luwen Su 2017-07-24 09:56:33 UTC
Description of problem:
On x86 platform vm, try to run container that targeted for other platform,
cause a golang panic

Version-Release number of selected component (if applicable):
docker-1.12.6-48.git0fdc778.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.
# docker run -it --rm docker.io/ppc64le/debian dpkg --list

9c3d4f23b64e: Pull complete 
Digest: sha256:7b5f52d71fb35987a447ce509dbfdf92cfbfa7477a67798a295ffd860024bc7b
Status: Downloaded newer image for docker.io/ppc64le/debian:latest


panic: standard_init_linux.go:178: exec user process caused "exec format error" [recovered]
	panic: standard_init_linux.go:178: exec user process caused "exec format error"

goroutine 1 [running, locked to thread]:
github.com/urfave/cli.HandleAction.func1(0xc4200977a0)
	/builddir/build/BUILD/docker-0fdc77886ccc101a28b11ce63e87a935c936d2ef/runc-79c3939053c870fbb4de5484d98640d5ba028ef4/Godeps/_workspace/src/github.com/urfave/cli/app.go:478 +0x23f
panic(0x6f0c00, 0xc420112e00)
	/usr/lib/golang/src/runtime/panic.go:489 +0x2cf
github.com/opencontainers/runc/libcontainer.(*LinuxFactory).StartInitialization.func1(0xc420097208, 0xc42000e0d0, 0xc4200972a8)
	/builddir/build/BUILD/docker-0fdc77886ccc101a28b11ce63e87a935c936d2ef/runc-79c3939053c870fbb4de5484d98640d5ba028ef4/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/factory_linux.go:259 +0xc1
github.com/opencontainers/runc/libcontainer.(*LinuxFactory).StartInitialization(0xc4200489b0, 0xaa88e0, 0xc420112e00)
	/builddir/build/BUILD/docker-0fdc77886ccc101a28b11ce63e87a935c936d2ef/runc-79c3939053c870fbb4de5484d98640d5ba028ef4/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/factory_linux.go:277 +0x353
main.glob..func8(0xc420074780, 0x0, 0x0)
	/builddir/build/BUILD/docker-0fdc77886ccc101a28b11ce63e87a935c936d2ef/runc-79c3939053c870fbb4de5484d98640d5ba028ef4/main_unix.go:26 +0x66
reflect.Value.call(0x6d9b20, 0x7502a8, 0x13, 0x73b882, 0x4, 0xc420097760, 0x1, 0x1, 0xc4200976f0, 0x731360, ...)
	/usr/lib/golang/src/reflect/value.go:434 +0x91f
reflect.Value.Call(0x6d9b20, 0x7502a8, 0x13, 0xc420097760, 0x1, 0x1, 0x665a76, 0x73ba0e, 0x4)
	/usr/lib/golang/src/reflect/value.go:302 +0xa4
github.com/urfave/cli.HandleAction(0x6d9b20, 0x7502a8, 0xc420074780, 0x0, 0x0)
	/builddir/build/BUILD/docker-0fdc77886ccc101a28b11ce63e87a935c936d2ef/runc-79c3939053c870fbb4de5484d98640d5ba028ef4/Godeps/_workspace/src/github.com/urfave/cli/app.go:487 +0x18f
github.com/urfave/cli.Command.Run(0x73ba2e, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x74d2ea, 0x51, 0x0, ...)
	/builddir/build/BUILD/docker-0fdc77886ccc101a28b11ce63e87a935c936d2ef/runc-79c3939053c870fbb4de5484d98640d5ba028ef4/Godeps/_workspace/src/github.com/urfave/cli/command.go:191 +0xac8
github.com/urfave/cli.(*App).Run(0xc42009a000, 0xc42000c140, 0x2, 0x2, 0x0, 0x0)
	/builddir/build/BUILD/docker-0fdc77886ccc101a28b11ce63e87a935c936d2ef/runc-79c3939053c870fbb4de5484d98640d5ba028ef4/Godeps/_workspace/src/github.com/urfave/cli/app.go:240 +0x5d6
main.main()
	/builddir/build/BUILD/docker-0fdc77886ccc101a28b11ce63e87a935c936d2ef/runc-79c3939053c870fbb4de5484d98640d5ba028ef4/main.go:137 +0xbd2

2.The return error is fine if use docker-latest
# docker-latest run -it --rm docker.io/ppc64le/debian dpkg --list
 
latest: Pulling from docker.io/ppc64le/debian
9c3d4f23b64e: Pull complete 
Digest: sha256:7b5f52d71fb35987a447ce509dbfdf92cfbfa7477a67798a295ffd860024bc7b
Status: Downloaded newer image for docker.io/ppc64le/debian:latest
standard_init_linux.go:178: exec user process caused "exec format error"

#rpm -q docker-latest
docker-latest-1.13.1-21.1.gitcd75c68.el7.x86_64


Actual results:
Golang panic

Expected results:
Could handle this kind of error properly.

Additional info:

Comment 2 Daniel Walsh 2017-07-24 12:13:58 UTC
Since this is fixed in the next release, I am going to close.  I don't see this as requiring a back port.


Note You need to log in before you can comment on or make changes to this bug.