Bug 204289

Summary: When I install GNU/Linux in UEFI mode on HP 250 G6 kernel panic occurs
Product: EFI Reporter: Artyom Pozharov (pozharovartyom)
Component: BootAssignee: EFI Virtual User (efi)
Status: NEW ---    
Severity: normal CC: ardb, daniel.van.vugt, linux
Priority: P1    
Hardware: Intel   
OS: Linux   
Kernel Version: 5.0.0-20 Subsystem:
Regression: No Bisected commit-id:
Attachments: attachment-5186-0.html
attachment-8355-0.html
attachment-29240-0.html

Description Artyom Pozharov 2019-07-23 19:13:49 UTC
There is "Unable to install GRUB in /dev/sda". At first I thought that it's grub-installer bug, but GNU GRUB developers say that this error due to kernel panic that appears when GRUB installs. Installation stops abnormally. After rebooting, I get a non-operational system. This problem applies any GNU/Linux distributions as Ubuntu, Debian, Fedora, Debian, Solus etc. But I don't see such error when I install system in BIOS-compability mode. The detail apport is here: https://bugs.launchpad.net/kernel/+bug/1835664
Comment 1 Ard Biesheuvel 2019-07-25 06:24:36 UTC
Could you please share the details of this kernel panic?
Comment 2 Artyom Pozharov 2019-07-25 09:12:30 UTC
Created attachment 283949 [details]
attachment-5186-0.html

UEFI mode. Installation will go normally while "grub-install on dev/sda"
doesn't appear.  Then installation will freeze. After that I will get an
error with GRUB-installer. GNU GRUB volunteers say that the reason of the
bug is kernel panic during the installation, but not GRUB-installer.
BIOS-compability mode. I don't see any efforts with installation.
This bug applies all GNU/Linux distributions, as Debian, Ubuntu, Fedora,
Solus, Cloudready etc. But FydeOS and ArnoldTheBat Chromium are exepctions.
I guess, it's connected with modified Linux kernels that use FydeOS and ATB
Chromium.
Comment 3 Ard Biesheuvel 2019-07-25 09:14:41 UTC
If you have no details to share about this alleged kernel panic, there is unfortunately no way to confirm that this is indeed a kernel bug, or whether there is a way to fix it.
Comment 4 Artyom Pozharov 2019-07-25 09:32:25 UTC
Created attachment 283953 [details]
attachment-8355-0.html

I say all I know. I am not developer, I am user. I had done my job - I had
sent apport with full information about bug. Canonical say that this bug is
not Ubuntu specific problem. Then I had written to GNU GRUB. They say that
this problem connected with Linux kernel. I had written to you. And you had
sent me to hell too. Anyone want to troubleshoot. Therefore, GNOME 3 lags,
Microsoft documents are incorrectly rendered in LibreOffice, Linux is not
compatible with half the hardware. FOSS is shifting responsibilities to
others.

чт, 25 июл. 2019 г., 12:14 <bugzilla-daemon@bugzilla.kernel.org>:

