Bug 526208 - preupgrade failed from old release(f10, f11)
Summary: preupgrade failed from old release(f10, f11)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: preupgrade
Version: 11
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Will Woods
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F12Beta, F12BetaBlocker
TreeView+ depends on / blocked
 
Reported: 2009-09-29 10:06 UTC by He Rui
Modified: 2014-01-21 23:11 UTC (History)
5 users (show)

Fixed In Version: 1.1.2-1.fc11
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-11-04 12:28:06 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
preupgrade hangs there (335.91 KB, image/png)
2009-09-29 10:06 UTC, He Rui
no flags Details
.xsession-errors (124.84 KB, image/png)
2009-09-30 09:04 UTC, He Rui
no flags Details
xsession-errors on real pc (1.90 KB, text/plain)
2009-09-30 10:24 UTC, He Rui
no flags Details
hang at download release info (29.79 KB, image/png)
2009-10-12 02:31 UTC, He Rui
no flags Details

Description He Rui 2009-09-29 10:06:34 UTC
Created attachment 362980 [details]
preupgrade hangs there

Description of problem:
install old release and upgrade system by preupgrade.
Then preupgrade hanged at finishing up.

Version-Release number of selected component (if applicable):
anaconda 10.30
F12-beta-tc

How reproducible:
100%

Steps to Reproduce:
https://fedoraproject.org/wiki/QA:Testcase_Preupgrade
  
Actual results:
pls see attachment

Comment 1 Will Woods 2009-09-29 14:38:22 UTC
Could you try to get the traceback that shows the cause of this hang? Either check ~/.xsession-errors for error messages, or run preupgrade again from a terminal to see the log output.

Comment 2 He Rui 2009-09-30 09:04:28 UTC
Created attachment 363155 [details]
.xsession-errors

Comment 3 He Rui 2009-09-30 09:14:28 UTC
I also found out that: when preupgrade hanged, i tried to ping, but the network is disconnected.

Comment 4 He Rui 2009-09-30 10:24:02 UTC
Created attachment 363167 [details]
xsession-errors on real pc

This time I tested it on a real pc, when preupgrade hanged at 'finishing up', the network connected normally. (But when it happened in virtual machine, the network was broken down.)

Comment 5 Will Woods 2009-10-02 16:35:27 UTC
Okay, this is pretty strange. I ran 'preupgrade' from a terminal and as far as I can tell preupgrade is working fine but *not updating the interface* after you choose the release and hit "apply". 

The log messages show it downloading all the packages, generating metadata, and updating the bootloader, but the interface never changes - until you hit the final step, at which point the "Reboot Now" button appears as expected.

What screen was it hung on? How long did you wait?

Comment 6 seth vidal 2009-10-05 18:55:34 UTC
are you running on an x86_64 system?

Comment 7 seth vidal 2009-10-05 21:01:14 UTC
I did some more tests on my kvm system trying to figure out under what conditions this happens.

If I F11-GA it doesn't happen.

So I updated rpm, yum, python and pygtk2 and it still didn't happen.

So I did a complete F11 update and then it started happening.

So I rolled back gtk2 and gtk2-nodoka-engine to the versions from GA and it stopped happening.

CCing the gtk2 maintainer to see if he can offer any suggestions on what might have changed and how to fix it.

Comment 8 seth vidal 2009-10-05 21:07:28 UTC
adding the pygtk2 maintainer, as well to see if he can help.

Comment 9 Will Woods 2009-10-06 17:44:23 UTC
Confirmed - I can trigger the bug solely by upgrading from gtk2-2.16.1-4.fc11.x86_64 (F11 GA) to gtk2-2.16.6-2.fc11.x86_64 (F11 updates).

Clearing needinfo, since we have a reproducer now.

Comment 10 seth vidal 2009-10-08 19:10:37 UTC
After talking with Will - reassigning this to gtk2.

Comment 11 Matthias Clasen 2009-10-08 19:43:06 UTC
I recommend rewriting it to use a proper main loop.

Comment 12 Will Woods 2009-10-08 20:00:12 UTC
I'm not totally sure what to make of this suggestion. AFAIK it's using a proper mainloop:

