On Sat, 10 Jul 2021, Colin Watson wrote:

Control: reassign -1 linux
Control: affects -1 grub2-common

On Sat, May 29, 2021 at 12:00:17PM -0400, Joseph Maher wrote:
grub seems unhappy on my laptop (testing=bullseye, acer spin 1), currently
grub-install doesn't work, and so the various grub packages aren't
installable / upgradable

Not sure what the severity should be, or which package I should file a bug
against, but I've appended some typical output below that may or may not be
useful:

Yours

Joseph


# grub-install --target=x86_64-efi
Installing for x86_64-efi platform.
grub-install: warning: Cannot read EFI Boot* variables.
grub-install: warning: efivarfs_get_variable: read failed: Interrupted system 
call.
grub-install: warning: efi_get_variable: ops->get_variable failed: Interrupted 
system call.
grub-install: error: failed to register the EFI boot entry: Interrupted system 
call.


# grub-install --target=x86_64-efi --debug

This output is very verbose, but I've left a copy here:

https://www.maher.org.uk/~joseph/20210529-grub-install.log



# efibootmgr Skipping unreadable variable "Boot0000": Interrupted system
call
Skipping unreadable variable "Boot0001": Interrupted system call
Skipping unreadable variable "Boot0002": Interrupted system call
Skipping unreadable variable "Boot0003": Interrupted system call
Skipping unreadable variable "Boot0005": Interrupted system call
Skipping unreadable variable "Boot0008": Interrupted system call
Skipping unreadable variable "Boot000B": Interrupted system call
Skipping unreadable variable "Boot000E": Interrupted system call
Skipping unreadable variable "Boot0011": Interrupted system call
Skipping unreadable variable "Boot0014": Interrupted system call
Skipping unreadable variable "Boot0017": Interrupted system call
Skipping unreadable variable "Boot2001": Interrupted system call
Skipping unreadable variable "Boot2002": Interrupted system call
Skipping unreadable variable "Boot2003": Interrupted system call
show_order(): Interrupted system call

The fact that both grub-install and efibootmgr are getting EINTR here
(albeit with different subsequent effects) suggests to me that the
problem is at a lower level.  This looks like it's probably a kernel
bug, or maybe (though less likely IMO) a bug in the efivar userspace
library.  Reassigning to the kernel for now.

I suspect "strace -f -s 1024 grub-install --target=x86_64-efi" and
"strace -f -s 1024 efibootmgr" might be helpful, along with checking
dmesg to see if the kernel is logging any errors there.

--
Colin Watson (he/him)                              [cjwat...@debian.org]


Thanks for the advice to check dmesg - the kernel seems to think there is a firmware bug, which somehow I didn't notice earlier:

