Computing upgrades can take an unlimited amount of time without any user interaction

Bug #245344 reported by Rehan Khan
30
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Smart Package Manager
In Progress
High
Unassigned

Bug Description

Imported: http://tracker.labix.org/issue80

Reason: Feature request

further details: https://blueprints.launchpad.net/smart/+spec/bug-reporting-migration

msg902 (view) Author: tromer Date: 2006-11-08.12:08:40

Is trade off still an issue, with 0.50rc1? It's easier to implement now, but
less useful.

msg900 (view) Author: netmask Date: 2006-11-08.10:32:17

tromer, I guess this request is directly influenced by your patch set
implemented on 0.50rc1.

msg229 (view) Author: lb Date: 2006-01-12.15:41:43

Currently computing Smart upgrades may take an unlimited amount time, and Smart
doesn't interact in any way with the user, appearing frozen.

Smart should be changed to provide user feedback on upgrade computation, and
possibly algorithms should be changed so that they can trade off time spent with
decision quality.

Related branches

Revision history for this message
Rehan Khan (rasker) wrote :

I believe that this is is an important request. From a user standpoint no feedback = it's broken. Thinking deeply for a long time is forgivable as long as Smart tells you what it is doing.

Changed in smart:
importance: Undecided → High
Revision history for this message
Glenn D. (doiggl-hotmail) wrote :

I agree with the previous comment.
Maybe something be written to a text file during the calculation phase indicating progress is being made.

Revision history for this message
Glenn D. (doiggl-hotmail) wrote :

Perhaps try a later version of smart something newer than 0.50rc1 as used in the request, parhaps try 1.2 of Smart

http://lists.labix.org/pipermail/smart-labix.org/2009-March/003875.html

Revision history for this message
boris (bb-kernelpanic) wrote :

I've just tried 1.2+ versions, and have same "Computing transaction..." hang.

You can find strace output here:
http://kernelpanic.ru/smart-strace.txt

Please, tell me, how can I help more to debug this issue?

Revision history for this message
Antenore Gatta (antenore) wrote :

Same problem here.

If I can help with traces let me know.

Thanks
Antenore

Revision history for this message
Glenn D. (doiggl-hotmail) wrote :

Perhaps choose to do a few at a time
List possible upgrades

# smart upgrade '*kde*' --urls
Loading cache...
Updating cache... ########################################################################## [100%]

Computing transaction...
/media/disk/rpms/mozilla-xulrunner191-gnomevfs-1.9.1.4_1.9.1.6-2.1.2_1.1.1.x86_64.delta.rpm
/media/disk/rpms/MozillaFirefox-3.5.4_3.5.6-1.1.2_1.1.1.x86_64.delta.rpm
/media/disk/rpms/mozilla-xulrunner191-kde4-0.6-0.1.1.x86_64.rpm

Then do the upgrade
# smart upgrade '*kde*' -y
Cheers
Glenn

Revision history for this message
boris (bb-kernelpanic) wrote :