if __name__ == "__main__":
    if os.getuid() == 0:
        widgets = PreUpgradeGtk()
        gtk.main()

and some unknown change in gtk2 caused previously-working code to mess up.

Now, the problem happens in a place where we're basically in a very long-running callback handler. So maybe you're saying I need to rewrite PreUpgradeGtk's main_preupgrade() to actually yield control back to the mainloop rather than just doing gtk.main_iteration() manually? Is gtk.main_iteration() now disabled or something?

If that's the case - how is that usually accomplished? Would I break up my Very Long Callback into a bunch of smaller callbacks and... have each of them emit a custom signal at completion, which would trigger the next part?

Comment 13 Matthias Clasen 2009-10-08 20:40:52 UTC
Maybe I shouldn't comment on this at all; I clearly can't even read python code well enough to find the mainloop.

Comment 14 Will Woods 2009-10-09 21:18:53 UTC
I think I figured out the problem - I think GtkAssistant now sends out the signal for on_assistant_apply *before* the implicit page-flip, rather than flipping the page first.

If you hit the button twice it'll flip to the progress page - the second time we ignore the signal and return, and then the implicit page-flip happens and everything is OK.

Should be fixed in preupgrade-1.1.1, which is building now.

Comment 15 Matthias Clasen 2009-10-10 00:00:25 UTC
Great that you tracked that down. And yes, this change in behavior did happen and was intentional, see https://bugzilla.gnome.org/show_bug.cgi?id=589745

Comment 16 Eryu Guan 2009-10-10 12:22:41 UTC
I got the same error.

uname -a
Linux localhost.localdomain 2.6.27.5-117.fc10.x86_64 #1 SMP Tue Nov 18 11:58:53 EST 2008 x86_64 x86_64 x86_64 GNU/Linux

I started preupgrade from terminal, below is the output
guaneryu@localhost:~$ sudo preupgrade
[sudo] password for guaneryu: 
/usr/lib/python2.5/site-packages/yum/__init__.py:181: UserWarning: Use .preconf instead of passing args to _getConfig
  warnings.warn('Use .preconf instead of passing args to _getConfig')
Loaded plugins: blacklist, refresh-packagekit, whiteout
Detected in-progress upgrade to Rawhide
Clearing data from upgrade to Rawhide
preupgrade (baseurl) 
  url: http://fake.url/preupgrade
  now: http://fake.url/preupgrade
preupgrade (mirrorlist) 
  url: http://mirrors.fedoraproject.org/mirrorlist?repo=rawhide&arch=$basearch
  now: http://mirrors.fedoraproject.org/mirrorlist?repo=rawhide&arch=x86_64
Fetched treeinfo from http://ftp.riken.jp/Linux/fedora/development/x86_64/os//.treeinfo
treeinfo timestamp: Fri Oct  9 23:26:43 2009
Downloading 663.3MB
Available disk space for /var/cache/yum/preupgrade: 43.5GB
Upgrade requires 500.0MB
Available disk space for /usr: 42.8GB
Generating metadata for preupgrade repo
/usr/lib64/python2.5/site-packages/sqlitecachec.py:45: Warning: GError set over the top of a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
The overwriting error message was: Parsing primary.xml error: Specification mandate value for attribute Saslauthd

  self.repoid))
/usr/lib64/python2.5/site-packages/sqlitecachec.py:45: Warning: GError set over the top of a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
The overwriting error message was: Parsing primary.xml error: attributes construct error

  self.repoid))
/usr/lib64/python2.5/site-packages/sqlitecachec.py:45: Warning: GError set over the top of a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
The overwriting error message was: Parsing primary.xml error: error parsing attribute name

  self.repoid))
/usr/lib64/python2.5/site-packages/sqlitecachec.py:45: Warning: GError set over the top of a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
The overwriting error message was: Parsing primary.xml error: xmlParseStartTag: problem parsing attributes

  self.repoid))
/usr/lib64/python2.5/site-packages/sqlitecachec.py:45: Warning: GError set over the top of a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
The overwriting error message was: Parsing primary.xml error: Couldn't find end of Start Tag rpm:entry line 14136

  self.repoid))
/usr/lib64/python2.5/site-packages/sqlitecachec.py:45: Warning: GError set over the top of a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
The overwriting error message was: Parsing primary.xml error: Couldn't find end of Start Tag rpm:entry line 14138

  self.repoid))
