Bug 706542

Summary: AttributeError: 'NoneType' object has no attribute 'rfind'
Product: [Fedora] Fedora Reporter: Andrew McNabb <amcnabb>
Component: anacondaAssignee: David Lehman <dlehman>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 15CC: danhbarnes, edgar.hoch, jeff, jhaney, jlaska, jonathan, joshua, lowe255-lnx, luc.lalonde, nitro3a, rdieter, rmarko, rzhou, vanmeeuwen+fedora
Target Milestone: ---Keywords: CommonBugs, Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: https://fedoraproject.org/wiki/Common_F15_bugs#attributeerror-nonetype
Fixed In Version: anaconda-16.9-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-07 15:26:21 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Attachments:
Description Flags
/tmp/anaconda-tb-MmYD91 none

Description Andrew McNabb 2011-05-20 17:17:19 EDT
In an installation using the Fedora 15 release candidate with anaconda 15.31, I'm getting the following traceback:

Traceback (most recent call first):
  File "/usr/lib64/python2.7/posixpath.py", line 112, in basename
    i = p.rfind('/') + 1
  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/formats/__init__.py", line 422, in majorminor
    device = dm_node_from_name(os.path.basename(self.device))
  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/formats/__init__.py", line 271, in cacheMajorminor
    self.majorminor # this does the caching
  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/devices.py", line 700, in _preTeardown
    self.format.cacheMajorminor()
  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/devices.py", line 714, in teardown
    if not self._preTeardown(recursive=recursive):
  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/devicetree.py", line 1868, in teardownAll
    device.teardown(recursive=True)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/packages.py", line 103, in turnOnFilesystems
    anaconda.storage.devicetree.teardownAll()
  File "/usr/lib64/python2.7/site-packages/pyanaconda/dispatch.py", line 211, in moveStep
    rc = stepFunc(self.anaconda)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/dispatch.py", line 130, in gotoNext
    self.moveStep()
  File "/usr/lib64/python2.7/site-packages/pyanaconda/gui.py", line 1346, in setScreen
    self.anaconda.dispatch.gotoNext()
  File "/usr/lib64/python2.7/site-packages/pyanaconda/gui.py", line 1476, in setup_window
    self.setScreen()
  File "/usr/lib64/python2.7/site-packages/pyanaconda/gui.py", line 1490, in run
    self.setup_window(False)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/gui.py", line 1221, in run
    self.icw.run()
  File "/usr/sbin/anaconda", line 925, in <module>
    anaconda.intf.run(anaconda)
AttributeError: 'NoneType' object has no attribute 'rfind'

Local variables in innermost frame:
p: None


I will attach the file /tmp/anaconda-tb-MmYD91.
Comment 1 Andrew McNabb 2011-05-20 17:18:14 EDT
Created attachment 500141 [details]
/tmp/anaconda-tb-MmYD91
Comment 2 Andrew McNabb 2011-05-23 19:48:00 EDT
Is there any other information I can provide that would be helpful?  Are there any suggested workarounds for this problem?  At the present, I seems that I am unable to install Fedora 15.
Comment 3 Lawrence Lowe 2011-05-24 12:29:48 EDT
I'm getting the same anaconda traceback as above, with the Fedora 15 64-bit release. I'm using a kickstart file too. For me the problem occurs shortly after the message "Examining devices".
Comment 4 Andrew McNabb 2011-05-24 14:56:36 EDT
*** Bug 707346 has been marked as a duplicate of this bug. ***
Comment 5 James Laska 2011-05-24 15:23:12 EDT
When the crash happens, instead of reporting the bug to bugzilla, can someone choose the 'Debug' option.  That will drop you into a python debug shell.  Once in the shell, please run the following commands and supply the output:

