[Bug 1579712] Re: Refresh hangs indefinitely, appstreamcli using 100% CPU

fubuntu EJmHW1Ui57c6Fgdo at mailinator.com
Fri May 20 06:55:53 UTC 2016


It took quite some time for me to find this solution.  When the average
user starts googling this, they are going to find all sorts of things
which do not apply, for example:

http://itsfoss.com/fix-update-errors-ubuntu-1404/
https://askubuntu.com/questions/615203/software-updates-stuck-downloading-after-15-04-upgrade

What a nightmare!  This demonstrates why the system update utility needs
to include a twitter-type client to inform the user of emerging issues
related to broken update functionality.  How else will the average user
cope with a new issue like this, when there are so many possible causes
for the same type of problem?

Yes I know, it poses the question of who should have the authority to
broadcast alerts.  Perhaps a majority vote by a jury of lead developers
or team managers who could activate the feature by signing a proposed
broadcast message with their PGP key.  Moderators of the forum or the
bug tracker would then submit proposals for broadcast messages to a
mailing list that goes to the jury.  This would eliminate the
possibility of using the broadcast system for spam.

In any case, the manual fix in the description is not sufficiently clear: many people who are capable of typing terminal commands will not know to replace 'amd64' with 'i386' or whatever is appropriate.  A script which automates this might be a better solution.
_____

@neil.mayhew

> I'm not sure what happens if someone is using Synaptic or Gnome
Software. I assume it would be necessary to use System Monitor to kill
off appstreamcli.

@olliniem

> forever inactive window with no possibility to interfere

Best quick recovery method is to launch 'top' in terminal & kill that
process ID.  It does affect Software Center, Software Updater, adding
PPA's, et cetera.

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1579712

Title:
  Refresh hangs indefinitely, appstreamcli using 100% CPU

Status in appstream package in Ubuntu:
  Fix Released
Status in appstream source package in Xenial:
  Fix Committed

Bug description:
  [Impact]

   * The cache refresh is blocked on a strdup on a non-NULL-terminated string in some very rare occasions (very rare because this bug is present for almost 3y without a single report).
   * Fixing this bug resolves the issue for people who might experience it.
   * See https://github.com/ximion/appstream/issues/35 for details.

  [Test Case 1]

   * Run `sudo appstreamcli refresh --force`
   * The AppStream cache should be updated, no change in behavior should be seen.

  [Test Case 2]

   * In case you were experiencing the almost-infinite hang when running
  `sudo appstreamcli refresh --force`, this issue should be fixed with
  the SRU.

  [Regression Potential]

   * Very low, since this only fixes the decompression code. There
  should be no sideeffects of that (given that the patch itself doesn't
  break anything, which it shouldn't, since it has been tested upstream
  for a while)

  [Other Info]

   * This fix has been applied upstream: https://github.com/ximion/appstream/commit/f33c520c37e2ba51d92402220250b8d501a2bf43
   * A smaller version of the patch (one-liner) is available, at the expense of not having reduced memory usage: https://github.com/ximion/appstream/commit/378941787d3584b3eb31a6ebe40e0aacc10e180a

  ####

  /!\ Installing the bugfix from xenial-proposed, without going through APT:
  To install the fixed packages manually, please execute the following commands (for amd64, adjust URLs for other architectures):

  ```
  cd /tmp && mkdir asfix
  cd asfix
  wget https://launchpad.net/ubuntu/+archive/primary/+files/appstream_0.9.4-1ubuntu1_amd64.deb
  wget https://launchpad.net/ubuntu/+archive/primary/+files/libappstream3_0.9.4-1ubuntu1_amd64.deb
  sudo dpkg -i libappstream3*.deb
  sudo dpkg -i appstream*.deb
  ```

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/appstream/+bug/1579712/+subscriptions



More information about the Ubuntu-sponsors mailing list