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

test/TEST-[0-9][0-9]* fail on Arch #4607

Closed
evverx opened this issue Nov 7, 2016 · 7 comments
Closed

test/TEST-[0-9][0-9]* fail on Arch #4607

evverx opened this issue Nov 7, 2016 · 7 comments
Labels
bug 🐛 Programming errors, that need preferential fixing tests

Comments

@evverx
Copy link
Member

evverx commented Nov 7, 2016

$ cat /proc/version
Linux version 4.8.6-1-ARCH (builduser@tobias) (gcc version 6.2.1 20160830 (GCC) ) #1 SMP PREEMPT Mon Oct 31 18:51:30 CET 2016

$ cd test/TEST-01-BASIC

$ sudo make run
TEST RUN: Basic systemd setup
+ /sbin/qemu-system-x86_64 -smp 1 -net none -m 512M -nographic -kernel /boot/vmlinuz-4.8.6-1-ARCH -drive format=raw,cache=unsafe,file=/var/tmp/systemd-test.mx4wDq/rootdisk.img -append 'root=/dev/sda1 raid=noautodetect loglevel=2 init=/usr/lib/systemd/systemd ro console=ttyS0 selinux=0 systemd.unified_cgroup_hierarchy=no  '
qemu: could not load kernel '/boot/vmlinuz-4.8.6-1-ARCH': No such file or directory
E: QEMU failed with exit code 1
ls: cannot access '/var/tmp/systemd-test.mx4wDq/journal/*/*.journal': No such file or directory
TEST RUN: Basic systemd setup [FAILED]
make: *** [Makefile:10: run] Error 1

There is a workaround:

sudo make run KERNEL_BIN=/boot/vmlinuz-linux INITRD=/boot/initramfs-linux.img

Another issue:

$ cd test/TEST-13-NSPAWN-SMOKE
$ sudo make run KERNEL_BIN=/boot/vmlinuz-linux INITRD=/boot/initramfs-linux.img
TEST RUN: systemd-nspawn smoke test
+ /sbin/qemu-system-x86_64 -smp 1 -net none -m 512M -nographic -kernel /boot/vmlinuz-linux -drive format=raw,cache=unsafe,file=/var/tmp/systemd-test.zuXtKv/rootdisk.img -append 'root=/dev/sda1 raid=noautodetect loglevel=2 init=/usr/lib/systemd/systemd ro console=ttyS0 selinux=0 systemd.unified_cgroup_hierarchy=no  '
[    0.989209] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    0.990297] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.8.6-1-ARCH #1
[    0.990297] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-20160701_074356-anatol 04/01/2014
[    0.990297]  0000000000000086 00000000fc1580d6 ffff88001e9d3de8 ffffffff812fe4f0
[    0.990297]  ffff88001dd40000 ffffffff81706d50 ffff88001e9d3e70 ffffffff81175e35
[    0.990297]  ffffffff00000010 ffff88001e9d3e80 ffff88001e9d3e18 00000000fc1580d6
[    0.990297] Call Trace:
[    0.990297]  [<ffffffff812fe4f0>] dump_stack+0x63/0x83
[    0.990297]  [<ffffffff81175e35>] panic+0xe4/0x226
[    0.990297]  [<ffffffff819235b2>] mount_block_root+0x28a/0x2c5
[    0.990297]  [<ffffffff819228db>] ? set_debug_rodata+0x12/0x12
[    0.990297]  [<ffffffff81923652>] mount_root+0x65/0x68
[    0.990297]  [<ffffffff81923784>] prepare_namespace+0x12f/0x167
[    0.990297]  [<ffffffff819231e0>] kernel_init_freeable+0x1e2/0x1f9
[    0.990297]  [<ffffffff815eae0e>] kernel_init+0xe/0x100
[    0.990297]  [<ffffffff815f7eff>] ret_from_fork+0x1f/0x40
[    0.990297]  [<ffffffff815eae00>] ? rest_init+0x90/0x90
[    0.990297] Kernel Offset: disabled
[    0.990297] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

There is a workaround:

$ sed -i 's/SKIP_INITRD=yes/#&/' test.sh
$ sudo make run KERNEL_BIN=/boot/vmlinuz-linux INITRD=/boot/initramfs-linux.img
@evverx evverx added bug 🐛 Programming errors, that need preferential fixing tests labels Nov 7, 2016
@s-urbaniak
Copy link
Contributor

Thanks a lot for helping out with this :-)

So, this the test.log of

$ cd systemd/test/TEST-13-NSPAWN-SMOKE
$ sudo make KERNEL_APPEND=debug KERNEL_BIN=/boot/vmlinuz-linux-userns INITRD=/boot/initramfs-linux-userns.img