/usr/lib64/python2.5/site-packages/sqlitecachec.py:45: Warning: GError set over the top of a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
The overwriting error message was: Parsing primary.xml error: Couldn't find end of Start Tag rpm:entry line 79829

  self.repoid))
/usr/lib64/python2.5/site-packages/sqlitecachec.py:45: Warning: GError set over the top of a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
The overwriting error message was: Parsing primary.xml error: Couldn't find end of Start Tag rpm:entry line 79831

  self.repoid))
Traceback (most recent call last):
  File "/usr/share/preupgrade/preupgrade-gtk.py", line 238, in on_assistant_apply
    self._do_main()
  File "/usr/share/preupgrade/preupgrade-gtk.py", line 257, in _do_main
    self.main_preupgrade()
  File "/usr/share/preupgrade/preupgrade-gtk.py", line 545, in main_preupgrade
    callback=MDGenCallback(pbar=self.progress))
  File "/usr/lib/python2.5/site-packages/preupgrade/__init__.py", line 651, in generate_repo
    misc.generate_repodata(dir,comps,callback)
  File "/usr/lib/python2.5/site-packages/preupgrade/misc.py", line 131, in generate_repodata
    generate_repodata(dir, comps, callback)
  File "/usr/lib/python2.5/site-packages/preupgrade/misc.py", line 148, in generate_repodata_f9
    mdgen.doRepoMetadata()
  File "/usr/lib/python2.5/site-packages/createrepo/__init__.py", line 829, in doRepoMetadata
    rp.getPrimary(complete_path, csum)
  File "/usr/lib64/python2.5/site-packages/sqlitecachec.py", line 45, in getPrimary
    self.repoid))
TypeError: Parsing primary.xml error: attributes construct error

Comment 17 He Rui 2009-10-12 02:31:53 UTC
Created attachment 364409 [details]
hang at download release info

I installed preupgrade-1.1.1-1.fc11 from koji and ran it on my f11 machine. 
But the upgrade hung at the begining of Download release info.
Below is the info at console and in xsession-errors:

[root@localhost Download]# preupgrade 
/usr/lib/python2.6/site-packages/yum/__init__.py:181: UserWarning: Use .preconf instead of passing args to _getConfig
  warnings.warn('Use .preconf instead of passing args to _getConfig')
Loaded plugins: blacklist, whiteout
Traceback (most recent call last):
  File "/usr/share/preupgrade/preupgrade-gtk.py", line 239, in on_assistant_apply
    self.ui.assistant.set_current.page(self.ui.page_num)
AttributeError: 'gtk.Assistant' object has no attribute 'set_current'



[root@localhost ~]# cat /home/hurry/.xsession-errors
imsettings information
==========================
Is DBus enabled: yes
Is imsettings enabled: yes
Is GTK+ supported: yes
Is Qt supported: no
DESKTOP_SESSION: gnome
DISABLE_IMSETTINGS: 
IMSETTINGS_DISABLE_DESKTOP_CHECK: 
DBUS_SESSION_BUS_ADDRESS: unix:abstract=/tmp/dbus-Mzdy70J7rw,guid=ceaece823cdda538bad65cb74ad258fc
GTK_IM_MODULE: 
QT_IM_MODULE: xim
XMODIFIERS: @im=none
IMSETTINGS_MODULE: none
IMSETTINGS_INTEGRATE_DESKTOP: yes

GNOME_KEYRING_SOCKET=/tmp/keyring-bStVtE/socket
SSH_AUTH_SOCK=/tmp/keyring-bStVtE/socket.ssh
Window manager warning: Failed to read saved session file /home/hurry/.config/metacity/sessions/105f6c7b41d881dd1c125529932510926200000020790022.ms: Failed to open file '/home/hurry/.config/metacity/sessions/105f6c7b41d881dd1c125529932510926200000020790022.ms': No such file or directory
** Message: NumLock remembering disabled because hostname is set to "localhost"
Initializing nautilus-gdu extension

** (nautilus:2241): WARNING **: Unable to add monitor: Not supported