> up
> print self.device
Comment 6 Andrew McNabb 2011-05-24 15:37:33 EDT
The debug shell reports that self.device is None.
Comment 7 Andrew McNabb 2011-05-24 15:45:20 EDT
I also tried going up two more times and doing "print self", which gives a bunch of information about a PartitionDevice instance.  The PartitionDevice has a "name" of "sda1", a "format" which is an Ext3FS instance, and a "path" and "device" which are /dev/sda1.  I'm sure there's other more useful information, but this seemed like it might be helpful.
Comment 8 James Laska 2011-05-24 15:52:54 EDT
Can you describe the disk layout already on the system, please include appropriate command output.
Comment 9 Andrew McNabb 2011-05-24 15:55:16 EDT
amcnabb@sage:~ :) sudo sfdisk -l /dev/sda
[sudo] password for amcnabb: 

Disk /dev/sda: 77825 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sda1   *      0+     63-     64-    512000   83  Linux
/dev/sda2         63+   2613-   2550-  20480000   83  Linux
/dev/sda3       2613+   2874-    262-   2097152   82  Linux swap / Solaris
/dev/sda4       2874+  77825-  74951- 602041344   83  Linux
amcnabb@sage:~ :) mount |grep sda
/dev/sda2 on / type ext4 (rw,relatime,barrier=1,data=ordered)
/dev/sda1 on /boot type ext3 (rw,relatime,errors=continue,user_xattr,acl,barrier=0,data=ordered)
/dev/sda4 on /local type ext4 (rw,relatime,barrier=1,data=ordered)
/dev/sda2 on /tmp type ext4 (rw,relatime,barrier=1,data=ordered)
/dev/sda2 on /var/tmp type ext4 (rw,relatime,barrier=1,data=ordered)
amcnabb@sage:~ :)
Comment 10 James Laska 2011-05-24 16:03:50 EDT
(In reply to comment #9)
> amcnabb@sage:~ :) sudo sfdisk -l /dev/sda

What does `parted /dev/sda -s p` say?
Comment 11 Andrew McNabb 2011-05-24 16:06:37 EDT
amcnabb@sage:~ :( sudo parted /dev/sda -s p
[sudo] password for amcnabb: 
Model: ATA SAMSUNG HM640JJ (scsi)
Disk /dev/sda: 640GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system     Flags
 1      1049kB  525MB   524MB   primary  ext3            boot
 2      525MB   21.5GB  21.0GB  primary  ext4
 3      21.5GB  23.6GB  2147MB  primary  linux-swap(v1)
 4      23.6GB  640GB   616GB   primary  ext4

amcnabb@sage:~ :)
Comment 12 James Laska 2011-05-24 16:10:09 EDT
Excellent, thanks for the fast response Andrew!

