Bug 968122 - SystemError : Unsupported PPC machine type: PMac
Summary: SystemError : Unsupported PPC machine type: PMac
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-blivet
Version: 19
Hardware: ppc64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Brian Lane
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: AcceptedFreezeException
Depends On:
Blocks: F19-accepted, F19FinalFreezeException
TreeView+ depends on / blocked
 
Reported: 2013-05-29 03:03 UTC by Ronald Maas
Modified: 2013-06-28 07:18 UTC (History)
13 users (show)

Fixed In Version: python-blivet-0.17-1.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-28 07:18:10 UTC


Attachments (Terms of Use)

Description Ronald Maas 2013-05-29 03:03:09 UTC
Description of problem:
Linux boots succesfully, but Powermac G5 freezes during start of Anaconda. Fans start blowing. Need to press power button to restart the computer.

Last screen:
Traceback (most recent call last):
  File "/sbin/anaconda", line 670 in <module>
    setupPythonPath()
  File "/sbin/anaconda", line 305 in setupPythonPath
    from pyanaconda.constannts import ADDON_PATHS
  File "/usr/lib64/python2.7/site=packages/pyanaconda/__init__.py", line 36, in <module>
    from pyanaconda.bootloader import get_bootloader
  File "/usr/lib64/python2.7/site=packages/pyanaconda/bootloader.py", line 32, in <module>
    from blivet.devicelibs import mdraid
  File "/usr/lib64/python2.7/site=packages/blivet/__init__.py", line 68, in <module>
    from devices import *
  File "/usr/lib64/python2.7/site=packages/blivet/devices.py", line 119, in <module>
    from formats import get_device_format_class, getFormat, DeviceFormat
  File "/usr/lib64/python2.7/site=packages/blivet/formats/__init__.py", line 442, in <module>
    collect_device_format_classes()
  File "/usr/lib64/python2.7/site=packages/blivet/formats/__init__.py", line 118, in collect_device_format_classes
    globals()[mod_name] = __import__(mod_name, globals(), locals(), [], -1)
  File "/usr/lib64/python2.7/site=packages/blivet/formats/__init__.py", line 442, in <module>
    collect_device_format_classes()
  File "/usr/lib64/python2.7/site=packages/blivet/formats/__init__.py", line 118, in <module>
    globals()[mod_name] = __import__(mod_name, globals(), locals(), [], -1)
  File "/usr/lib64/python2.7/site=packages/blivet/formats/biosboot.py", line 26, in collect_device_format_classes
    from .. import platform
  File "/usr/lib64/python2.7/site=packages/blivet/platform.py", line 409, in <module>
    platform = getPlatform()
  File "/usr/lib64/python2.7/site=packages/blivet/platform.py", line 387, in getPlatform
    raise SystemError, "Unsupported PPC machine type %s" % ppcMachine
SystemError : Unsupported PPC machine type: PMac



Pane is dead




Version-Release number of selected component (if applicable):
Fedora 19 PPC64/beta Netinstall CD

How reproducible:
1. Insert Fedora 19 beta Netinstall CD in drive
2. Reboot
3. Press C after chime
4. Press <enter> on boot: prompt
  
Actual results:
Computer freezes shortly after start of Anaconda with a system error message

Expected results:
First Anaconda graphical screen without any error message

Additional info:
Powermac G5 (late 2005)
Dual core 2 GHz
4.25 GB RAM
500 MB SATA
nVidia 7800 GT

Actions done to solve the issue:
- checked SHA256 checksums of downloaded ISO
- checked CD for burning errors

Comment 1 Ronald Maas 2013-06-15 09:35:15 UTC
The thread startomg https://lists.fedoraproject.org/pipermail/ppc/2013-June/002291.html on the Fedora PPC mailing list describes the same issue.

Just looking at the following code in python-blivet platform.py:

def getPlatform():
    """Check the architecture of the system and return an instance of a
       Platform subclass to match.  If the architecture could not be determined,
       raise an exception."""
    if arch.isPPC():
        ppcMachine = arch.getPPCMachine()

        if (ppcMachine == "PMac" and arch.getPPCMacGen() == "NewWorld"):
            return NewWorldPPC()
        elif ppcMachine in ["iSeries", "pSeries"]:
            return IPSeriesPPC()
        elif ppcMachine == "PS3":
            return PS3()
        else:
            raise SystemError, "Unsupported PPC machine type: %s" % ppcMachine

