[Bug 1630909] Re: failing console access on s390x

ChristianEhrhardt 1630909 at bugs.launchpad.net
Thu Oct 6 14:29:06 UTC 2016


With all mentioned before done I hit:
KVM_S390_MEM_OP failed: Cannot allocate memory
qemu-system-s390x: terminating on signal 15 from pid 56570
autopkgtest-virt-qemu: DBG: cleanup...
<VirtSubproc>: failure: timed out on client shared directory setup

A discussion turned out that pre qemu 2.7 s390 only had virtio-9p-ccw
and no mapping to virtio-9p-pci. So for a while we might need to use the
long opts for that.

In the following case the s390 version squashing the former and the new
change:

@@ -532,10 +534,13 @@
             '-net', 'nic,model=virtio',
             '-net', 'user' + nic_opt,
             '-monitor', 'unix:%s/monitor,server,nowait' % workdir,
-            '-serial', 'unix:%s/ttyS0,server,nowait' % workdir,
-            '-serial', 'unix:%s/ttyS1,server,nowait' % workdir,
-            '-virtfs',
-            'local,id=autopkgtest,path=%s,security_model=none,mount_tag=autopkgtest' % shareddir,
+            '-device', 'virtio-serial',
+            '-chardev', 'socket,path=%s/ttyS0,server,nowait,id=ttyS0' % workdir,
+            '-device', 'virtconsole,chardev=ttyS0,name=org.fedoraproject.console.ttyS0',
+            '-chardev', 'socket,path=%s/ttyS1,server,nowait,id=ttyS1' % workdir,
+            '-device', 'virtconsole,chardev=ttyS1,name=org.fedoraproject.console.ttyS1',
+            '-fsdev', 'local,id=autopkgtest,path=%s,security_model=none' % shareddir,
+            '-device', 'virtio-9p-ccw,fsdev=autopkgtest,mount_tag=autopkgtest',
             '-drive', 'file=%s,cache=unsafe,if=virtio,index=0' % overlay]
     for i, image in enumerate(args.image[1:]):
         argv.append('-drive')


That got me further again, but now I'm stopped at:
autopkgtest-virt-qemu: DBG: Copying host timezone America/New_York to VM
autopkgtest-virt-qemu: DBG: expect: "#"
autopkgtest-virt-qemu: DBG: expect: found ""b'#'""
autopkgtest-virt-qemu: DBG: expect: "/python"
autopkgtest-virt-qemu: DBG: expect: found ""b'/python'""
autopkgtest-virt-qemu: DBG: expect: "# "
autopkgtest-virt-qemu: DBG: expect: found ""b'# '""
autopkgtest-virt-qemu: DBG: expect: "# "
autopkgtest-virt-qemu: DBG: expect: found ""b'# '""
autopkgtest-virt-qemu: DBG: execute-timeout: /tmp/autopkgtest-virt-qemu.i1ulemwi/runcmd true
autopkgtest-virt-qemu: DBG: can connect to autopkgtest sh in VM
autopkgtest-virt-qemu: DBG: determine_normal_user: got user "ubuntu"
autopkgtest-virt-qemu: DBG: auxverb = ['/tmp/autopkgtest-virt-qemu.i1ulemwi/runcmd'], downtmp = None
autopkgtest-virt-qemu: DBG: execute-timeout: /tmp/autopkgtest-virt-qemu.i1ulemwi/runcmd mktemp --directory --tmpdir autopkgtest.XXXXXX
autopkgtest-virt-qemu: DBG: execute-timeout: /tmp/autopkgtest-virt-qemu.i1ulemwi/runcmd chmod 1777 /tmp/autopkgtest.MKTMnx
autopkgtest-virt-qemu: DBG: cleanup...
qemu-system-s390x: terminating on signal 15 from pid 56709
adt-run: DBG: TestbedFailure testbed gave exit status -13 after quit

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to autopkgtest in Ubuntu.
https://bugs.launchpad.net/bugs/1630909

Title:
  failing console access on s390x

Status in autopkgtest package in Ubuntu:
  New

