Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 23094 - grub causes 'Segmentation Fault' when run from boot CD in chroot
Summary: grub causes 'Segmentation Fault' when run from boot CD in chroot
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Release Media
Classification: Unclassified
Component: Everything (show other bugs)
Hardware: x86 Linux
: High blocker (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-19 03:45 UTC by Adam Bolte
Modified: 2004-07-13 10:13 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Bolte 2003-06-19 03:45:20 UTC
Hardware:
AMD Athlon XP 
Asus A7N8X Deluxe (nVidia nForce 2)
PowerColor ATI Radeon 8500 Evil Master II Multi-Display Edition
512MB RAM Kingston DDR333

Grub has previously worked on this PC (not sure which version). Now, neither
0.92-r1 or grub-0.93-20030118 work. Not sure yet if it's just because of running
'grub' in the chrooted environment or not, but previous UT2003 Gentoo versions
worked fine with the same setup. Even exactly the same make.conf file (I backed
it up and reused it).

Reproducible: Always
Steps to Reproduce:
1. Type 'grub' as the last stage of the install from Live CD 1.4RC4
2.
3.

Actual Results:  
>grub
Probing devices to guess BIOS drives. This may take a long time.
Unable to handle kernel paging request at virtual address 00410000
 printing eip:
00410000
*pde = 00000000
Oops: 0000
CPU: 0
EUP: 0010:[<00410000>] Tainted: PF
ELFAGS: 00010206
eax: 00410000 ebx: ddd85d80 ecx: df90482c edx: e48be41a
esi: df904810 edi: df90482c dbp: dffc0200 esp: d777ff1c
Stack: c0138e0e ddd85d80 df31bc80 00000000 ddd85d80 df31bc80 ffffffe9 dffc6390
       c0138ec0 df904810 ddd85d80 df31bc80 ddd85d80 df31bc80 ddd85d80 c0132818
       ddd85d80 df31bc80 00008000 c6388000 00000008 bfffe758 c013274e dc205d60
Call Trace: [<c0138e0e>] [<c0138ec0>] [<c0132818>] [<c013274e>] [<c0132a91>]
            [<c0108a07>]
Code: Bad EIP value.
Segmentation fault.

Does this make sense to anyone?

Expected Results:  
Having the software actually run would have been nice. :)
Now I'm using LILO. :(

LILO worked fine. I can't possibly imagine why Samba was a dependency for LILO.
Sure, it's in my USE flag, but so what? Probably not the right place for this
discussion.
Comment 1 Adam Bolte 2003-06-21 21:36:45 UTC
OK. Rebooting into Gentoo to complete the installation using LILO, I re-attempted emerging grub 0.92-r1. It worked perfectly. Now I can unmerge LILO (phew).

Comment 2 Tero Hänninen 2003-08-31 07:09:54 UTC
Just confirming that the same segfault happens on my IBM Thinkpad T30 during final stages of installation. The machine was previously - just couple of hours ago - running RH 9 with grub 0.93 without any problems.

CFLAGS used during installation are "-mcpu=pentium4 -march=pentium3 -O3 -pipe -fomit-frame-pointer"
Comment 3 Colin Fox 2003-11-16 14:44:32 UTC
Happens on my vaio laptop as well.
Latest version of the Live CD, grub 0.93.20030118

I get to the part in the install where, in a chroot'd environment I type "grub", and it dies segfaults almost immediately. If I type 'grub' again, it just hangs.

Hardware:
Pentium III
320Megs Ram

CFLAGS="-O2 -march=i686 -funroll-loops -pipe"
Comment 4 Seemant Kulleen (RETIRED) gentoo-dev 2003-12-15 21:44:58 UTC
adding kernel team in case someone knows something
Comment 5 Tim Yamin (RETIRED) gentoo-dev 2003-12-16 08:43:30 UTC
1) Can you please point me to the exact LiveCD ISO image so that I can debug that stack trace...
2) Can you please tell us the results of 'emerge info'
3) Can you try using GRUB when compiled with CFLAGS=""?
Comment 6 Alar Kvell 2004-01-05 06:16:30 UTC
I have a similar kernel segmentation fault, but not with grub - should I report a new bug instead?
----------------------------------------------------------
Unable to handle kernel NULL pointer dereference at virtual address 00000000
 printing eip:
00000000
*pde = 00000000
Oops: 0000
via-rhine mii serial isa-pnp cloop usb-storage hid uhci ehci-hcd usbcore
CPU:     0
EIP:     0010:[<00000000>]       Tainted: GF
EFLAGS:  00010202
eax: c033b1e0  ebx: c13c6610  ecx: c12be80c  edx: c127e3d4
esi: c12be80c  edi: cfef3168  ebp: 0000192f  esp: c634fdac
ds: 0018  es: 0018  ss: 0018
Process bash (pid: 1268, stackpage = c634f000)
Stack: --[a lot of numbers]--
Call Trace: --[a lot of numbers]--
Code: Bad EIP value
----------------------------------------------------------
I boot up a machine (AMD Athlon XP 2200+) with Gentoo LiveCD (I think I'm using x86-1.4-20030911-cd1.iso). The segmentation faults occured on very different occasions (one time when executed "passwd"; two times when executed "df -h" in a chroot; one time when pressed Ctrl-C when bootstrap.sh was compiling). The system is not usable after the segmentation fault any more and I have to reboot.
I also tried different kernel bootup options (framebuffer on/off; acpi on/off)..
Linux has previously run on this machine (RedHat 8.0).
Comment 7 Tim Yamin (RETIRED) gentoo-dev 2004-01-05 06:20:53 UTC
Alar: The stack traces and callbacks would be quite useful for debugging purposes. Thanks.
Comment 8 Mitchell 2004-01-14 14:11:12 UTC
I had this problem as well on a Toshiba Satellite Pro with a pentium 4.  I had used stage 3 to install so I had my CFLAGS and CXXFLAGS equal to "-03 -march=pentium4 -funroll-loops -fprefetch-loop-arrays -pipe".  To solve this I set my CFLAGS and CXXFLAGS blank.  To do this I used "CFLAGS="" CXXFLAGS="" emerge grub".  Now when I started grub, it worked perfectly.
Comment 9 Tim Yamin (RETIRED) gentoo-dev 2004-01-14 15:08:55 UTC
Looks like we might need to filter flags then - can somebody please confirm whether that particular flag combination causes it or one of the specific flags does? I'm still waiting for a stack trace so that I can debug this. Thanks.
Comment 10 John Davis (zhen) (RETIRED) gentoo-dev 2004-03-15 11:38:35 UTC
moving to the kernel team.
Comment 11 Robert Moss (RETIRED) gentoo-dev 2004-07-01 17:01:52 UTC
Well, to be honest, we shouldn't be letting this pick up the CFLAGS from make.conf anyway. Indeed, it should use -march=i386 as long as you're on x86. I suspect, however (yet to test) that this is down to -funroll-loops.
Comment 12 Robert Moss (RETIRED) gentoo-dev 2004-07-11 22:50:02 UTC
Can someone please close this? grub now uses "unset CFLAGS", so -funroll-loops will be filtered. Please reopen if this is still an issue, which I suspect will not be the case.
Comment 13 Michal Januszewski (RETIRED) gentoo-dev 2004-07-13 10:13:57 UTC
Ok, closing this for now. I anyone experiences similar problems with grub-0.94-r1, please reopen/comment.