8000 bash segfault with kvm stage1 · Issue #3519 · rkt/rkt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Feb 24, 2020. It is now read-only.

bash segfault with kvm stage1 #3519

Open
flx42 opened this issue Jan 6, 2017 · 6 comments
Open

bash segfault with kvm stage1 #3519

flx42 opened this issue Jan 6, 2017 · 6 comments

Comments

@flx42
Copy link
flx42 commented Jan 6, 2017

Environment

rkt Version: 1.21.0
appc Version: 0.8.9
Go Version: go1.7.3
Go OS/Arch: linux/amd64
Features: -TPM +SDJOURNAL
--
Linux 4.4.0-57-generic x86_64
--
NAME="Ubuntu"
VERSION="16.04.1 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.1 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
--
systemd 229
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN

What did you do?

rkt run --debug --dns=8.8.8.8 --stage1-name=coreos.com/rkt/stage1-kvm:1.21.0 --insecure-options=image docker://centos:7 --exec sh -- -c "curl -sSL https://get.docker.com/ | sh"

This was only for testing purpose, I don't actually want to run Docker inside KVM :)

What did you expect to see?
Complete installation of Docker.

What did you see instead?

[  OK  ] Started rkt supervisor-ready signaling.
[    1.427417] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x326bd592a83, max_idle_ns: 440795311901 ns
[    1.880418] sh[224]: segfault at 20 ip 00000000004553c0 sp 00007fffdae25650 error 6 in bash[400000+dd000]
[    1.880959] Core dump to |/bin/false pipe failed
[    1.765953] centos[196]: sh: line 311:   224 Segmentation fault      $sh_c "cat >/etc/yum.repos.d/docker-${repo}.repo"  <<-EOF
[    1.766316] centos[196]: [docker-${repo}-repo]
[    1.766553] centos[196]: name=Docker ${repo} Repository
[    1.766743] centos[196]: baseurl=${yum_url}/repo/${repo}/${lsb_dist}/${dist_version}
[    1.766956] centos[196]: enabled=1
[    1.767160] centos[196]: gpgcheck=1
[    1.767361] centos[196]: gpgkey=${yum_url}/gpg
[    1.767550] centos[196]: EOF
[    1.820993] reaper.sh[226]: Showing one /org/freedesktop/systemd1/unit/centos_2eservice
[    1.822151] reaper.sh[226]: Sent message type=method_call sender=n/a destination=org.freedesktop.systemd1 object=/org/freedesktop/systemd1/unit/centos_2eservice interface=org.freedesktop.DBus.Properties member=GetAll cookie=1 reply_cookie=0 error=n/a
[    1.826422] reaper.sh[226]: Got message type=method_return sender=n/a destination=n/a object=n/a interface=n/a member=n/a cookie=1 reply_cookie=1 error=n/a
[    1.984523] systemd-shutdow: 196 output lines suppressed due to ratelimiting
[    2.021494] systemd-shutdown[1]: Sending SIGTERM to remaining processes...
[    2.029369] systemd-journal: 22 output lines suppressed due to ratelimiting
[    2.029919] systemd-shutdown[1]: Sending SIGKILL to remaining processes...
@flx42
Copy link
Author
flx42 commented Jan 6, 2017

Could be the same or related to #1917.
I built my own stage1-kvm-qemu.aci and I had the same issue, then I re-compiled with cache=loose as suggested by @jjlakis here and the segfault is now gone.

@jjlakis
Copy link
jjlakis commented Jan 18, 2017

@flx42 I think it's fixed by #3485 now

@flx42
Copy link
Author
flx42 commented Jan 20, 2017

@jjlakis This fix should have been picked up in 1.23.0, right? Unless I'm missing something, none of these bugs seems fixed for me:

$ sudo rkt run --debug --dns=8.8.8.8 --net=bridge-nat --stage1-name=coreos.com/rkt/stage1-kvm:1.23.0 --insecure-options=image docker://ubuntu:16.04 --exec sh -- -c "apt-get update"
[...]
[  OK  ] Started rkt supervisor-ready signaling.
[    1.186833] ubuntu[209]: Get:1 http://archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
  Warning: unable to translate guest address 0x410000413c18 to host
  Warning: unable to translate guest address 0x410000413c18 to host
  Warning: unable to translate guest address 0x410000413c18 to host
  Warning: unable to translate guest address 0x410000413c18 to host
  Warning: unable to translate guest address 0x410000413c18 to host
  Warning: unable to translate guest address 0x410000413c18 to host
  Warning: unable to translate guest address 0x410000413c18 to host
  Warning: unable to translate guest address 0x410000413c18 to host
[    2.111847] ubuntu[209]: Get:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
[    2.424205] ubuntu[209]: Get:3 http://archive.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
[    3.183482] ubuntu[209]: Reading package lists...
[    3.195034] ubuntu[209]: E: Unable to determine file size for fd 7 - fstat (2: No such file or directory)
[    3.195433] ubuntu[209]: E: Unable to determine file size for fd 7 - fstat (2: No such file or directory)
[    3.195779] ubuntu[209]: E: Unable to determine file size for fd 7 - fstat (2: No such file or directory)
$ sudo rkt run --debug --dns=8.8.8.8 --net=bridge-nat --stage1-name=coreos.com/rkt/stage1-kvm:1.23.0 --insecure-options=image docker://centos:7 --exec sh -- -c "curl -sSL https://get.docker.com/ | sh"
[...]
[    1.465529] centos[212]: sh: line 350:   239 Segmentation fault      $sh_c "cat >/etc/yum.repos.d/docker-${repo}.repo"  <<-EOF
[    1.465822] centos[212]: [docker-${repo}-repo]
[    1.466019] centos[212]: name=Docker ${repo} Repository
[    1.466196] centos[212]: baseurl=${yum_url}/repo/${repo}/${lsb_dist}/${dist_version}
[    1.466369] centos[212]: enabled=1
[    1.466540] centos[212]: gpgcheck=1
[    1.466711] centos[212]: gpgkey=${yum_url}/gpg
[    1.466882] centos[212]: EOF

@s-urbaniak
Copy link
Contributor

/cc @grahamwhaley

@grahamwhaley
Copy link

Hi @flx42 @jjlakis - I suspect you may also need #3475 . If you are able to try/confirm that, then that would be great. Let me know if you cannot. thx

@flx42
Copy link
Author
flx42 commented Jan 23, 2017

@grahamwhaley I applied your patches from #3475 on top of the 1.23.0 tag, and it seems to work fine with both lkvm and qemu, thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants
0