[Sun Jul 11 20:36:36 2021] [Firmware Bug]: Page fault caused by firmware at PA: 0x66cd61d0 [Sun Jul 11 20:36:36 2021] WARNING: CPU: 0 PID: 66728 at arch/x86/platform/efi/quirks.c:712 efi_recover_from_page_fault+0x2a/0
xc0
[Sun Jul 11 20:36:36 2021] Modules linked in: tun ufs qnx4 hfsplus hfs cdrom minix msdos jfs xfs rfcomm ctr ccm cmac algif_has h algif_skcipher af_alg bnep binfmt_misc nls_ascii nls_cp437 vfat fat ext4 btusb ath10k_pci mbcache btrtl btbcm btintel jbd2 s nd_hda_codec_hdmi ath10k_core snd_sof_pci snd_sof_intel_byt snd_sof_intel_ipc snd_sof_intel_hda_common snd_sof_xtensa_dsp snd_ sof bluetooth snd_sof_intel_hda snd_soc_skl snd_hda_codec_realtek snd_soc_hdac_hda ath snd_hda_ext_core snd_soc_sst_ipc mac802 11 snd_hda_codec_generic snd_soc_sst_dsp ledtrig_audio intel_rapl_msr snd_soc_acpi_intel_match snd_soc_acpi jitterentropy_rng snd_hda_intel x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel snd_intel_dspcfg kvm soundwire_intel soundwire_generic_ allocation snd_soc_core joydev snd_compress soundwire_cadence uvcvideo videobuf2_vmalloc irqbypass rapl videobuf2_memops wdat_ wdt intel_cstate videobuf2_v4l2 videobuf2_common watchdog drbg rtsx_usb_ms serio_raw pcspkr cfg80211 ansi_cprng videodev [Sun Jul 11 20:36:36 2021] hid_sensor_accel_3d hid_sensor_trigger efi_pstore memstick snd_hda_codec hid_sensor_iio_common ind ustrialio_triggered_buffer ecdh_generic kfifo_buf ecc acer_wmi at24 crc16 industrialio wmi_bmof mc hid_multitouch rfkill snd_h da_core snd_hwdep soundwire_bus intel_xhci_usb_role_switch tpm_crb libarc4 roles tpm_tis tpm_tis_core snd_pcm snd_timer intel_ vbtn soc_button_array sparse_keymap ac evdev snd tpm mei_me soundcore rng_core mei int3403_thermal processor_thermal_device in tel_rapl_common int3400_thermal int340x_thermal_zone acpi_thermal_rel intel_soc_dts_iosf intel_pmc_core msr parport_pc ppdev l p parport fuse configfs efivarfs ip_tables x_tables autofs4 btrfs blake2b_generic xor raid6_pq libcrc32c crc32c_generic rtsx_usb_sdmmc rtsx_usb usbhid dm_crypt dm_mod hid_sensor_custom hid_sensor_hub i915 hid_generic mmc_block crct10dif_pclmul crct10dif_common crc32_pclmul crc32c_intel ghash_clmulni_intel i2c_algo_bit drm_kms_helper cec drm ahci xhci_pci sdhci_pci xhci_hcd libahci [Sun Jul 11 20:36:36 2021] aesni_intel cqhci sdhci usbcore libaes crypto_simd libata cryptd glue_helper mmc_core scsi_mod i2c_i801 i2c_smbus lpc_ich intel_lpss_pci intel_lpss idma64 usb_common i2c_hid hid fan button battery wmi video [Sun Jul 11 20:36:36 2021] CPU: 0 PID: 66728 Comm: kworker/u8:10 Not tainted 5.10.0-6-amd64 #1 Debian 5.10.28-1 [Sun Jul 11 20:36:36 2021] Hardware name: Acer Spin SP111-31N/Ironhide_AP, BIOS V1.02 01/04/2017
[Sun Jul 11 20:36:36 2021] Workqueue: efi_rts_wq efi_call_rts
[Sun Jul 11 20:36:36 2021] RIP: 0010:efi_recover_from_page_fault+0x2a/0xc0
[Sun Jul 11 20:36:36 2021] Code: 0f 1f 44 00 00 8b 15 65 77 f7 01 85 d2 74 09 48 81 ff ff 0f 00 00 77 01 c3 53 48 89 fe 48 c7 c7 60 ca 8c b0 50 e8 e9 b0 7f 00 <0f> 0b 83 3d 3d 77 f7 01 0a 0f 84 13 ac 7f 00 48 8b 3d 18 bb e5 01
[Sun Jul 11 20:36:36 2021] RSP: 0018:ffffabf1c1703b50 EFLAGS: 00010082
[Sun Jul 11 20:36:36 2021] RAX: 0000000000000000 RBX: ffff93b4eb6b8000 RCX: ffff93b53bc18a08 [Sun Jul 11 20:36:36 2021] RDX: 00000000ffffffd8 RSI: 0000000000000027 RDI: ffff93b53bc18a00 [Sun Jul 11 20:36:36 2021] RBP: ffffabf1c1703bf8 R08: 0000000000000000 R09: ffffabf1c1703970 [Sun Jul 11 20:36:36 2021] R10: ffffabf1c1703968 R11: ffffffffb0ecb368 R12: 0000000066cd61d0 [Sun Jul 11 20:36:36 2021] R13: 0000000000000000 R14: 000000000000000b R15: 0000000000000001 [Sun Jul 11 20:36:36 2021] FS: 0000000000000000(0000) GS:ffff93b53bc00000(0000) knlGS:0000000000000000 [Sun Jul 11 20:36:36 2021] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [Sun Jul 11 20:36:36 2021] CR2: 0000000066cd61d0 CR3: 00000001001a4000 CR4: 00000000003506f0
[Sun Jul 11 20:36:36 2021] Call Trace:
[Sun Jul 11 20:36:36 2021]  no_context+0x16a/0x3a0
[Sun Jul 11 20:36:36 2021]  exc_page_fault+0x7b/0x160
[Sun Jul 11 20:36:36 2021]  asm_exc_page_fault+0x1e/0x30
[Sun Jul 11 20:36:36 2021] RIP: 0010:0xfffffffefb04fd44
[Sun Jul 11 20:36:36 2021] Code: d1 b9 04 00 00 00 e9 b7 ff ff ff cc cc cc 48 8b 05 f9 4a 00 00 48 ff 60 30 cc 48 83 ec 28 48 8b 05 e9 4a 00 00 4c 8d 44 24 40 <ff> 50 40 48 8b 4c 24 40 33 d2 48 85 c0 48 0f 48 ca 48 8b c1 48 83
[Sun Jul 11 20:36:36 2021] RSP: 0018:ffffabf1c1703ca0 EFLAGS: 00010086
[Sun Jul 11 20:36:36 2021] RAX: 0000000066cd6190 RBX: 0000000000000002 RCX: 0000000000000004 [Sun Jul 11 20:36:36 2021] RDX: 0000000000000002 RSI: 0000000000000000 RDI: 0000000000000002 [Sun Jul 11 20:36:36 2021] RBP: ffffabf1c1703d70 R08: ffffabf1c1703ce0 R09: ffffabf1c1703dd0 [Sun Jul 11 20:36:36 2021] R10: 0000000000000000 R11: 0000000000000018 R12: 0000000000000000 [Sun Jul 11 20:36:36 2021] R13: 0000000000083fb0 R14: ffffabf1c1703dd0 R15: ffffabf1c1703dd8
[Sun Jul 11 20:36:36 2021]  ? __clear_extent_bit+0x232/0x4a0 [btrfs]
[Sun Jul 11 20:36:36 2021] ? endio_readpage_release_extent+0x52/0xb0 [btrfs]
[Sun Jul 11 20:36:36 2021]  ? psi_group_change+0x41/0x210
[Sun Jul 11 20:36:36 2021]  ? __efi_call+0x28/0x30
[Sun Jul 11 20:36:36 2021]  ? __schedule+0x28a/0x870
[Sun Jul 11 20:36:36 2021]  ? efi_call_rts+0x424/0x760
[Sun Jul 11 20:36:36 2021]  ? __schedule+0x28a/0x870
[Sun Jul 11 20:36:36 2021]  ? process_one_work+0x1b6/0x350
[Sun Jul 11 20:36:36 2021]  ? worker_thread+0x53/0x3e0
[Sun Jul 11 20:36:36 2021]  ? process_one_work+0x350/0x350
[Sun Jul 11 20:36:36 2021]  ? kthread+0x11b/0x140
[Sun Jul 11 20:36:36 2021]  ? __kthread_bind_mask+0x60/0x60
[Sun Jul 11 20:36:36 2021]  ? ret_from_fork+0x22/0x30
[Sun Jul 11 20:36:36 2021] ---[ end trace b7e2b9ad057169a2 ]---
[Sun Jul 11 20:36:36 2021] efi: Froze efi_rts_wq and disabled EFI Runtime Services
[Sun Jul 11 20:36:36 2021] efi: EFI Runtime Services are disabled!
[Sun Jul 11 20:36:42 2021] efi: EFI Runtime Services are disabled!

The output from the other commands is fairly long, so I've left copies at the links below, but I assume they couldn't possibly run correctly as the kernel has disabled efi:

# strace -f -s 1024 grub-install --target=x86_64-efi

https://www.maher.org.uk/~joseph/20210711-strace-grub-install.log

# strace -f -s 1024 efibootmgr

https://www.maher.org.uk/~joseph/20210711-strace-efibootmgr.log

Thanks!

Joseph

Reply via email to