qemu-s390x
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH for-9.2 00/10] s390: Convert virtio-ccw, cpu to three-phase r


From: Peter Maydell
Subject: Re: [PATCH for-9.2 00/10] s390: Convert virtio-ccw, cpu to three-phase reset, and followup cleanup
Date: Thu, 29 Aug 2024 14:09:44 +0100

On Thu, 29 Aug 2024 at 13:20, Nico Boehr <nrb@linux.ibm.com> wrote:
>
> Quoting Peter Maydell (2024-08-28 17:46:42)
> [...]
> > Well, the series is *supposed* to be just a refactoring, not a change of
> > behaviour, so I'm not sure. I don't suppose you have a reproduce case
> > that I can run? (I do have access to an s390 machine if that helps.)
>
> Well, it's on an internal testing framework which we do not release
> publicly. :-(
>
> Luckily, it's not that difficult to reproduce.  It seems like this only
> happens when a reboot is initiated over SSH connection via vsock. Here are
> some instructions on how to reproduce (with mkosi and Fedora):
>
> 1. Craft an mkosi.conf like this:
>    [Distribution]
>    Distribution=fedora
>    Architecture=s390x
>
>    [Output]
>    Format=cpio
>    CompressOutput=xz
>
>    [Content]
>    Packages=openssh-server
>    Packages=kernel-modules-core-6.8.5-301.fc40.s390x
>    Bootloader=none
>    MakeInitrd=no
>    Ssh=yes
>    Autologin=yes
>    RootPassword=hunter
>    Timezone=Etc/UTC
>    Locale=C.UTF-8
> 2. Generate SSH host key:
>    mkdir -p mkosi.extra/etc/ssh && ssh-keygen -t ed25519 -f 
> mkosi.extra/etc/ssh/ssh_host_ed25519_key
> 3. Build image:
>    mkosi
> 4. Boot with QEMU:
>    qemu-system-s390x -machine s390-ccw-virtio,accel=kvm -nodefaults 
> -nographic -chardev stdio,id=con0 -device sclpconsole,chardev=con0 -m 2048 
> -kernel image.vmlinuz -initrd image.cpio.xz -device 
> vhost-vsock-ccw,guest-cid=3
> 5. In a different terminal, run a reboot loop:
>    i=0; while true; do ssh -o ProxyCommand='socat VSOCK-CONNECT:3:22 -' 
> localhost -l root reboot; echo $i; let i=i+1; done

Thanks. I tried this repro, but mkosi falls over almost
immediately:

‣ Detaching namespace
‣ Setting up package cache…
‣ Setting up package cache /home/linux1/s390-failure/.mkosi-htsau2ot complete
‣ Setting up temporary workspace.
‣ Temporary workspace set up in /var/tmp/mkosi-tjc0nror
‣ Running second (final) stage…
‣  Creating image with partition table…
Disk /home/linux1/s390-failure/.mkosi-ddkx5xpb: 3 GiB, 3221266432
bytes, 6291536 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

>>> Script header accepted.
>>> Script header accepted.
>>> Script header accepted.
>>> Created a new GPT disklabel (GUID: 14CF3B05-D072-0A45-8EE4-3219112ACB2E).
/home/linux1/s390-failure/.mkosi-ddkx5xpb1: Created a new partition 1
of type 'unknown' and of size 3 GiB.
/home/linux1/s390-failure/.mkosi-ddkx5xpb2: Done.

New situation:
Disklabel type: gpt
Disk identifier: 14CF3B05-D072-0A45-8EE4-3219112ACB2E

Device                                     Start     End Sectors Size Type
/home/linux1/s390-failure/.mkosi-ddkx5xpb1    40 6291495 6291456   3G unknown

The partition table has been altered.
‣  Created image with partition table as
/home/linux1/s390-failure/.mkosi-ddkx5xpb
‣  Attaching /home/linux1/s390-failure/.mkosi-ddkx5xpb as loopback…
‣  Attached /dev/loop13
‣  Formatting root partition…
mke2fs 1.46.5 (30-Dec-2021)
The file /dev/loop13p1 does not exist and no size was specified.
‣  (Detaching /dev/loop13)
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/usr/lib/python3/dist-packages/mkosi/__main__.py", line 32, in <module>
    main()
  File "/usr/lib/python3/dist-packages/mkosi/__main__.py", line 26, in main
    run_verb(a)
  File "/usr/lib/python3/dist-packages/mkosi/__init__.py", line 7809,
in run_verb
    manifest = build_stuff(args)
  File "/usr/lib/python3/dist-packages/mkosi/__init__.py", line 7227,
in build_stuff
    image = build_image(args, root, manifest=manifest,
do_run_build_script=False, cleanup=True)
  File "/usr/lib/python3/dist-packages/mkosi/__init__.py", line 6941,
in build_image
    prepare_root(args, encrypted.root, cached)
  File "/usr/lib/python3/dist-packages/mkosi/__init__.py", line 1308,
in prepare_root
    mkfs_generic(args, label, path, dev)
  File "/usr/lib/python3/dist-packages/mkosi/__init__.py", line 1031,
in mkfs_generic
    run([*cmdline, dev])
  File "/usr/lib/python3/dist-packages/mkosi/backend.py", line 699, in run
    return subprocess.run(cmdline, check=check, stdout=stdout,
stderr=stderr, **kwargs)
  File "/usr/lib/python3.10/subprocess.py", line 526, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['mkfs.ext4', '-I', '256',
'-L', 'root', '-M', '/', '/dev/loop13p1']' returned non-zero exit
status 1.

(My s390 box is running Ubuntu, in case that makes a difference.)

Maybe you could put the kernel and initrd somewhere I can
get them from?

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]