URL:
  <https://savannah.gnu.org/bugs/?64471>

                 Summary: grub efi memory allocation (efi/mm) does not work on
every machine
                   Group: GNU GRUB
               Submitter: axet
               Submitted: Tue 25 Jul 2023 06:04:05 PM UTC
                Category: Booting
                Severity: Major
                Priority: 5 - Normal
              Item Group: Software Error
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: other
                 Release: 
         Discussion Lock: Any
         Reproducibility: Every Time
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Tue 25 Jul 2023 06:04:05 PM UTC By: Alexey Kuznetsov <axet>
Hello!

I have installed grub 2.06 + argon2 and new memory management from grub 2.12
and new algorithm failed to allocate additional memory on some machines.

Looks like it trying to allocate memory from heap, then try few more times
using low address spaces (where only small free blocks of few kb available)
and stop before reaching really big blocks of free space of 30GB.

I tried different patches (4500-grub-2.06-runtime-memregion-alloc.patch):

*
https://leo3418.github.io/collections/gentoo-config-luks2-grub-systemd/packages.html

And always grub failed to allocate 1GB, only works with 256M grub_malloc
buffers.

But issues only happens on my desktop machine. Laptop works fine with those
patches.

Here are photos of my display where grub failed. First tree photos about
trying to allocate grub_malloc(256M) - success, then grub_malloc(512MB) -
failed.

https://ibb.co/8gkS5pz https://ibb.co/khd8Mbv https://ibb.co/LzWJfN3 

Second three photos from lsmmap command:

https://ibb.co/mykD0w1 https://ibb.co/nCbvWLR https://ibb.co/CVGK240

Basically you can see grub trying to allocate from:

0x8310000, then 0x1a390000, then 0x3510f000, then 0x2f151000, then 0x3510f000,
then get back to 0x2f6a2000 and stops with out of memory error.

But real space starts at 0x100000000 with 0x7c0000000 (30GB) space available.
So grub stops too early and fail to allocate when here is a plenty of space to
work with.






    _______________________________________________________
File Attachments:


-------------------------------------------------------
Date: Tue 25 Jul 2023 06:04:05 PM UTC  Name: grub_malloc1G-1.jpg  Size: 2MiB  
By: axet

<http://savannah.gnu.org/bugs/download.php?file_id=54966>
-------------------------------------------------------
Date: Tue 25 Jul 2023 06:04:05 PM UTC  Name: grub_malloc1G-3.jpg  Size: 2MiB  
By: axet

<http://savannah.gnu.org/bugs/download.php?file_id=54967>
-------------------------------------------------------
Date: Tue 25 Jul 2023 06:04:05 PM UTC  Name: lsmmap1.jpg  Size: 2MiB   By:
axet

<http://savannah.gnu.org/bugs/download.php?file_id=54968>

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64471>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/


Reply via email to