Looks like nobody cares :(

Changed in smart:
milestone: none → 1.4
Revision history for this message
BBlack (metzench) wrote :

Working for me with 1.3, after revison 865 and 866 its the same procedure here....

Revision history for this message
Antenore Gatta (antenore) wrote :

I still have the same issue (I'm using the 988). Should I use another revision?

Thanks
Antenore

Revision history for this message
Glenn D. (doiggl-hotmail) wrote :

- upgrade to the last stable release of smart e.g
# rpm -qa | grep -i smart- | sort
smart-1.3-22.1.x86_64
smart-gui-1.3-22.1.x86_64
smart-ksmarttray-1.3-22.1.x86_64

- next list all the existing channels
# smart channel --show

[kde4-latest]
type = rpm-md
name = kde4-latest
baseurl = http://download.opensuse.org/repositories/KDE:/Distro:/Factory/openSUSE_11.3/

[xine]
type = rpm-md
name = xine
baseurl = /media/disk/xine-ui/rpms/

- next exit smart
- next backup smart metadata
# tar -tvf /smart.tar /var/lib/smart

- remove existing smart data and start with new metadata
# rm -rfv /var/lib/smart
# md /var/lib/smart

- next add channel definitions to a text file e.g. channels.txt
[kde4-latest]
type = rpm-md
name = kde4-latest
baseurl = http://download.opensuse.org/repositories/KDE:/Distro:/Factory/openSUSE_11.3/

[xine]
type = rpm-md
name = xine
baseurl = /media/disk/xine-ui/rpms/

-next add these channels to smart

# cat channels.txt
[kde4-latest]
type = rpm-md
name = kde4-latest
baseurl = http://download.opensuse.org/repositories/KDE:/Distro:/Factory/openSUSE_11.3/

[xine]
type = rpm-md
name = xine
baseurl = /media/disk/xine-ui/rpms/

# smart channel --add channels.txt

Alias: kde4-latest
Type: rpm-md
Name: kde4-latest
Base URL: http://download.opensuse.org/repositories/KDE:/Distro:/Factory/openSUSE_11.3/

Include this channel? (y/N): y

Alias: xine
Type: rpm-md
Name: xine
Base URL: /media/disk/xine-ui/rpms/

Include this channel? (y/N): y

- update channels
#smart update

- list upgradeable packades
 # smart upgrade --urls
Loading cache...
Updating cache... ################################################################################################# [100%]

Computing transaction...
/media/disk/opensuse/11.3/rpms/binutils-2.20.0-7.21.x86_64.rpm
http://download.opensuse.org/repositories/KDE:/Distro:/Factory/openSUSE_11.3/x86_64/marble-4.5.0-147.1.x86_64.rpm

- do upgrade

Perhaps choose to do a few at a time
List possible upgrades

# smart upgrade '*kde*' --urls
Loading cache...
Updating cache... ########################################################################## [100%]

Computing transaction...
/media/disk/rpms/mozilla-xulrunner191-gnomevfs-1.9.1.4_1.9.1.6-2.1.2_1.1.1.x86_64.delta.rpm
/media/disk/rpms/MozillaFirefox-3.5.4_3.5.6-1.1.2_1.1.1.x86_64.delta.rpm
/media/disk/rpms/mozilla-xulrunner191-kde4-0.6-0.1.1.x86_64.rpm

Then do the upgrade ,
# smart upgrade '*kde*' --stepped
Cheers
Glenn

Revision history for this message
Antenore Gatta (antenore) wrote : Re: [Bug 245344] Re: Computing upgrades can take an unlimited amount of time without any user interaction

Thanks a lot for the help.

I just executed the "smart upgrade 'some packages" --urls and --stepped" and
then

smart upgrade --urls
smart upgrade --stepped

This worked like a charm

Thanks a lot again
Antenore.

On Wed, Aug 11, 2010 at 11:59 AM, Glenn D. <email address hidden> wrote:

> - upgrade to the last stable release of smart e.g
> # rpm -qa | grep -i smart- | sort
> smart-1.3-22.1.x86_64
> smart-gui-1.3-22.1.x86_64
> smart-ksmarttray-1.3-22.1.x86_64
>
> - next list all the existing channels
> # smart channel --show
>
> [kde4-latest]
> type = rpm-md
> name = kde4-latest
> baseurl =
> http://download.opensuse.org/repositories/KDE:/Distro:/Factory/openSUSE_11.3/
>
> [xine]
> type = rpm-md
> name = xine
> baseurl = /media/disk/xine-ui/rpms/
>
>
> - next exit smart
> - next backup smart metadata
> # tar -tvf /smart.tar /var/lib/smart
>
>
> - remove existing smart data and start with new metadata
> # rm -rfv /var/lib/smart
> # md /var/lib/smart
>
> - next add channel definitions to a text file e.g. channels.txt
> [kde4-latest]
> type = rpm-md
> name = kde4-latest
> baseurl =
> http://download.opensuse.org/repositories/KDE:/Distro:/Factory/openSUSE_11.3/
>
> [xine]
> type = rpm-md
> name = xine
> baseurl = /media/disk/xine-ui/rpms/
>
>
> -next add these channels to smart
>
> # cat channels.txt
> [kde4-latest]
> type = rpm-md
> name = kde4-latest
> baseurl =
> http://download.opensuse.org/repositories/KDE:/Distro:/Factory/openSUSE_11.3/
>
> [xine]
> type = rpm-md
> name = xine
> baseurl = /media/disk/xine-ui/rpms/
>
> # smart channel --add channels.txt
>
> Alias: kde4-latest
> Type: rpm-md
> Name: kde4-latest
> Base URL:
> http://download.opensuse.org/repositories/KDE:/Distro:/Factory/openSUSE_11.3/
>
> Include this channel? (y/N): y
>
>
> Alias: xine
> Type: rpm-md
> Name: xine
> Base URL: /media/disk/xine-ui/rpms/
>
> Include this channel? (y/N): y
>
> - update channels
> #smart update
>
> - list upgradeable packades
> # smart upgrade --urls
> Loading cache...
> Updating cache...
> #################################################################################################
> [100%]
>
> Computing transaction...
> /media/disk/opensuse/11.3/rpms/binutils-2.20.0-7.21.x86_64.rpm
>
> http://download.opensuse.org/repositories/KDE:/Distro:/Factory/openSUSE_11.3/x86_64/marble-4.5.0-147.1.x86_64.rpm
>
> - do upgrade
>
>
> Perhaps choose to do a few at a time
> List possible upgrades
>
> # smart upgrade '*kde*' --urls
> Loading cache...
> Updating cache...
> ##########################################################################
> [100%]
>
> Computing transaction...
>
> /media/disk/rpms/mozilla-xulrunner191-gnomevfs-1.9.1.4_1.9.1.6-2.1.2_1.1.1.x86_64.delta.rpm
> /media/disk/rpms/MozillaFirefox-3.5.4_3.5.6-1.1.2_1.1.1.x86_64.delta.rpm
> /media/disk/rpms/mozilla-xulrunner191-kde4-0.6-0.1.1.x86_64.rpm
>
> Then do the upgrade ,
> # smart upgrade '*kde*' --stepped
> Cheers
> Glenn
>
> --
> Computing upgrades can take an unlimited amount of time without any user
> interaction
> https://bugs.launchpad.net/bugs/245344
> You received this bug notification because you are subscribed to Smart
> Package Manager.
>

Revision history for this message
Alexei Moisseev (amois) wrote :

These deep cycles in transaction.py cause the bug (in attach). Can these cycles be simplified?

Revision history for this message
Alexei Moisseev (amois) wrote :

I found the problem. Patch is attached.

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

Can someone please paste their channels configuration, right after finding this problem?

Changed in smart:
milestone: 1.4 → none
Revision history for this message
Glenn D. (doiggl-hotmail) wrote :

Hello,
I reproduced the wait time with the following
- new install opensuse 11.4 -64 bit edition. [1]
- Add channels see [2]
- # smart update
- # smart upgrade --urls
- # smart upgrade

-Glenn

[1] dvd
http://opensuse.mirror.aussiehq.net.au/distribution/11.4/iso/openSUSE-11.4-DVD-x86_64.iso

[2]channel listing:-

[11.4oss]
type = yast2
name = 11.4oss
baseurl = http://opensuse.mirror.aussiehq.net.au/distribution/11.4/repo/oss/

[rpm-sys]
type = rpm-sys
name = RPM System

[11.4nonoss]
type = yast2
name = 11.4nonoss
baseurl = http://opensuse.mirror.aussiehq.net.au/distribution/11.4/repo/non-oss/

[kde463]
type = rpm-md
name = kde463
baseurl = http://ftp5.gwdg.de/pub/opensuse/repositories/KDE:/Release:/46/openSUSE_11.4/

[deb-sys]
type = deb-sys
name = DEB System

[11.4updates]
type = rpm-md
name = 11.4updates
baseurl = http://opensuse.mirror.aussiehq.net.au/update/11.4/

Revision history for this message
Glenn D. (doiggl-hotmail) wrote :

Hello
Another example where Smart 'Computing transaction' takes a long time to complete.
Can the time taken be reduced any with the assistance of multitiple-core-cpus in use now days ?
For example on a 3-core processor, 1 core shows 99% usage, the other 2 cores show less than 5% used.
Could smart calculate the total number available and use them all to to make the calculations and reduce the time taken ?
In this case 'Computing transaction' took the following time to complete:

# time smart upgrade --urls
real 36m17.100s
user 35m38.818s
sys 0m33.370s

See [1] for more detail.

Thanks Glenn

[1]
# smart channel --show

[rpm-sys]
type = rpm-sys
name = RPM System

[opensuse]
type = yast2
name = openSUSE Factory
baseurl = http://ftp5.gwdg.de/pub/opensuse/factory/repo/oss

[opensuse-nonoss]
type = yast2
name = openSUSE Factory NON-OSS
baseurl = http://ftp5.gwdg.de/pub/opensuse/factory/repo/non-oss

# time smart upgrade --urls
Loading cache...
Updating cache... ######################################## [100%]

Computing transaction...

http://ftp5.gwdg.de/pub/opensuse/factory/repo/oss/suse/x86_64/lxsession-edit-0.2.0-17.3.x86_64.rpm
.[2322 more url references here]
http://ftp5.gwdg.de/pub/opensuse/factory/repo/oss/suse/x86_64/epiphany-3.1.91.1-1.1.x86_64.rpm

real 36m17.100s
user 35m38.818s
sys 0m33.370s

Revision history for this message
Christian Tosta (tosta) wrote :

I'm suffering this problem in 1.4.1. Was applied this patch and seems working.

Revision history for this message
Christian Tosta (tosta) wrote :

Hum... seems now smart can't mark upgraded packages for removal. :-(
I'll continue working on patch.

Revision history for this message
Christian Tosta (tosta) wrote :

Now the correct patch. Please give it a try.

Revision history for this message
Christian Tosta (tosta) wrote :

Patch for bug 992826 extends patch for this bug.

Revision history for this message
Christian Tosta (tosta) wrote :

Patch updated.

Revision history for this message
Christian Tosta (tosta) wrote :

Is there someone alive here?

I'm for some time trying to handle this bug and I can see it's related to def _pending defined in transaction.py. For some unknown reason, the function is called indefinitely and Smart can't finish dependency resolution. I tried to handle this by defining a "pendingbefore" data structure where I register the pending packages already processed. When a item is in "pendingbefore" the while loop will be broken until "pending" having no new items. But in large updates I found problems with conflict messages between a package and some of your dependencies, which had to be resolved by Smart.

-------
    self._pendingbefore = []

    (...)

    def _pending(self, changeset, locked, pending, depth=0):
        #print "[%03d] _pending()" % depth
        #depth += 1

        isinst = changeset.installed
        getweight = self._policy.getWeight

        updown = []
        while pending:
            item = pending.pop(0)
            if item in self._pendingbefore:
                break
            else:
                self._pendingbefore.append(item)
            kind = item[0]
            if kind == PENDING_UPDOWN:

-------

Changed in smart:
status: New → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.