It seems arch.getPPCMacGen() returns a different value than "NewWorld" on Apple G5. Basically this condition is redundant because all 64-bit Powermacs are "NewWorld". So changing the line

if (ppcMachine == "PMac" and arch.getPPCMacGen() == "NewWorld"):

to something like

if ppcMachine == "PMac":

should solve the problem

Comment 2 Mike Roberts 2013-06-17 19:54:18 UTC
For what it's worth, I also encountered this bug on a quad-core PowerMac G5 with the f19-20130613-GA-TC3 build of the Fedora-19-ppc64-netinst.iso.

Comment 3 Mark Hamzy 2013-06-20 18:32:34 UTC
Can you boot and append rd.break to the boot command line
edit /usr/lib/python2.7/site-packages/blivet/platform.py
and change the line as you propose and see if that fixes the problem?

Comment 4 Mike Roberts 2013-06-21 00:57:31 UTC
(In reply to Ronald Maas from comment #1)
(In reply to Mark Hamzy from comment #3)

I'm happy to report that doing so worked as expected and allowed me to get into Anaconda proper on my PowerMac G5.

So I guess it should be changed that way in the source...

Comment 5 David Lehman 2013-06-21 02:45:02 UTC
What is the pmac gen? You can either attach /proc/cpuinfo or you can post the output of 'grep pmac-generation /proc/cpuinfo'.

Comment 6 Ronald Maas 2013-06-21 06:34:15 UTC
Changing the line allows me to run Anaconda in text mode (using boot arguments 'text rd.break'). Running Anaconda in graphical mode displays a checkerboard like pattern and is unusable (probably an unrelated issue).

Will try VNC mode in the week-end

cat /proc/cpuinfo
processor:      : 0
cpu             : PPC970MP, altivec supported
clock           : 1000.000000MHz
revision        : 1.0 (pvr 0044 0100)

processor:      : 1
cpu             : PPC970MP, altivec supported
clock           : 1000.000000MHz
revision        : 1.0 (pvr 0044 0100)

timebase        : 33333333
platform        : PowerMac
model           : PowerMac11,2
machine         : PowerMac11,2
motherboard     : PowerMac11,2 MacRISC4 Power Macintosh
detected as     : 337 (PowerMac G5 Dual Core)
pmac flags      : 00000000
L2 cache        : 1024K unified
pmac-generation : NewWorld

Comment 7 Mark Hamzy 2013-06-21 14:12:18 UTC
Hey Ronald,

Can you perform another test for me, please?  Edit

/usr/lib/python2.7/site-packages/blivet/arch.py

and add

'PowerMac' : 'PMac'

to the end of the

ppcType = {

dictionary (at line 86) in the function getPPCMachine().  (Don't forget to add a comma on the line above.)  We believe this should fix your issue.

Comment 8 Ronald Maas 2013-06-21 15:34:33 UTC
Hi Mark,

Suggested code change did not work. Did some more digging and found out problem was caused by a bug in arch.getPPCMacGen()

I changed the following lines in getPPCMacGen()

  for _type in pmacGen:
    if _type in gen:
      return type

to

  for _type in pmacGen:
    if gen.find(_type) != -1:
      return _type

And that solved the issue. Anaconda is starting successfully in text mode.

Comment 9 David Lehman 2013-06-21 15:45:27 UTC
(In reply to Ronald Maas from comment #8)
> Suggested code change did not work. Did some more digging and found out
> problem was caused by a bug in arch.getPPCMacGen()
> 
> I changed the following lines in getPPCMacGen()
> 
>   for _type in pmacGen:
>     if _type in gen:
>       return type
> 
> to
> 
>   for _type in pmacGen:
>     if gen.find(_type) != -1:
>       return _type
> 
> And that solved the issue. Anaconda is starting successfully in text mode.

The part that matters is s/type/_type/ in the return statement -- '_type in gen' is functionally identical to 'gen.find(_type) != -1'.

Are you saying that this works in combination with Mark's suggested change or instead of it?

Comment 10 Ronald Maas 2013-06-21 16:12:19 UTC
Instead of it.

I tried Mark's suggested change, but that made no difference as arch.getPPCMachine() already worked correctly with the original ppcType dictionary.

Comment 11 Mark Hamzy 2013-06-21 19:47:48 UTC
So type is a function/keyword. See: http://www.cafepy.com/article/python_types_and_objects/python_types_and_objects.html

It looks like, while you platform name is 'PowerMac,' 'Mac' is enough to match it.  So, I think the only change necessary is to return the variable _type rather than the type 'type.'

Comment 12 Mark Hamzy 2013-06-21 20:21:26 UTC
Ronald,

Can you test with the following?

diff --git a/blivet/arch.py b/blivet/arch.py
index d4ffc7b..12cb30d 100644
--- a/blivet/arch.py
+++ b/blivet/arch.py
@@ -63,6 +63,7 @@ def getPPCMachine():
     platform = None

     # ppc machine hash
+    # Note: This is a substring match!
     ppcType = { 'Mac'      : 'PMac',
                 'Book'     : 'PMac',
                 'CHRP IBM' : 'pSeries',
@@ -133,6 +134,7 @@ def getPPCMacID():
 # @return The powermac generation, or 0 if not powermac.
 def getPPCMacGen():
     # XXX: should NuBus be here?
+    # Note: This is a substring match!
     pmacGen = ['OldWorld', 'NewWorld', 'NuBus']

     if not isPPC():
@@ -154,7 +156,7 @@ def getPPCMacGen():

     for _type in pmacGen:
       if _type in gen:
-          return type
+          return _type

     log.warning("Unknown Power Mac generation: %s" %(gen,))
     return 0

BTW, you can ignore the comment additions.  Just the one change at line 157. This is what I will post to the devel list.  Being that we are close to GA, I don't want to make riskier changes when I rewrite it.

Comment 13 Ronald Maas 2013-06-21 23:42:35 UTC
Mark,

I changed line 157 to

    return _type

and Anaconda started successfully.

Thanks all for your help to get this fixed.

Comment 14 Ronald Maas 2013-06-21 23:46:35 UTC
Mark,

I rebooted the G5 and except for the code change suggested by you in line 157 of arch.py, no other changes were done to the Anaconda scripts.

Comment 16 Mark Hamzy 2013-06-22 20:15:22 UTC
Proposing this as a FinalFreezeException.  This increases the supported machines installable by anaconda.

Comment 17 Adam Williamson 2013-06-24 18:57:44 UTC
Discussed at 2013-06-24 freeze exception review meeting: http://meetbot.fedoraproject.org/fedora-blocker-review/2013-06-24/f19final-blocker-review-8.2013-06-24-16.00.log.txt . Accepted as an FE issue: the fix looks safe and only in PPC code (so can't break any primary arches), and this slightly improves our PPC machine support, can't be fixed post-release.

Comment 18 Fedora Update System 2013-06-24 22:03:27 UTC
anaconda-19.30.10-1.fc19, python-blivet-0.17-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/python-blivet-0.17-1.fc19,anaconda-19.30.10-1.fc19

Comment 19 Fedora Update System 2013-06-25 21:18:00 UTC
Package python-blivet-0.17-1.fc19, anaconda-19.30.11-1.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing python-blivet-0.17-1.fc19 anaconda-19.30.11-1.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-11679/python-blivet-0.17-1.fc19,anaconda-19.30.11-1.fc19
then log in and leave karma (feedback).

Comment 20 Fedora Update System 2013-06-26 17:10:56 UTC
Package python-blivet-0.17-1.fc19, anaconda-19.30.12-1.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing python-blivet-0.17-1.fc19 anaconda-19.30.12-1.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-11679/python-blivet-0.17-1.fc19,anaconda-19.30.12-1.fc19
then log in and leave karma (feedback).

Comment 21 Fedora Update System 2013-06-28 07:18:10 UTC
python-blivet-0.17-1.fc19, anaconda-19.30.13-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.