g_atomic_ref_count_dec: assertion 'g_atomic_int_get (arc) > 0' failed

Bug #1785498 reported by Paul White on 2018-08-05
102
This bug affects 17 people
Affects Status Importance Assigned to Milestone
AppStream
Fix Released
Unknown
appstream (Debian)
Fix Released
Unknown
appstream (Ubuntu)
Undecided
Matthias Klumpp
glib2.0 (Ubuntu)
Undecided
Unassigned

Bug Description

When running

  sudo apt update

in a terminal I sometimes see the following message printed within the output.

  (appstreamcli:18640): GLib-CRITICAL **: 17:47:38.047: g_atomic_ref_count_dec: assertion 'g_atomic_int_get (arc) > 0' failed

This started happening today (5th August). Otherwise apt update and apt upgrade seem to correctly update the system.

------------------------------

https://gitlab.gnome.org/GNOME/glib/issues/1480

ProblemType: Bug
DistroRelease: Ubuntu 18.10
Package: libglib2.0-0 2.57.2-1
ProcVersionSignature: Ubuntu 4.17.0-6.7-generic 4.17.9
Uname: Linux 4.17.0-6-generic x86_64
ApportVersion: 2.20.10-0ubuntu7
Architecture: amd64
CurrentDesktop: GNOME
Date: Sun Aug 5 17:52:41 2018
InstallationDate: Installed on 2018-07-12 (24 days ago)
InstallationMedia: Ubuntu 18.10 "Cosmic Cuttlefish" - Alpha amd64 (20180711)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: glib2.0
UpgradeStatus: No upgrade log present (probably fresh install)

Paul White (paulw2u) wrote :
Iain Lane (laney) wrote :

Thanks.

This was in fact already fixed upstream: https://github.com/ximion/appstream/commit/05ac8b0a8630680b27bcf79d3f41274a21d60acf

and is going to be in cosmic imminently.

By the way, it's not recommended to run -proposed of the development release. I really suggest you stop doing that.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in appstream (Ubuntu):
status: New → Confirmed
Changed in glib2.0 (Ubuntu):
status: New → Confirmed
Bashing-om (bashing-om) wrote :

apt update results with the warning:
(appstreamcli:1748): GLib-CRITICAL **: 12:54:05.288: g_atomic_ref_count_dec: assertion 'g_atomic_int_get (arc) > 0' failed

Proceeding to install the upgrades >>
Possibly unrelated, but, Since seeing the warning and upgrading packages I have experienced the system going into read only mode, and the superblock of the disk being corrupted, per e2fsck.

I am holding off on upgrades until I see a fix in the cosmic repo for this condition.

On Wed, Aug 08, 2018 at 06:14:06PM -0000, Bashing-om wrote:
> apt update results with the warning:
> (appstreamcli:1748): GLib-CRITICAL **: 12:54:05.288: g_atomic_ref_count_dec: assertion 'g_atomic_int_get (arc) > 0' failed
>
> Proceeding to install the upgrades >>
> Possibly unrelated, but, Since seeing the warning and upgrading packages I have experienced the system going into read only mode, and the superblock of the disk being corrupted, per e2fsck.
>
> I am holding off on upgrades until I see a fix in the cosmic repo for
> this condition.

This message is not causing your computer any harm. If you see a problem
then it's unrelated. It'll be resolved soon.

Cheers,

--
Iain Lane [ <email address hidden> ]
Debian Developer [ <email address hidden> ]
Ubuntu Developer [ <email address hidden> ]

description: updated
Matthias Klumpp (ximion) wrote :

See the linked upstream issue for details - this will be fixed soon.

Changed in glib2.0 (Ubuntu):
status: Confirmed → Invalid
Changed in appstream:
status: Unknown → New
Matthias Klumpp (ximion) wrote :

This is fixed in Debian now, in package appstream/0.12.2-2.

