qubes-issues icon indicating copy to clipboard operation
qubes-issues copied to clipboard

Updating from 4.2.0 to 4.2.1 breaks sys-* vms

Open minegameYTB opened this issue 2 years ago • 32 comments

Qubes OS release

Qubes os 4.2.1 (R4.2) Xen 4.17.4

Brief summary

When restarting after updating to qubes os 4.2.1, the vms sys-* are no longer functional, with a qrexec error "qrexec-daemon.c:144:sigchld_parent_handler: Connection to the VM failed"

Steps to reproduce

  1. Have an HP 240 g7 and install qubes os 4.2.0

  2. Update qubes os to the latest version

Expected behavior

That the vms start correctly after the update

Actual behavior

The vms does not start and gives the error "qrexec-daemon.c:144:sigchld_parent_handler: Connection to the VM failed"

minegameYTB avatar May 11 '24 11:05 minegameYTB

Check /var/log/xen/console/hypervisor.log, /var/log/xen/console/guest-sys-net.log and also exact version of xen-hypervisor package (rpm -q xen-hypervisor) and kernel used for those sys-* VMs (qvm-ls -k)

marmarek avatar May 11 '24 11:05 marmarek

For the kernel: 6.6.25-1.fc37

For the xen version: xen-hypervisor-4.17.4-2.fc37.x86-64

As well as the hypervisor and sys-net logs attached to my OneDrive: https://1drv.ms/f/s!AjdQsaJ6acqhg4M38rstjCQ_cS0JEA

minegameYTB avatar May 11 '24 12:05 minegameYTB

the sys-net doesn't seem to reach to the point to log anything... maybe there is some info in guest-sys-net-dm.log in the same dir? do you see any entries with recent timestamps?

marmarek avatar May 11 '24 12:05 marmarek

Here are the logs for guest-sys-net-dm.log attached here: https://1drv.ms/f/s!AjdQsaJ6acqhg4M8AHaGfn0Wi_04fw

minegameYTB avatar May 11 '24 13:05 minegameYTB

This one looks normal... lets try with sys-net itself a bit more - add earlyprintk=xen to kernelopts property and try to start it again - then look into guest-sys-net.log if anything new besides "Logfile Opened" appeared

marmarek avatar May 11 '24 13:05 marmarek

No other information appears after log file opened

minegameYTB avatar May 11 '24 13:05 minegameYTB

I don't know if the info will be useful, but the log located in /var/log/qubes/qrexec.sys-net.log indicates this:

domain dead
2024-05-12 01:01:48.396 qrexec-daemon [4031]: qrexec-daemon.c:360:init: cannot connect to qrexec agent: No such file or directory

minegameYTB avatar May 11 '24 23:05 minegameYTB

I think this just means the VM has crashed, without much hint why... But just in case - which version of qubes-core-qrexec do you have?

marmarek avatar May 11 '24 23:05 marmarek

This is qubes-core-qrexec version 4.2.18-1

minegameYTB avatar May 11 '24 23:05 minegameYTB

Lets try something else then. Try increasing Xen log level with xl set-parameters "loglvl=all guest_loglvl=all" and then try starting sys-net again. After that, check if you got anything new in /var/log/xen/console/hypervisor.log.

You can also set the increased log level by adding loglvl=all guest_loglvl=all to Xen options. Either in /etc/default/grub (extend GRUB_CMDLINE_XEN_DEFAULT) and regenerate grub config with grub2-mkconfig -o /boot/grub2/grub.cfg, or by boot option in grub menu during boot (add them to the line with xen.gz).

marmarek avatar May 11 '24 23:05 marmarek

Here is the content of hypervisor.log after adding the option in the xen command line at startup as attachment: https://1drv.ms/f/s!AjdQsaJ6acqhg4NBZ3Hq5p1jiKZqaw

minegameYTB avatar May 12 '24 00:05 minegameYTB

Finally some info is logged:

Details

