Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1344700

Summary: Data Storage Exception from grub2-2.02-0.33.fc24.ppc64le
Product: [Fedora] Fedora Reporter: Dan Horák <dan>
Component: grub2Assignee: Peter Jones <pjones>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: bcl, lkundrak, mads, msebor, pjones
Target Milestone: ---   
Target Release: ---   
Hardware: ppc64le   
OS: Unspecified   
Whiteboard:
Fixed In Version: grub2-2.02-0.34.fc24 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-14 08:40:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1051573    
Attachments:
Description Flags
exception screenshot none

Description Dan Horák 2016-06-10 12:06:37 UTC
With latest grub2 (after TPM patchset removal) we are seeing a Data Storage Exception on boot when grub2 is built on F-24 (with gcc-6.1.1-2.fc24.ppc64le)

After rebuilding the same sources under F-23 (with gcc-5.3.1-6.fc23.ppc64le) the problem goes away. Which makes me think it's a gcc6 bug in fact.

Flags used to build the bootloader and its modules are
... -mcpu=power6 -mtune=power8 -mbig-endian -m32 ... (details in the logs below), while ppc64 build uses "-mcpu=powerpc -mbig-endian -m32".

One thing is to solve the problem for F-24 GA (eg. using different -mcpu/-mtune), another to solve the root cause.


F-24 scratch build = http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=3449183
F-23 scratch build = http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=3450360

You can also read http://piratepad.net/f24-ppc64le-boot for history of the issue.

Version-Release number of selected component (if applicable):
grub2-2.02-0.33.fc24.ppc64le

Comment 1 Dan Horák 2016-06-10 12:09:02 UTC
Created attachment 1166624 [details]
exception screenshot

Comment 2 Dan Horák 2016-06-10 12:14:27 UTC
[root@ibm-p8-generic-01 qemu]# virsh start --console guest02
Domain guest02 started
Connected to domain guest02
Escape character is ^]

SLOF **********************************************************************
QEMU Starting
 Build Date = Jun  1 2015 15:26:10
 FW Version = mockbuild@ release 20150601
 Press "s" to enter Open Firmware.

Populating /vdevice methods
Populating /vdevice/v-scsi@2000
       SCSI: Looking for devices
          8002000000000000 CD-ROM   : "QEMU     QEMU CD-ROM      2.0."
Populating /vdevice/vty@30001000
Populating /vdevice/nvram@71000000
Populating /pci@800000020000000
 Adapters on 0800000020000000
                     00 0800 (D) : 1af4 1000    virtio [ net ]
                     00 1000 (D) : 106b 003f    serial bus [ usb-ohci ]
                     00 1800 (D) : 1af4 1001    virtio [ block ]
                     00 2000 (D) : 1af4 1002    unknown-legacy-device*
No NVRAM common partition, re-initializing...
Scanning USB 
  OHCI: initializing
    USB mouse 
    USB Keyboard 
    USB HUB 
Using default console: /vdevice/vty@30001000
     
  Welcome to Open Firmware

  Copyright (c) 2004, 2011 IBM Corporation All rights reserved.
  This program and the accompanying materials are made available
  under the terms of the BSD License available at
  http://www.opensource.org/licenses/bsd-license.php


Trying to load:  from: /pci@800000020000000/scsi@3 ...   Successfully loaded
 

( 300 ) Data Storage Exception [ 6 ]


    R0 .. R7           R8 .. R15         R16 .. R23         R24 .. R31
00000000800e62e4   00000000001ece30   0000000000000000   0000000000000000   
000000007dd12dc0   ffffffff800f32b6   0000000000000000   ffffffff800f32b6   
0000000000000000   00000000001ece30   0000000000000000   00000000001edfc0   
ffffffff800f32b6   000000007dd12e00   0000000000000001   000000000020fa28   
0000000000000006   000000000020af90   00000000001edf94   0000000000000006   
0000000000000006   0000000000000000   0000000000000000   0000000000000006   
000000000020fa28   0000000000000000   00000000ffffffff   000000000020fa28   
0000000000000001   0000000000000000   00000000ffffffff   0000000000000001   

    CR / XER           LR / CTR          SRR0 / SRR1        DAR / DSISR
        80004202   00000000800e5b94   000000000020af94   ffffffff800f32b6   