(In reply to comment #7)
> I also tried going up two more times and doing "print self", which gives a
> bunch of information about a PartitionDevice instance.  The PartitionDevice has
> a "name" of "sda1", a "format" which is an Ext3FS instance, and a "path" and
> "device" which are /dev/sda1.  I'm sure there's other more useful information,
> but this seemed like it might be helpful.

in the debug session, when you are inspecting 'self.format' ... are you able to access the value for 'self.originalFormat'?
Comment 13 Andrew McNabb 2011-05-24 16:17:08 EDT
Yes, self.originalFormat has "type = ext3" and "device = /dev/sda1".  I've left it open, so I can look up any other information from this if needed.
Comment 14 David Lehman 2011-05-24 16:23:36 EDT
Please try adding 'updates=http://dlehman.fedorapeople.org/updates-706542.img' to your boot command line and see if that helps.
Comment 15 Andrew McNabb 2011-05-24 16:29:07 EDT
(In reply to comment #14)
> Please try adding 'updates=http://dlehman.fedorapeople.org/updates-706542.img'
> to your boot command line and see if that helps.

This seems to have fixed the problem.
Comment 16 David Lehman 2011-05-24 16:36:37 EDT
This is the patch contained in the updates image:

https://www.redhat.com/archives/anaconda-devel-list/2011-May/msg00234.html
Comment 17 Andrew McNabb 2011-05-24 17:19:59 EDT
Thank you for addressing the problem.  Is the updates image a permanent fix?  In other words, is this the best solution to share with others, and can I rely on the image being at this URL for the next year?
Comment 18 David Lehman 2011-05-24 17:33:34 EDT
The patch has not yet completed the review process, so I cannot say whether or not is permanent. You should not rely on that URL remaining valid for a year. Maybe jlaska has a place for that.
Comment 19 Lawrence Lowe 2011-05-25 05:00:05 EDT
Just for info, the problem hadn't occurred previously when installing f15 beta with the same disk layout and kickstart file. 

> Please try adding 'updates=http://dlehman.fedorapeople.org/updates-706542.img'
> to your boot command line and see if that helps.

This fixes the problem for me too. Thanks!
Comment 20 James Laska 2011-05-25 08:18:41 EDT
(In reply to comment #17)
> Thank you for addressing the problem.  Is the updates image a permanent fix? 
> In other words, is this the best solution to share with others, and can I rely
> on the image being at this URL for the next year?

Thanks for reporting and testing!  I'll document this issue shortly as a CommonBug.  I'm discussing with dlehman offline to understand more about the exact failure.
Comment 21 Chris Lumens 2011-05-25 19:27:30 EDT
*** Bug 707777 has been marked as a duplicate of this bug. ***
Comment 22 Chris Lumens 2011-05-25 19:27:38 EDT
*** Bug 707748 has been marked as a duplicate of this bug. ***
Comment 23 Ricky Zhou 2011-05-30 04:08:56 EDT
*** Bug 708933 has been marked as a duplicate of this bug. ***
Comment 24 David Lehman 2011-06-07 14:01:12 EDT
The patch from comment 16 has been applied to the upstream repository and is included in anaconda-16.9-1, so this will be fixed in F16.
Comment 25 Andrew McNabb 2011-06-07 14:09:07 EDT
Would you please post a permanent url for an updates image for Fedora 15 and add this to the common bugs page?  Thanks.
Comment 26 James Laska 2011-06-07 15:26:21 EDT
(In reply to comment #25)
> Would you please post a permanent url for an updates image for Fedora 15 and
> add this to the common bugs page?  Thanks.

I'm happy to do that ... with some idea for how to reproduce the issue.  I still have no idea why you are seeing this, or why I'm not able to reproduce the problem.  I'm not saying the issue doesn't exist, just that I don't know enough about it to document it in a sane manner for others.

However, we don't need to keep the bug in ASSIGNED until that documentation change is made.  I'm moving this back to CLOSED RAWHIDE.

I've drafted a *basic* reference to this issue on the wiki at https://fedoraproject.org/wiki/Common_F15_bugs#attributeerror-nonetype.  Feel free to adjust as needed.
Comment 27 Andrew McNabb 2011-06-07 15:35:52 EDT
(In reply to comment #26)
> 
> I'm happy to do that ... with some idea for how to reproduce the issue.  I
> still have no idea why you are seeing this, or why I'm not able to reproduce
> the problem.  I'm not saying the issue doesn't exist, just that I don't know
> enough about it to document it in a sane manner for others.

I think it might be kickstart-related, but I don't know for sure.

> I've drafted a *basic* reference to this issue on the wiki at
> https://fedoraproject.org/wiki/Common_F15_bugs#attributeerror-nonetype.  Feel
> free to adjust as needed.

I took a look at this description, and I think it's great.  Thanks!
Comment 28 Chris Lumens 2011-06-08 09:47:03 EDT
*** Bug 711655 has been marked as a duplicate of this bug. ***
Comment 29 Ales Kozumplik 2011-06-23 02:53:51 EDT
*** Bug 715471 has been marked as a duplicate of this bug. ***
Comment 30 Chris Lumens 2011-11-03 14:22:27 EDT
*** Bug 751085 has been marked as a duplicate of this bug. ***