Matthias Klumpp (ximion) on 2018-08-19
Changed in appstream (Ubuntu):
status: Confirmed → Fix Committed
assignee: nobody → Matthias Klumpp (ximion)
Changed in appstream (Debian):
status: Unknown → Fix Released
Changed in appstream:
status: New → Fix Released
Matthias Klumpp (ximion) on 2018-09-04
Changed in appstream (Ubuntu):
status: Fix Committed → Fix Released
Brian Murray (brian-murray) wrote :

As noted in duplicate bug report 1790693 this prevents upgrades from Cosmic to happening so the fix should be SRU'ed to Ubuntu 18.04.

Johannes Niediek (jonied) wrote :

I still see the problem on Debian, could you elaborate which package contains the fix?

Info:

> dpkg-query -s appstream

Package: appstream
Status: install ok installed
Priority: optional
Section: admin
Installed-Size: 656
Maintainer: Matthias Klumpp <email address hidden>
Architecture: amd64
Version: 0.12.2-2

> appstreamcli refresh-cache

(appstreamcli:3963): GLib-CRITICAL **: 09:07:57.805: g_variant_builder_end: assertion '!GVSB(builder)->uniform_item_types || GVSB(builder)->prev_item_type != NULL || g_variant_type_is_definite (GVSB(builder)->type)' failed

and so on.

Iain Lane (laney) wrote :

On Wed, Sep 05, 2018 at 06:08:23AM -0000, Johannes Niediek wrote:
> I still see the problem on Debian, could you elaborate which package
> contains the fix?

Firstly, for Debian bugs, please use the Debian bug tracker.

> Info:
>
> > dpkg-query -s appstream

You need to make sure libappstream4 is updated to 0.12.2-2 - the fix for
the bug I point out below is in the library and not the tool itself.

> > appstreamcli refresh-cache
>
> (appstreamcli:3963): GLib-CRITICAL **: 09:07:57.805:
> g_variant_builder_end: assertion '!GVSB(builder)->uniform_item_types ||
> GVSB(builder)->prev_item_type != NULL || g_variant_type_is_definite
> (GVSB(builder)->type)' failed

Secondly, this is actually a different error to the one this bug was
talking about. If this were an Ubuntu bug, it should be a new one.

Your problem looks like Debian bug #906538 to me, which happily is fixed
in both Debian and Ubuntu already.

Cheers,

--
Iain Lane [ <email address hidden> ]
Debian Developer [ <email address hidden> ]
Ubuntu Developer [ <email address hidden> ]

Lars (lollypop) wrote :

Thanks Iain!
That fixed it for me:
$ sudo apt install appstream/cosmic libappstream4/cosmic
$ dpkg -l appstream libappstream4
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=========================-=================-=================-=======================================================
ii appstream 0.12.2-2 amd64 Software component metadata management
ii libappstream4:amd64 0.12.2-2 amd64 Library to access AppStream services
$ sudo appstreamcli refresh-cache --force
AppStream cache update completed successfully.

Greetings,
   Lars

Johannes Niediek (jonied) wrote :

Thanks Iain, everything you wrote makes sense to me (including that I should have used the Debian bug tracker). Everything works fine after apt-get install --reinstall libappstream4.

Best,
Johannes

Oded Arbel (oded-geek) wrote :

Have the same issue upgrading from bionic to cosmic. Updating appstream to the version from cosmic workedaround the problem.

Please backport fix to bionic so that other people will be able to upgrade using the Ubuntu normal upgrade process.

Oded Arbel (oded-geek) wrote :

BTW - I'm running Kubuntu, and doing the upgrade with kubuntu-devel-release-upgrade works just fine without needing to update appstream to 0.12.2 first.

Can anybody please nominate this bug for bionic because it produces an error when trying to upgrade from 18.04 to 18.10? See:

https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1790693

and

https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1793164

Jeremy Bicha (jbicha) wrote :

Walter, bug 1790693 has been marked as a duplicate of bug 1792537 which is already fixed in bionic-proposed and will get released to bionic-updates soon.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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