0000000000000000   000000000020af90   8000000000001000           40000000

Comment 3 Dan Horák 2016-06-10 12:45:56 UTC
> Flags used to build the bootloader and its modules are
> ... -mcpu=power6 -mtune=power8 -mbig-endian -m32 ... (details in the logs
> below), while ppc64 build uses "-mcpu=powerpc -mbig-endian -m32".

seems it's a bit more complicated

for grub2-2.02-0.33.fc24.ppc64le:
gcc -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value  -Wunused-variable -Wwrite-strings -Wnested-externs -Wstrict-prototypes -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations -Wcast-align  -Wextra -Wattributes -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2 -mbig-endian -m32 -freg-struct-return -msoft-float -fno-dwarf2-cfi-asm -fno-asynchronous-unwind-tables -fno-unwind-tables -Qn -fno-stack-protector -Wtrampolines  -mcpu=powerpc -ffreestanding -Wno-error -Wno-missing-field-initializers -Wno-redundant-decls -Wno-undef -fno-builtin  -fno-strict-aliasing  -g -pipe -Wall -Werror=format-security     -grecord-gcc-switches  -mcpu=power8 -mtune=power8 -static -mbig-endian -m32 -Wl,--build-id=none  -nostdlib -Wl,-N -Wl,-r,-d  -Wl,-z,relro  -o gcry_crc.module lib/libgcrypt-grub/cipher/gcry_crc_module-crc.o

for grub2-2.02-0.33.fc23.ppc64le:
gcc -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value  -Wunused-variable -Wwrite-strings -Wnested-externs -Wstrict-prototypes -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations -Wcast-align  -Wextra -Wattributes -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2 -mbig-endian -m32 -freg-struct-return -msoft-float -fno-dwarf2-cfi-asm -fno-asynchronous-unwind-tables -fno-unwind-tables -Qn -fno-stack-protector -Wtrampolines  -mcpu=powerpc -ffreestanding -Wno-error -Wno-missing-field-initializers -Wno-redundant-decls -Wno-undef -fno-builtin  -fno-strict-aliasing  -g -pipe -Wall -Werror=format-security     -grecord-gcc-switches  -mcpu=power6 -mtune=power8 -static -mbig-endian -m32 -Wl,--build-id=none  -nostdlib -Wl,-N -Wl,-r,-d  -Wl,-z,relro  -o gcry_crc.module lib/libgcrypt-grub/cipher/gcry_crc_module-crc.o

Comment 4 Dan Horák 2016-06-10 13:03:23 UTC
so changing http://pkgs.fedoraproject.org/cgit/rpms/grub2.git/tree/grub2.spec?h=f24#n276 with

@@ -273,7 +273,7 @@ cd grub-%{tarversion}
                -e 's/-fexceptions//g'                          \
                -e 's/-m64//g'                                  \
                -e 's/-fasynchronous-unwind-tables//g'          \
-               -e 's/-mcpu=power7/-mcpu=power6/g'              \
+               -e 's/-mcpu=power8/-mcpu=power6/g'              \
                -e 's/^/ -fno-strict-aliasing /' )"             \
        TARGET_LDFLAGS=-static                                  \
         --with-platform=%{platform}                            \

makes it work again. Don't ask me why ;-)

The -mcpu is coming from the distro wide CFLAGS, it used to be -mcpu=power7 in F-23 and was changed into -mcpu=power8 in F-24.

Comment 5 Dan Horák 2016-06-10 13:06:35 UTC
scratch build with ^^ applied - http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=3450998

Comment 6 Fedora Update System 2016-06-13 14:38:45 UTC
grub2-2.02-0.33.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-c4d43baacc

Comment 7 Fedora Update System 2016-06-13 14:41:31 UTC
grub2-2.02-0.33.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-c4d43baacc

Comment 8 Fedora Update System 2016-06-13 14:44:51 UTC
grub2-2.02-0.33.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-c4d43baacc

Comment 9 Fedora Update System 2016-06-13 15:58:40 UTC
grub2-2.02-0.33.fc24, grub2-2.02-0.34.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-c4d43baacc

Comment 10 Fedora Update System 2016-06-14 08:40:17 UTC
grub2-2.02-0.34.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.