bugGNU GRUB - Bugs: bug #42948, Listing (cd,apple4)/ hangs GRUB 2

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #42948: Listing (cd,apple4)/ hangs GRUB 2

Submitted by:  adrian15 <adrian15sgd>
Submitted on:  Fri 08 Aug 2014 04:59:55 PM UTC  
 
Category: Disk & PartitionSeverity: Major
Priority: 5 - NormalItem Group: Software Error
Status: FixedPrivacy: Public
Assigned to: NoneOriginator Name: 
Open/Closed: ClosedRelease: 
Release: otherReproducibility: Every Time
Planned Release: None

Sun 17 Aug 2014 02:55:52 AM UTC, comment #1:

The bug no longer happens in:

c291f47b2c003ef6daeafaedd458db838bad6fb8

You can close it as fixed (unless phcoder wants to improve even more its code to avoid these kind of hangs).

adrian15 <adrian15sgd>
Fri 08 Aug 2014 04:59:55 PM UTC, original submission:

Build system

  • Debian Unstable from 08 August 2014

Build options

./configure --with-platform=efi at first pass.
./configure --with-platform=pc at second pass.

How do I build and prepare my system

Make sure no Debian grub package is found in chroot

apt-get remove '.grub.'

Grub2 (efi+pc)) Build and installation

# Make sure we are testing the right revision
mkdir grub_upstream
cd grub_upstream
git clone git://git.savannah.gnu.org/grub.git .
git checkout COMMIT-TO-TEST

# Remove any non git related file - BEGIN
git reset --hard
git clean -f -d
git clean -f -x -d
# Remove any non git related file - END
# Build efi based grub and install it - BEGIN
./autogen.sh && ./configure --with-platform=efi && make
# Dont forget to delete any rest of previous installation - BEGIN
sudo rm -rf /usr/local/etc/grub.d/ /usr/local/bin/grub-* /usr/local/share/grub/
# Dont forget to delete any rest of previous installation - END
sudo make install
# Build efi based grub and install it - END
make clean # Prepare for next build
./configure --with-platform=pc && make # Prepare for a i386 build
sudo make install # Install i386 build

Super Grub2 Disk build

./supergrub-mkrescue -o="whatever-name.iso"
You can find supergrub-mkrescue source code here:
https://forja.cenatic.es/scm/browser.php?group_id=204
Anyways what it is running is:
grub-mkrescue --output=super_grub2_disk_hybrid_2.00s2.iso /tmp/tmp.As2v1yM9lK
where /tmp/tmp.As2v1yM9lK is a temporary directory with all the extra Super Grub2 Disk files.

Probably running:

grub-mkrescue --output=test.iso /tmp/emptydir/

which needs to output both these messages:
Enabling BIOS support ...
Enabling x86_64-efi support ...

should arise the same results.

VM system

Virtualbox 4.3.10 r93012
Enable EFI option is unchecked!
Cdrom drive: super_grub2_disk_2.00s2.iso
Disk 1: Windows 7
Disk 2: Rescatux USB
Disk 3: SteamOS disk
Disk 4: efi test

How to reproduce the bug

If needed press 'c' to go to grub shell.
echo (*)
# This command is not needed but you will see that: (cd,apple4) is there as a device.
ls (cd,apple4)/

So if the bug happens GRUB hangs. You see all the previous text on the screen but it no longer returns to grub shell prompt (grub>)! It's like if you pressed the Pause button in a video.
If the bug does not happen then you see another error that gives you back to prompt (grub>). E.g.: error: unknown filesystem

Bug bisection

After a very long git bisection I have some suspect commits:

There are only 'skip'ped commits left to test.
The first bad commit could be any of:
99c971afd35d50a42517ce42fd85dc6633bc91dc
837222cc30fc4babb55289737e5eddd538eb193f
e6930a454d6854a44862675a9c7f0b61ef30a9e7
5027af38cf2b4257b40a5fe883d47345c666ce0e
93d8479b705edb45237b31b0d9e77518d2591f1d
4aa237c8a400d1a70e75be45e97b6f205b34413e

I had to skip some of these commits because I found non bug related errors such as:

commands/i386/coreboot/cbls.c: In function 'iterate_linuxbios_table':
commands/i386/coreboot/cbls.c:91:8: error: format '%llx' expects argument of type 'long long unsigned int', but argument 6 has type 'grub_uint64_t' [-Werror=format=]
fb->blue_field_pos, fb->reserved_field_pos);

Extra details about build

When trying to build Grub 2.00 versions from Debian Unstable I have had to workaround some build problems but for the commits mentioned in bisection I think the only needed workaround is to edit:util/grub-mkfont.c file and replace:

#include <freetype/ftsynth.h>

by

#include <ftsynth.h>

Why this bug is important

Super Grub2 Disk algorithms loop every device found at (*). When checking what files are in (cd,apple4)/ in the selfwriting menuentries process it hangs !!!

Summary

  • You need to make sure that efi platform modules are found in the system before grub-mkrescue is run.
  • No sure if pc platform is needed but I do my tests with it.
  • VM does not need its EFI support to be turned on.
  • In previous commits running "ls (cd,apple4)/" did not hang grub2 but now it does
  • Please check the commits at "Bug bisection" section these are the first ones that either:
    • Don't build because of GCC enforcements on integer castings
    • Introduce the bug
adrian15 <adrian15sgd>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by phcoder (Updated the item)
  • -unavailable- added by adrian15sgd (Submitted the item)
  • -unavailable- added by adrian15sgd
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 22 Jan 2015 08:35:40 PM UTCphcoderStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Fri 08 Aug 2014 04:59:55 PM UTCadrian15sgdCarbon-Copy-=>Added adrian15sgd

    Back to the top


    Powered by Savane 3.1-cleanup1