Comment 18 seth vidal 2009-10-12 02:40:59 UTC
what version of gtk2 and pygtk2 do you have installed when you got that error?

Comment 19 He Rui 2009-10-12 04:32:23 UTC
The version I used was:


gtk2-2.16.1-4.fc11.x86_64
pygtk2-2.14.1-1.fc11.x86_64
gtk2-engines-2.18.1-1.fc11.x86_64

Then I update them to the followings through yum:

gtk2-2.16.6-2.fc11.x86_64
pygtk2-2.14.1-2.fc11.x86_64
gtk2-engines-2.18.2-1.fc11.x86_64

But the same error still happens.

Comment 20 Will Woods 2009-10-12 14:29:59 UTC
Augh. There was a typo in preupgrade-1.1.1. That'll teach me to try to push out fixes at 5pm on Friday.

There will be a fixed package shortly.

Comment 21 Will Woods 2009-10-12 19:47:12 UTC
Please try preupgrade-1.1.2:
  http://koji.fedoraproject.org/koji/buildinfo?buildID=136354
and report whether it works as expected.

Comment 22 He Rui 2009-10-13 02:53:06 UTC
WoW, I just tired preupgrade-1.1.2 in the link, the upgrade process worked fine and faster. But after the reboot, I noticed that the kernel version was 2.6.29.4-167.fc11.x86_64. Shouldn't it be updated to fc12?

Comment 23 He Rui 2009-10-13 07:14:44 UTC
(In reply to comment #22)
> WoW, I just tired preupgrade-1.1.2 in the link, the upgrade process worked fine
> and faster. But after the reboot, I noticed that the kernel version was
> 2.6.29.4-167.fc11.x86_64. Shouldn't it be updated to fc12?  

Oops, I see, it happened because the 'rawhide update' was not set to default for boot in grub.conf, so it just rebooted to my previous system again.

So I rebooted the system to 'rawhide update'. The automatic install worked fine and rebooted successfully to fedora 2.6.31.1-56.fc12.x86_64.

However, the usb keyboard and mouse doesn't work any more on this system. maybe it's related to Bug 528545.

https://bugzilla.redhat.com/show_bug.cgi?id=528545

Comment 24 seth vidal 2009-10-13 13:56:07 UTC
In reply to comment 23:

the problem you're having is unrelated to the issue in this bug. Please file another bug against the kernel or cc yourself on 528545.

Comment 25 Will Woods 2009-10-13 15:01:17 UTC
(In reply to comment #23)

The expected behavior for preupgrade is this:

After the downloads / metadata creation finish, you'll be presented with a screen with some text telling you to reboot to complete the upgrade, and a "Reboot" button in the middle. See this screenshot:
  http://fedoraproject.org/wiki/File:Features_PreUpgrade_5-complete.png

At this point, a new "Upgrade to Rawhide" boot entry has been created in the boot config, but the default has not been changed.

If you hit the Reboot button, your system will change the default and automatically boot into the upgrade. If you hit 'Close' or close the window, your system will *not* change the boot target, but "Upgrade to Rawhide" should be available.

Did you see this screen? Did you click Reboot?

If you didn't see the screen - what preupgrade package version were you using?

Comment 26 He Rui 2009-10-14 03:32:56 UTC
(In reply to comment #25) 
> Did you see this screen? Did you click Reboot?

Yes, I did click reboot on that screen. Since several other systems were installed at the same time on my pc, and the main grub was not in the updated f11 system, it came to previous system. That's not the package fault and sorry about the confusion.
    
So I retested it, the provided preupgrade-1.1.2 can download normally and reboot directly to the automatic install. the whole process works fine.

Comment 27 Fedora Update System 2009-10-14 19:26:49 UTC
preupgrade-1.1.2-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/preupgrade-1.1.2-1.fc11

Comment 28 James Laska 2009-10-15 17:37:49 UTC
Verified fix using preupgrade-1.1.2-1.fc11 on i386 and x86_64

Comment 29 Fedora Update System 2009-10-15 22:36:21 UTC
preupgrade-1.1.2-1.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update preupgrade'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-10523

Comment 30 Fedora Update System 2009-11-04 12:27:59 UTC
preupgrade-1.1.2-1.fc11 has been pushed to the Fedora 11 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.