is here: http://pastebin.com/5eGF9u4i

And the output of

$ lsinitcpio /boot/initramfs-linux-userns.img | grep modules

is here: http://pastebin.com/KER8qZ5Y

@evverx
Copy link
Member Author

evverx commented Nov 10, 2016

@s-urbaniak , thanks!

I don't see any ata_generic, pata_acpi, ata_piix or so

Does your mkinitcpio.conf contain HOOKS=.*block?

$ mkinitcpio --hookhelp block
==> Help for hook 'block':
This hook loads the necessary modules for most block devices using pata, sata,
scsi, firewire, usb, or mmc. Detection will take place at runtime. To minimize
the modules in the image, add the autodetect hook too.

I logged into QEMU:

bash-4.3# cat /proc/modules
ext4 524288 1 - Live 0xffffffffa00fe000
crc16 16384 1 ext4, Live 0xffffffffa00a0000
jbd2 90112 1 ext4, Live 0xffffffffa00dc000
fscrypto 24576 1 ext4, Live 0xffffffffa00d5000
mbcache 16384 2 ext4, Live 0xffffffffa00ab000
sr_mod 24576 0 - Live 0xffffffffa00ce000
cdrom 53248 1 sr_mod, Live 0xffffffffa00c0000
sd_mod 36864 2 - Live 0xffffffffa00b6000
serio_raw 16384 0 - Live 0xffffffffa00a6000
atkbd 24576 0 - Live 0xffffffffa005f000
libps2 16384 1 atkbd, Live 0xffffffffa009b000
ata_generic 16384 0 - Live 0xffffffffa0053000
pata_acpi 16384 0 - Live 0xffffffffa0058000
ata_piix 36864 1 - Live 0xffffffffa0018000
libata 208896 3 ata_generic,pata_acpi,ata_piix, Live 0xffffffffa0067000
scsi_mod 159744 3 sr_mod,sd_mod,libata, Live 0xffffffffa002b000
i8042 28672 0 - Live 0xffffffffa0023000
serio 20480 5 serio_raw,atkbd,i8042, Live 0xffffffffa0000000
floppy 69632 0 - Live 0xffffffffa0006000

@s-urbaniak
Copy link
Contributor

s-urbaniak commented Nov 10, 2016

hmm ... I guess it does:

$ cat /etc/mkinitcpio.conf
...
MODULES="vfat ext4 dm_mod dm_crypt aes_x86_64 i915"
...
HOOKS="base udev autodetect modconf block lvm2 encrypt filesystems keyboard fsck"
...

@evverx
Copy link
Member Author

evverx commented Nov 11, 2016

@s-urbaniak , what is the output of

ls /lib/modules/$(uname -r)/kernel/drivers/ata

How did you run mkinitcpio?

Try to remove autodetect and mkinitcpio -g no-autodect. Then make run INITRD=path-to-the-no-autodect

evverx added a commit to evverx/systemd that referenced this issue Nov 11, 2016
We can run
sudo make run

instead of the
sudo make run KERNEL_BIN=/boot/vmlinuz-linux INITRD=/boot/initramfs-linux.img

See systemd#4607
@lucab
Copy link
Contributor

lucab commented Nov 11, 2016

For reference, TEST-13-NSPAWN-SMOKE also fails on my debian (stretch) for a couple of reasons:

  1. Missing FS drivers with SKIP_INITRD=yes (that is: CONFIG_EXT4_FS=m)
  2. Funky initramfs scripts when picking it from the host (as my initrd does rootfs decryption, it has partitions config embedded into it)

I'm currently workarounding it with:

SKIP_INITRD=no
KERNEL_APPEND=cryptopts=source=/dev/null,keyscript=/bin/true,tries=1

@evverx
Copy link
Member Author

evverx commented Nov 11, 2016

Missing FS drivers with SKIP_INITRD=yes

Actually, we don't really need SKIP_INITRD=yes there.
I guess we can remove SKIP_INITRD=yes everywhere (note for me: TEST-08-ISSUE-2730 requires SKIP_INITRD=yes)

Funky initramfs scripts when picking it from the host

I'm not sure what to do about initramfs. Maybe, we should generate the "golden" initramfs and use it. But that's not so easy.

@evverx
Copy link
Member Author

evverx commented Mar 16, 2019

I can't remember what this issue is about and whether it has been fixed or not so I'll just close it.

@evverx evverx closed this as completed Mar 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Programming errors, that need preferential fixing tests
Development

No branches or pull requests

3 participants