> https://bugzilla.kernel.org/show_bug.cgi?id=204289
>
> --- Comment #3 from Ard Biesheuvel (ard.biesheuvel@linaro.org) ---
> If you have no details to share about this alleged kernel panic, there is
> unfortunately no way to confirm that this is indeed a kernel bug, or
> whether
> there is a way to fix it.
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 5 Artyom Pozharov 2019-07-25 14:57:58 UTC
(In reply to Ard Biesheuvel from comment #3)
> If you have no details to share about this alleged kernel panic, there is
> unfortunately no way to confirm that this is indeed a kernel bug, or whether
> there is a way to fix it.

Which details do you want to see? How can I get this information?
Comment 6 Daniel van Vugt 2019-07-26 01:35:57 UTC
Here are the details:

Jul  7 15:32:56 ubuntu kernel: [  478.430126] ------------[ cut here ]------------
Jul  7 15:32:56 ubuntu kernel: [  478.430131] [Firmware Bug]: Page fault caused by firmware at PA: 0x67963770
Jul  7 15:32:56 ubuntu kernel: [  478.430143] WARNING: CPU: 0 PID: 149 at arch/x86/platform/efi/quirks.c:735 efi_recover_from_page_fault+0x30/0xce
Jul  7 15:32:56 ubuntu kernel: [  478.430143] Modules linked in: nls_iso8859_1 ufs qnx4 hfsplus hfs minix ntfs msdos xfs jfs btrfs zstd_compress libcrc32c xor raid6_pq ccm rfcomm cmac bnep snd_soc_skl snd_soc_hdac_hda snd_hda_ext_core snd_soc_skl_ipc snd_soc_sst_ipc snd_soc_sst_dsp snd_soc_acpi_intel_match snd_soc_acpi intel_rapl snd_soc_core intel_telemetry_pltdrv intel_punit_ipc intel_telemetry_core snd_compress intel_pmc_ipc ac97_bus snd_hda_codec_hdmi snd_pcm_dmaengine snd_hda_codec_realtek snd_hda_codec_generic x86_pkg_temp_thermal ledtrig_audio intel_powerclamp coretemp snd_hda_intel arc4 uvcvideo iwlmvm kvm_intel snd_hda_codec videobuf2_vmalloc videobuf2_memops mac80211 videobuf2_v4l2 crct10dif_pclmul crc32_pclmul snd_hda_core videobuf2_common snd_hwdep ghash_clmulni_intel iwlwifi snd_pcm videodev btusb media btrtl btbcm cfg80211 aesni_intel snd_seq_midi snd_seq_midi_event btintel snd_rawmidi bluetooth aes_x86_64 snd_seq crypto_simd cryptd glue_helper input_leds intel_cstate joydev snd_seq_device snd_timer
Jul  7 15:32:56 ubuntu kernel: [  478.430185]  intel_rapl_perf ecdh_generic intel_xhci_usb_role_switch mei_me wmi_bmof hp_wmi processor_thermal_device roles sparse_keymap serio_raw snd mei soundcore int340x_thermal_zone intel_soc_dts_iosf mac_hid int3400_thermal int3406_thermal hp_wireless dptf_power acpi_thermal_rel sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4 overlay nls_utf8 isofs dm_mirror dm_region_hash dm_log uas usb_storage i915 kvmgt vfio_mdev mdev vfio_iommu_type1 vfio kvm irqbypass i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops psmouse r8169 drm ahci lpc_ich i2c_i801 realtek libahci pinctrl_broxton wmi video pinctrl_intel
Jul  7 15:32:56 ubuntu kernel: [  478.430219] CPU: 0 PID: 149 Comm: kworker/u8:3 Not tainted 5.0.0-20-generic #21-Ubuntu
Jul  7 15:32:56 ubuntu kernel: [  478.430220] Hardware name: HP HP 250 G6 Notebook PC/832E, BIOS F.40 05/17/2018
Jul  7 15:32:56 ubuntu kernel: [  478.430225] Workqueue: efi_rts_wq efi_call_rts
Jul  7 15:32:56 ubuntu kernel: [  478.430228] RIP: 0010:efi_recover_from_page_fault+0x30/0xce
Jul  7 15:32:56 ubuntu kernel: [  478.430229] Code: 05 15 f7 ca 01 85 c0 74 09 48 81 ff ff 0f 00 00 77 01 c3 55 48 89 fe 48 c7 c7 b8 5d ad 8d 48 89 e5 48 83 ec 08 e8 32 9b 00 00 <0f> 0b 83 3d e7 f6 ca 01 0a 0f 84 8f 00 00 00 48 8b 05 e2 63 7b 01
Jul  7 15:32:56 ubuntu kernel: [  478.430231] RSP: 0018:ffffa0a7c08e39d8 EFLAGS: 00010086
Jul  7 15:32:56 ubuntu kernel: [  478.430232] RAX: 0000000000000000 RBX: 0000000067963770 RCX: 0000000000000006
Jul  7 15:32:56 ubuntu kernel: [  478.430233] RDX: 0000000000000007 RSI: 0000000000000096 RDI: ffff9528bba16440
Jul  7 15:32:56 ubuntu kernel: [  478.430234] RBP: ffffa0a7c08e39e0 R08: 0000000000000001 R09: 00000000000004a0
Jul  7 15:32:56 ubuntu kernel: [  478.430235] R10: 0000000000000004 R11: 0000000000000000 R12: ffffa0a7c08e3b88
Jul  7 15:32:56 ubuntu kernel: [  478.430236] R13: 0000000000000000 R14: ffff9528ae601680 R15: 000000000000000b
Jul  7 15:32:56 ubuntu kernel: [  478.430238] FS:  0000000000000000(0000) GS:ffff9528bba00000(0000) knlGS:0000000000000000
Jul  7 15:32:56 ubuntu kernel: [  478.430239] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Jul  7 15:32:56 ubuntu kernel: [  478.430240] CR2: 0000000067963770 CR3: 000000017b58e000 CR4: 00000000003406f0
Jul  7 15:32:56 ubuntu kernel: [  478.430241] Call Trace:
Jul  7 15:32:56 ubuntu kernel: [  478.430247]  no_context+0x167/0x390
Jul  7 15:32:56 ubuntu kernel: [  478.430251]  ? scsi_mq_done+0x2d/0x80
Jul  7 15:32:56 ubuntu kernel: [  478.430254]  ? ata_scsi_simulate+0xaf/0x300
Jul  7 15:32:56 ubuntu kernel: [  478.430256]  __bad_area_nosemaphore+0x50/0x1c0
Jul  7 15:32:56 ubuntu kernel: [  478.430257]  bad_area_nosemaphore+0x16/0x20
Jul  7 15:32:56 ubuntu kernel: [  478.430259]  __do_page_fault+0x2d7/0x4c0
Jul  7 15:32:56 ubuntu kernel: [  478.430261]  ? __switch_to_asm+0x40/0x70
Jul  7 15:32:56 ubuntu kernel: [  478.430262]  ? __switch_to_asm+0x34/0x70
Jul  7 15:32:56 ubuntu kernel: [  478.430263]  ? __switch_to_asm+0x40/0x70
Jul  7 15:32:56 ubuntu kernel: [  478.430265]  ? __switch_to_asm+0x34/0x70
Jul  7 15:32:56 ubuntu kernel: [  478.430266]  ? __switch_to_asm+0x34/0x70
Jul  7 15:32:56 ubuntu kernel: [  478.430267]  do_page_fault+0x2e/0xe0
Jul  7 15:32:56 ubuntu kernel: [  478.430269]  page_fault+0x1e/0x30
Jul  7 15:32:56 ubuntu kernel: [  478.430271] RIP: 0010:0xfffffffefb052d58
Jul  7 15:32:56 ubuntu kernel: [  478.430273] Code: cb 48 8b c1 48 83 c4 20 5b c3 48 8b d1 b9 04 00 00 00 e9 b7 ff ff ff cc cc cc 48 83 ec 28 48 8b 05 15 4b 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
Jul  7 15:32:56 ubuntu kernel: [  478.430274] RSP: 0018:ffffa0a7c08e3c30 EFLAGS: 00010086
Jul  7 15:32:56 ubuntu kernel: [  478.430275] RAX: 0000000067963730 RBX: 0000000000000002 RCX: 0000000000000004
Jul  7 15:32:56 ubuntu kernel: [  478.430276] RDX: 0000000000000002 RSI: 0000000000000000 RDI: 0000000000000002
Jul  7 15:32:56 ubuntu kernel: [  478.430277] RBP: ffffa0a7c08e3d00 R08: ffffa0a7c08e3c70 R09: ffffa0a7c08e3d60
Jul  7 15:32:56 ubuntu kernel: [  478.430278] R10: 0000000000000000 R11: 0000000000000010 R12: 0000000000000000
Jul  7 15:32:56 ubuntu kernel: [  478.430279] R13: 0000000000084fb0 R14: ffffa0a7c08e3d60 R15: ffffa0a7c08e3d68
Jul  7 15:32:56 ubuntu kernel: [  478.430283]  ? ktime_get_mono_fast_ns+0x5e/0xb0
Jul  7 15:32:56 ubuntu kernel: [  478.430286]  ? sbitmap_queue_clear+0x41/0x70
Jul  7 15:32:56 ubuntu kernel: [  478.430289]  ? blk_mq_put_tag+0x27/0x40
Jul  7 15:32:56 ubuntu kernel: [  478.430290]  ? __blk_mq_free_request+0x85/0xb0
Jul  7 15:32:56 ubuntu kernel: [  478.430292]  ? blk_mq_free_request+0xd1/0x100
Jul  7 15:32:56 ubuntu kernel: [  478.430294]  ? __switch_to_asm+0x34/0x70
Jul  7 15:32:56 ubuntu kernel: [  478.430295]  ? __switch_to_asm+0x40/0x70
Jul  7 15:32:56 ubuntu kernel: [  478.430296]  ? __switch_to_asm+0x34/0x70
Jul  7 15:32:56 ubuntu kernel: [  478.430298]  ? efi_call+0x58/0x90
Jul  7 15:32:56 ubuntu kernel: [  478.430300]  ? __schedule+0x2d8/0x840
Jul  7 15:32:56 ubuntu kernel: [  478.430303]  ? efi_call_rts+0x2cd/0x6b0
Jul  7 15:32:56 ubuntu kernel: [  478.430304]  ? __schedule+0x2d8/0x840
Jul  7 15:32:56 ubuntu kernel: [  478.430307]  ? process_one_work+0x20f/0x410
Jul  7 15:32:56 ubuntu kernel: [  478.430308]  ? worker_thread+0x34/0x400
Jul  7 15:32:56 ubuntu kernel: [  478.430311]  ? kthread+0x120/0x140
Jul  7 15:32:56 ubuntu kernel: [  478.430312]  ? process_one_work+0x410/0x410
Jul  7 15:32:56 ubuntu kernel: [  478.430314]  ? __kthread_parkme+0x70/0x70
Jul  7 15:32:56 ubuntu kernel: [  478.430316]  ? ret_from_fork+0x35/0x40
Jul  7 15:32:56 ubuntu kernel: [  478.430318] ---[ end trace c20315e66875c5b0 ]---
Jul  7 15:32:56 ubuntu kernel: [  478.430325] efi: Froze efi_rts_wq and disabled EFI Runtime Services
Jul  7 15:32:56 ubuntu kernel: [  478.430472] efi: EFI Runtime Services are disabled!
Jul  7 15:32:56 ubuntu grub-installer: error: Running 'grub-install  --force "/dev/sda"' failed.

(from the reporter's original attachment https://bugs.launchpad.net/ubuntu/+source/grub-installer/+bug/1835664/+attachment/5275486/+files/UbiquitySyslog.txt)
Comment 7 Ard Biesheuvel 2019-07-26 09:15:15 UTC
Thanks for the info.

The second line has all the info you need:

[  478.430131] [Firmware Bug]: Page fault caused by firmware at PA: 0x67963770

Note that this is *not* a kernel panic. The kernel does exactly what we intended, which is to contain the page fault caused by the buggy firmware, and proceed without EFI runtime services. Unfortunately, this means that the installer cannot update the boot path so that grub gets invoked at boot by default. The only way to achieve this is probably to use 'bcfg' from the UEFI shell.

Since this is closed source firmware provided by the hardware vendor, there is really very little we can do about this except complaining to them that their firmware is buggy.
Comment 8 Artyom Pozharov 2019-07-26 13:33:50 UTC
Created attachment 283985 [details]
attachment-29240-0.html

I don't understand what is bcfg and how I can to use it

пт, 26 июл. 2019 г., 12:15 <bugzilla-daemon@bugzilla.kernel.org>:

> https://bugzilla.kernel.org/show_bug.cgi?id=204289
>
> --- Comment #7 from Ard Biesheuvel (ard.biesheuvel@linaro.org) ---
> Thanks for the info.
>
> The second line has all the info you need:
>
> [  478.430131] [Firmware Bug]: Page fault caused by firmware at PA:
> 0x67963770
>
> Note that this is *not* a kernel panic. The kernel does exactly what we
> intended, which is to contain the page fault caused by the buggy firmware,
> and
> proceed without EFI runtime services. Unfortunately, this means that the
> installer cannot update the boot path so that grub gets invoked at boot by
> default. The only way to achieve this is probably to use 'bcfg' from the
> UEFI
> shell.
>
> Since this is closed source firmware provided by the hardware vendor,
> there is
> really very little we can do about this except complaining to them that
> their
> firmware is buggy.
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 9 TJ 2019-09-07 11:35:00 UTC
"bcfg" is the boot configuration command contained in the Tianocore/EDK II UEFI shell.

It is possible to boot the PC into the EFI shell rather than GRUB or an OS to use the shell.

There is further information on how to obtain and install the EFI shell version 2 in this thread:

https://superuser.com/questions/1035522/how-to-add-booting-parameters-to-the-kernel-with-bcfg-from-the-efi-shell