Bug description:
  Hi,
  as discussed on IRC a bit I wanted to create an s390x ADT environment but failed to do so.
  It seems the extra consoles are not created correctly.

  This dumps that state so far to be debugged and fixed later on - or
  for whoever runs into the same to find it via searching.

  Creating a new image works as long as one specifies the alternative
  ports mirror

  sudo ~/autopkgtest-4.1/tools/autopkgtest-buildvm-ubuntu-cloud -v
  --arch=s390x --mirror=http://ports.ubuntu.com/ubuntu-ports -r yakkety
  -s 10G

  But then running a test fails like this:
  (yes I know old syntax)
  sudo ~/autopkgtest-4.1/runner/adt-run -ddd --shell-fail --apt-upgrade --no-built-binaries --source neutron_9.0.0~rc3-0ubuntu1.dsc --- adt-virt-qemu --cpus 4 --ram-size=2048 ~/autopkgtest-yakkety-s390x.img
  adt-run: WARNING: "adt-run" is deprecated, please use "autopkgtest" (see manpage)
  adt-run: DBG: Parsed options: Namespace(apt_pocket=[], auto_control=True, build_parallel=None, copy=[], env=[], gainroot=None, logfile=None, output_dir=None, set_lang=None, setup_commands=['(apt-get update || (sleep 15; apt-get update) || (sleep 60; apt-get update) || false) && $(which eatmydata || true) apt-get dist-upgrade -y -o Dpkg::Options::="--force-confnew"'], shell=False, shell_fail=True, summary=None, timeout_build=None, timeout_copy=None, timeout_factor=1.0, timeout_install=None, timeout_short=None, timeout_test=None, user=None, verbosity=2)                                                                                                                           
  adt-run: DBG: Remaining arguments: ['--no-built-binaries', '--source', 'neutron_9.0.0~rc3-0ubuntu1.dsc']                                                                  
  adt-run: DBG: Interpreted actions: ['--no-built-binaries', '--source', 'neutron_9.0.0~rc3-0ubuntu1.dsc']                                                                  
  adt-run: DBG: Virt runner arguments: ['adt-virt-qemu', '--cpus', '4', '--ram-size=2048', '/home/ubuntu/autopkgtest-yakkety-s390x.img']                                    
  adt-run: DBG: testbed init                                                                                                                                                
  adt-run [04:29:22]: version @version@
  adt-run [04:29:22]: host s1lp5; command line: /home/ubuntu/autopkgtest-4.1/runner/adt-run -ddd --shell-fail --apt-upgrade --no-built-binaries --source 'neutron_9.0.0~rc3-0ubuntu1.dsc' --- adt-virt-qemu --cpus 4 --ram-size=2048 /home/ubuntu/autopkgtest-yakkety-s390x.img                                                                       
  adt-run: DBG: got reply from testbed: ok
  adt-run: DBG: testbed open, scratch=None                                                                                                                                  
  adt-run: DBG: sending command to testbed: open                                                                                                                            
  adt-run: DBG: got reply from testbed: Using SCSI scheme.                                                                                                                  
  adt-run: DBG: TestbedFailure sent `open', got `Using SCSI scheme.', expected `ok...'                                                                                      
  adt-run: DBG: testbed stop                                                                                                                                                
  adt-run: DBG: testbed close, scratch=None                                                                                                                                 
  adt-run: DBG: sending command to testbed: quit                                                                                                                            
  qemu-system-s390x: terminating on signal 15 from pid 53355
  <VirtSubproc>: failure: timed out waiting for "login prompt on ttyS0"


  After discussing on IRC I understood that it checks for a loginn on ttyS0 or as fallback a root shell on ttyS1.
  But it seems none of those get spawned.

  I was able to boot the image just fine with:
  sudo qemu-system-s390x -m 2048 -smp 4 -nographic -net nic,model=virtio -net user,hostfwd=tcp::10022-:22 -drive file=/home/ubuntu/autopkgtest-yakkety-s390x.img,cache=unsafe,if=virtio,index=0 -enable-kvm

  But one has to note that in this case the default console is
  automatically connected to stdio (due to -nographics) and the mode it
  a sclp console.

  I can add a virtio-serial console and get a valid non sclp console by appending:
  -chardev socket,path=/tmp/port0,server,nowait,id=port0-char -device virtio-serial -device virtserialport,id=port1,name=org.fedoraproject.port.0,chardev=port0-char

  I can add more serial consoles on unix sockets as autopkgttest does, but nothing appears on these sockets (only monitor gets some content).
  -serial unix:/tmp/testadt/ttyS0,server,nowait  -serial unix:/tmp/testadt/ttyS1,server,nowait -monitor unix:/tmp/testadt/monitor,server,nowait

  In the guest no device appears for any of those, so no tty can spawn on them:
  ll /dev/tty*
  crw-rw-rw- 1 root   tty 5,  0 Oct  6 00:18 /dev/tty
  crw------- 1 ubuntu tty 4, 65 Oct  6 05:16 /dev/ttysclp0

  
  I feel I should know how to configure it further to get valid consoles, but I'd read some docs first so documenting the current state for now.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/autopkgtest/+bug/1630909/+subscriptions



More information about the foundations-bugs mailing list