[2024-05-12 02:09:44] (d9) [    0.000000] Linux version 6.6.25-1.qubes.fc37.x86_64 (mockbuild@0ea67609eec34984a726d02025fcb36b) (gcc (GCC) 12.3.1 20230508 (Red Hat 12.3.1-1), GNU ld version 2.38-27.fc37) #1 SMP PREEMPT_DYNAMIC
[2024-05-12 02:09:44] (d9)  Fri Apr  5 13:42:55 GMT 2024
[2024-05-12 02:09:44] (d9) [    0.000000] Command line: root=/dev/mapper/dmroot ro nomodeset console=hvc0 rd_NO_PLYMOUTH rd.plymouth.enable=0 plymouth.enable=0 clocksource=tsc xen_scrub_pages=0 earlyprintk=xen apparmor=1 secur
[2024-05-12 02:09:44] (d9) ity=apparmor
[2024-05-12 02:09:44] (d9) [    0.000000] BIOS-provided physical RAM map:
[2024-05-12 02:09:44] (d9) [    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
[2024-05-12 02:09:44] (d9) [    0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
[2024-05-12 02:09:44] (d9) [    0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
[2024-05-12 02:09:44] (d9) [    0.000000] BIOS-e820: [mem 0x0000000000100000-0x0000000017ffefff] usable
[2024-05-12 02:09:44] (d9) [    0.000000] BIOS-e820: [mem 0x0000000017fff000-0x0000000017ffffff] reserved
[2024-05-12 02:09:44] (d9) [    0.000000] BIOS-e820: [mem 0x00000000fc000000-0x00000000fc00afff] ACPI NVS
[2024-05-12 02:09:44] (d9) [    0.000000] BIOS-e820: [mem 0x00000000fc00b000-0x00000000ffffffff] reserved
[2024-05-12 02:09:44] (d9) [    0.000000] printk: bootconsole [xenboot0] enabled
[2024-05-12 02:09:44] (d9) [    0.000000] NX (Execute Disable) protection: active
[2024-05-12 02:09:44] (d9) [    0.000000] APIC: Static calls initialized
[2024-05-12 02:09:44] (d9) [    0.000000] SMBIOS 2.4 present.
[2024-05-12 02:09:44] (d9) [    0.000000] DMI: Xen HVM domU, BIOS 4.17.4 04/26/2024
[2024-05-12 02:09:44] (d9) [    0.000000] Hypervisor detected: Xen HVM
[2024-05-12 02:09:44] (d9) [    0.000000] Xen version 4.17.
[2024-05-12 02:09:44] (d9) [    0.000000] platform_pci_unplug: Netfront and the Xen platform PCI driver have been compiled for this kernel: unplug emulated NICs.
[2024-05-12 02:09:44] (d9) [    0.000000] platform_pci_unplug: Blkfront and the Xen platform PCI driver have been compiled for this kernel: unplug emulated disks.
[2024-05-12 02:09:44] (d9) [    0.000000] You might have to change the root device
[2024-05-12 02:09:44] (d9) [    0.000000] from /dev/hd[a-d] to /dev/xvd[a-d]
[2024-05-12 02:09:44] (d9) [    0.000000] in your root= kernel command line option
[2024-05-12 02:09:44] (d9) [    0.000469] tsc: Detected 1094.399 MHz processor
[2024-05-12 02:09:44] (d9) [    0.002347] last_pfn = 0x17fff max_arch_pfn = 0x400000000
[2024-05-12 02:09:44] (d9) [    0.002481] MTRR map: 4 entries (3 fixed + 1 variable; max 19), built from 8 variable MTRRs
[2024-05-12 02:09:44] (d9) [    0.002541] x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WP  UC- WT  
[2024-05-12 02:09:44] (d9) Memory KASLR using RDRAND RDTSC...
[2024-05-12 02:09:44] (d9) [    0.009381] found SMP MP-table at [mem 0x000f5960-0x000f596f]
[2024-05-12 02:09:44] (d9) [    0.009500] Using GB pages for direct mapping
[2024-05-12 02:09:44] (d9) PANIC: early exception 0x00 IP 10:ffffffffb01c32e2 error 0 cr2 0xffffa08649801000
[2024-05-12 02:09:44] (d9) [    0.009606] CPU: 0 PID: 0 Comm: swapper Not tainted 6.6.25-1.qubes.fc37.x86_64 #1
[2024-05-12 02:09:44] (d9) [    0.009665] Hardware name: Xen HVM domU, BIOS 4.17.4 04/26/2024
[2024-05-12 02:09:44] (d9) [    0.009710] RIP: 0010:clear_page_orig+0x12/0x40
[2024-05-12 02:09:44] (d9) [    0.009766] Code: 84 00 00 00 00 00 66 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 31 c0 b9 40 00 00 00 0f 1f 44 00 00 ff c9 <48> 89 07 48 89 47 08 48 89 47 10 48 89 47 18 48 89
[2024-05-12 02:09:44] (d9)  47 20 48 89 47
[2024-05-12 02:09:44] (d9) [    0.009862] RSP: 0000:ffffffffb0e03d58 EFLAGS: 00010016 ORIG_RAX: 0000000000000000
[2024-05-12 02:09:44] (d9) [    0.009915] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 000000000000003f
[2024-05-12 02:09:44] (d9) [    0.009967] RDX: 0000000000009801 RSI: 0000000000000000 RDI: ffffa08649801000
[2024-05-12 02:09:44] (d9) [    0.010015] RBP: 0000000000000001 R08: 0000000000000001 R09: 6b7f283562d74b16
[2024-05-12 02:09:44] (d9) [    0.010063] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000001
[2024-05-12 02:09:44] (d9) [    0.010112] R13: 0000000000000000 R14: ffffffffb0e22a08 R15: ffffa08640000000
[2024-05-12 02:09:44] (d9) [    0.010161] FS:  0000000000000000(0000) GS:ffffffffb16ea000(0000) knlGS:0000000000000000
[2024-05-12 02:09:44] (d9) [    0.010214] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[2024-05-12 02:09:44] (d9) [    0.010257] CR2: ffffa08649801000 CR3: 0000000008e80000 CR4: 00000000000000b0
[2024-05-12 02:09:44] (d9) [    0.010310] Call Trace:
[2024-05-12 02:09:44] (d9) [    0.010341]  <TASK>
[2024-05-12 02:09:44] (d9) [    0.010372]  ? early_fixup_exception+0xf7/0x190
[2024-05-12 02:09:44] (d9) [    0.010416]  ? early_idt_handler_common+0x2f/0x3a
[2024-05-12 02:09:44] (d9) [    0.010460]  ? clear_page_orig+0x12/0x40
[2024-05-12 02:09:44] (d9) [    0.010501]  ? alloc_low_pages+0xeb/0x150
[2024-05-12 02:09:44] (d9) [    0.010541]  ? __kernel_physical_mapping_init+0x1d2/0x630
[2024-05-12 02:09:44] (d9) [    0.010588]  ? init_memory_mapping+0x83/0x160
[2024-05-12 02:09:44] (d9) [    0.010631]  ? init_mem_mapping+0x9a/0x460
[2024-05-12 02:09:44] (d9) [    0.010669]  ? memblock_reserve+0x6d/0xf0
[2024-05-12 02:09:44] (d9) [    0.010709]  ? setup_arch+0x796/0xf90
[2024-05-12 02:09:44] (d9) [    0.010748]  ? start_kernel+0x63/0x420
[2024-05-12 02:09:44] (d9) [    0.010787]  ? x86_64_start_reservations+0x18/0x30
[2024-05-12 02:09:44] (d9) [    0.010828]  ? x86_64_start_kernel+0x96/0xa0
[2024-05-12 02:09:44] (d9) [    0.010868]  ? secondary_startup_64_no_verify+0x18f/0x19b
[2024-05-12 02:09:44] (d9) [    0.010918]  </TASK>

As a temporary workaround, you can try switching to a different kernel version in sys-net settings.

marmarek avatar May 12 '24 01:05 marmarek

Or better switch default kernel in global settings

marmarek avatar May 12 '24 01:05 marmarek

Does a qubes without netvm work? In default setup that would be vault for example.

marmarek avatar May 12 '24 01:05 marmarek

I just followed the indication that you proposed to me (so the kernel delivered before the update to qubes 4.2.1, In this case, 6.1.62-1.qubes.fc37.x86_64), I notice when qubes os is completely restarted that the error continues, looking in the log file of the vm concerned, That it is a kernel panic

2024-05-12 03:26:34] [    0.381575] printk: console [hvc0] enabled
[2024-05-12 03:26:34] [    0.381633] printk: bootconsole [xenboot0] disabled
[2024-05-12 03:26:34] [    0.381744] ACPI: Core revision 20220331
[2024-05-12 03:26:34] [    0.382049] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 30580167144 ns
[2024-05-12 03:26:34] [    0.382251] divide error: 0000 [#1] PREEMPT SMP PTI
[2024-05-12 03:26:34] [    0.382283] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.1.62-1.qubes.fc37.x86_64 #1
[2024-05-12 03:26:34] [    0.382325] Hardware name: Xen HVM domU, BIOS 4.17.4 04/26/2024
[2024-05-12 03:26:34] [    0.382360] RIP: 0010:__x86_return_thunk+0x0/0x2
[2024-05-12 03:26:34] [    0.382395] Code: 1f 84 00 00 00 00 00 0f 1f 00 e8 db ff ff ff 0f 0b 66 0f 1f 84 00 00 00 00 00 e9 4a ff ff ff 66 66 2e 0f 1f 84 00 00 00 00 00 <c3> cc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[2024-05-12 03:26:34] [    0.382486] RSP: 0000:ffffffffbac03e58 EFLAGS: 00000206
[2024-05-12 03:26:34] [    0.382515] RAX: 0000000000000001 RBX: ffff9c954115fe00 RCX: 0000000000015a00
[2024-05-12 03:26:34] [    0.382556] RDX: 0000000000000001 RSI: 0000000000000246 RDI: ffff9c954115fea4
[2024-05-12 03:26:34] [    0.382596] RBP: ffff9c954115b180 R08: 0000000000000080 R09: 0000000000000000
[2024-05-12 03:26:34] [    0.382637] R10: 0000000000000246 R11: 0000000000000000 R12: 0000000000000000
[2024-05-12 03:26:34] [    0.382677] R13: ffff9c954115ff60 R14: ffff9c954115fea4 R15: 0000000000000000
[2024-05-12 03:26:34] [    0.382718] FS:  0000000000000000(0000) GS:ffff9c9557000000(0000) knlGS:0000000000000000
[2024-05-12 03:26:34] [    0.382758] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[2024-05-12 03:26:34] [    0.382795] CR2: ffff9c954ca01000 CR3: 000000000ac10000 CR4: 00000000000000b0
[2024-05-12 03:26:34] [    0.382840] Call Trace:
[2024-05-12 03:26:34] [    0.382858]  <TASK>
[2024-05-12 03:26:34] [    0.382876]  ? show_trace_log_lvl+0x1d3/0x2ef
[2024-05-12 03:26:34] [    0.382909]  ? show_trace_log_lvl+0x1d3/0x2ef
[2024-05-12 03:26:34] [    0.382940]  ? show_trace_log_lvl+0x1d3/0x2ef
[2024-05-12 03:26:34] [    0.382973]  ? _raw_spin_unlock_irqrestore+0x19/0x40
[2024-05-12 03:26:34] [    0.383006]  ? __die_body.cold+0x8/0xd
[2024-05-12 03:26:34] [    0.383032]  ? die+0x2a/0x50
[2024-05-12 03:26:34] [    0.383058]  ? do_trap+0xc5/0x110
[2024-05-12 03:26:34] [    0.383082]  ? entry_untrain_ret+0x10/0x10
[2024-05-12 03:26:34] [    0.383107]  ? do_error_trap+0x6a/0x90
[2024-05-12 03:26:34] [    0.383131]  ? entry_untrain_ret+0x10/0x10
[2024-05-12 03:26:34] [    0.383155]  ? exc_divide_error+0x34/0x50
[2024-05-12 03:26:34] [    0.383180]  ? entry_untrain_ret+0x10/0x10
[2024-05-12 03:26:34] [    0.383204]  ? asm_exc_divide_error+0x16/0x20
[2024-05-12 03:26:34] [    0.383238]  ? entry_untrain_ret+0x10/0x10
[2024-05-12 03:26:34] [    0.383262]  _raw_spin_unlock_irqrestore+0x19/0x40
[2024-05-12 03:26:34] [    0.383294]  __setup_irq+0x443/0x6d0
[2024-05-12 03:26:34] [    0.383322]  request_threaded_irq+0x109/0x170
[2024-05-12 03:26:34] [    0.383354]  hpet_time_init+0x5a/0xed
[2024-05-12 03:26:34] [    0.383381]  x86_late_time_init+0x36/0x9a
[2024-05-12 03:26:34] [    0.383408]  start_kernel+0x626/0x715
[2024-05-12 03:26:34] [    0.383433]  secondary_startup_64_no_verify+0xe5/0xeb
[2024-05-12 03:26:34] [    0.383468]  </TASK>
[2024-05-12 03:26:34] [    0.383484] Modules linked in:
[2024-05-12 03:26:34] [    0.383509] ---[ end trace 0000000000000000 ]---
[2024-05-12 03:26:34] [    0.383538] RIP: 0010:__x86_return_thunk+0x0/0x2
[2024-05-12 03:26:34] [    0.383573] Code: 1f 84 00 00 00 00 00 0f 1f 00 e8 db ff ff ff 0f 0b 66 0f 1f 84 00 00 00 00 00 e9 4a ff ff ff 66 66 2e 0f 1f 84 00 00 00 00 00 <c3> cc 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[2024-05-12 03:26:34] [    0.383670] RSP: 0000:ffffffffbac03e58 EFLAGS: 00000206
[2024-05-12 03:26:34] [    0.383702] RAX: 0000000000000001 RBX: ffff9c954115fe00 RCX: 0000000000015a00
[2024-05-12 03:26:34] [    0.383745] RDX: 0000000000000001 RSI: 0000000000000246 RDI: ffff9c954115fea4
[2024-05-12 03:26:34] [    0.383788] RBP: ffff9c954115b180 R08: 0000000000000080 R09: 0000000000000000
[2024-05-12 03:26:34] [    0.383832] R10: 0000000000000246 R11: 0000000000000000 R12: 0000000000000000
[2024-05-12 03:26:34] [    0.383875] R13: ffff9c954115ff60 R14: ffff9c954115fea4 R15: 0000000000000000
[2024-05-12 03:26:34] [    0.383919] FS:  0000000000000000(0000) GS:ffff9c9557000000(0000) knlGS:0000000000000000
[2024-05-12 03:26:34] [    0.383962] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[2024-05-12 03:26:34] [    0.383999] CR2: ffff9c954ca01000 CR3: 000000000ac10000 CR4: 00000000000000b0
[2024-05-12 03:26:34] [    0.384043] Kernel panic - not syncing: Fatal exception

minegameYTB avatar May 12 '24 01:05 minegameYTB

Does a qubes without netvm work? In default setup that would be vault for example.

Yes, vault works correctly

minegameYTB avatar May 12 '24 01:05 minegameYTB

Can you try switching virtualization mode to HVM in vault settings and see if it still works? I'm trying to figure out whether issue is with any HVM, or only with those with PCI devices (sys-net, sys-usb).

marmarek avatar May 12 '24 02:05 marmarek

I just changed to HVM, and I have the same qrexec error as on sys-net and the other vms having HVM mode

minegameYTB avatar May 12 '24 02:05 minegameYTB

@minegameYTB There's a key log-line missing from every single one of your hypervisor logs. The one that gives the exact Family/Model/Stepping of the CPU.

Please can you collect head /proc/cpuinfo in dom0 and paste it here to confirm?

andyhhp avatar May 12 '24 13:05 andyhhp

head /proc/cpuinfo

processor : 0
vendor id : GenuineIntel
cpu family :6
model : 122
model name : Intel(R) Celeron(R) N4000 CPU @ 1.10GHz
stepping 1
microcode 0x2e
cpu MHz : 2487.273
cache size : 4096 KB
physical id : 0

Knowing that there are two cores with this processor

minegameYTB avatar May 12 '24 13:05 minegameYTB