"assertion failed: (!g_thread_supported()" errors make Precise amanda-server package unusable

Bug #932064 reported by Marc Giger
122
This bug affects 20 people
Affects Status Importance Assigned to Milestone
Gentoo Linux
Fix Released
Medium
amanda (Debian)
Fix Released
Unknown
amanda (Ubuntu)
Fix Released
High
Unassigned
Precise
Fix Released
High
Reid Vandewiele

Bug Description

amtape crashes with the following output

**
ERROR:glib-util.c:45:glib_init: assertion failed: (!g_thread_supported())
Aborted (core dumped)

lsb_release -rd
Description: Ubuntu precise (development branch)
Release: 12.04

apt-cache policy amanda-server
amanda-server:
  Installed: 1:3.3.0-1ubuntu1
  Candidate: 1:3.3.0-1ubuntu1
  Version table:
 *** 1:3.3.0-1ubuntu1 0
        500 http://ch.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages
        100 /var/lib/dpkg/status

[Impact]

A broad range of amanda-server executables (e.g. amtape, amlabel, amcheck, and amcheckdump) and dynamic libraries used internally by Amanda (e.g. libDevice.so) abort with this "assertion failed" message. This renders the amanda-server package completely inoperable under Precise.

[Test Case]

Run the following commands as root.

apt-get install amanda-server
amtape

[Regression Potential]

It's difficult to regress from inoperable. See http://git.io/rv0chA for the original commit message for the cherry-picked patch.

Revision history for this message
Marc Giger (gigerstyle) wrote :
Revision history for this message
Craig (craig-st) wrote :

Just upgraded from 11.10 Oneiric to 12.04 LTS Precise Beta 1, and I experience the same error from amcheck-device when running amcheck:

ERROR:glib-util.c:45:glib_init: assertion failed: (!g_thread_supported())
amcheck-device terminated with signal 6Server check took 0.120 seconds

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in amanda (Ubuntu):
status: New → Confirmed
Revision history for this message
matt organ (matt-organ) wrote :

Can also confirm this is in the final 12.04 release.

root@localhost:~# lsb_release -rd
Description: Ubuntu 12.04 LTS
Release: 12.04

root@localhost:~# su - -c "amcheck Daily" backup
Amanda Tape Server Host Check
-----------------------------
Holding disk /amtmp/amanda/localhost/holddisk1: 836620 MB disk space available, using 836610 MB
Holding disk /files/amanda/localhost/holddisk2: 478896 MB disk space available, using 473776 MB
**
ERROR:glib-util.c:45:glib_init: assertion failed: (!g_thread_supported())
amcheck-device terminated with signal 6Server check took 0.145 seconds

Amanda Backup Client Hosts Check
--------------------------------
WARNING: localhost: selfcheck request failed: timeout waiting for ACK
Client check: 1 host checked in 30.032 seconds. 1 problem found.

(brought to you by Amanda 3.3.0)

Revision history for this message
matt organ (matt-organ) wrote :

Have installed the versions from the Quantal Repositories along with any dependencies (mostly perl stuff)
http://packages.ubuntu.com/search?keywords=amanda&searchon=names&suite=quantal&section=all

All good so far, all issues have just "gone away".
Not sure I'd recommend this approach to the light hearted though, the "manual dependencies" learning curve is a bit steep.

root@localhost:~# dpkg -l amanda-common amanda-server amanda-client

ii amanda-client 1:3.3.1-3 Advanced Maryland Automatic Network Disk Archiver (Client)
ii amanda-common 1:3.3.1-3 Advanced Maryland Automatic Network Disk Archiver (Libs)
ii amanda-server 1:3.3.1-3 Advanced Maryland Automatic Network Disk Archiver (Server)

Revision history for this message
In , Graaff-i (graaff-i) wrote :

Amanda compiled against an older version crashes in amdump when a new glib is dropped in, and amanda 3.3.0 no longer compiles against glib-2.23:

libtool: compile: x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../config -I../gnulib -fno-strict-aliasing -D_GNU_SOURCE -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -Wall -Wextra -Wparentheses -Wdeclaration-after-statement -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wformat -Wformat-security -Wsign-compare -Wfloat-equal -Wold-style-definition -Wno-strict-aliasing -Wno-unknown-pragmas -Wall -O2 -pipe -march=native -fno-strict-aliasing -MT alloc.lo -MD -MP -MF .deps/alloc.Tpo -c alloc.c -o alloc.o >/dev/null 2>&1
In file included from util.h:39:0,
                 from debug.c:34:
glib-util.h:75:6: error: conflicting types for 'g_queue_free_full'
/usr/include/glib-2.0/glib/gqueue.h:76:6: note: previous declaration of 'g_queue_free_full' was here
In file included from util.h:39:0,
                 from dgram.c:35:
glib-util.h:75:6: error: conflicting types for 'g_queue_free_full'
/usr/include/glib-2.0/glib/gqueue.h:76:6: note: previous declaration of 'g_queue_free_full' was here
make[3]: *** [debug.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [dgram.lo] Error 1

This leaves me with a non-working amanda setup unless I downgrade glib, which isn't really a realistic scenario.

Revision history for this message
In , Monitor (monitor) wrote :

amanda-3.3.0 runs fine here with dev-libs/glib-2.32.2 on ~amd64.
Your subject says 2.32, your message contains 2.23.

Please specify.

Revision history for this message
In , Graaff-i (graaff-i) wrote :

The problems I have are with glib 2.32.2.

With it installed I'm having runtime problems with amanda 3.2.2 (the amdump log file tells me):

-----

GETTING ESTIMATES...
**
ERROR:glib-util.c:45:glib_init: assertion failed: (!g_thread_supported())
driver: state time 0.166 free kps: 8000 space: 26382336 taper: idle idle-dumpers: 4 qlen tapeq: 0 runq: 0 roomq: 0 wakeup: 0 driver-idle: not-idle
driver: interface-state time 0.166 if default: free 8000
driver: hdisk-state time 0.166 hdisk 0: free 26382336 dumpers 0
driver: result time 0.166 from taper: (eof)
dump of driver schedule before start degraded mode:

-----

And no backups are being made.

Trying to build amanda 3.3.0 (the latest version in Gentoo) with glib 2.32.2 fails. I'll attach a full build log.

Revision history for this message
In , Graaff-i (graaff-i) wrote :

Created attachment 311567
build.log

Revision history for this message
In , Graaff-i (graaff-i) wrote :

Created attachment 311569
emerge --info

Revision history for this message
In , Wl-dustin (wl-dustin) wrote :

From an amanda-hackers thread about this bug, here are the svn revisions you could backport to fix this:

----

Hi Dustin,

svn 4593, 4595, 4698.

Gene Heskett reported compilation problem with 4698, More work may be required.

Jean-Louis

Revision history for this message
Jacek Urbańczyk (burbon) wrote :

Same here. After update from 11.10 to 12.04:

...
"**
ERROR:glib-util.c:45:glib_init: assertion failed: (!g_thread_supported())
amcheck-device terminated with signal 6Server check took 41.949 seconds
"

Revision history for this message
Mitch (9-launchpad-sillyme-com) wrote :

Getting the same error after upgrading from 11.10 to 12.04 LTS. These were working the day before.

$ amcheck mys3
Amanda Tape Server Host Check
-----------------------------
Holding disk /amanda/holding/mys3: 7450624 kB disk space available, using 6938624 kB
**
ERROR:glib-util.c:45:glib_init: assertion failed: (!g_thread_supported())

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

$ amcheck DailySet
Amanda Tape Server Host Check
-----------------------------
Holding disk /amanda/holding/daily: 7450624 kB disk space available, using 7348224 kB
**
ERROR:glib-util.c:45:glib_init: assertion failed: (!g_thread_supported())

Revision history for this message
Daniel Manrique (roadmr) wrote :

Setting importance: High on behalf of EvilResistance, per the following criteria:

Reasoning: (1) Prevents the application from working and operating. (2) Has a severe impact on a small number of ubuntu (server) users.

Changed in amanda (Ubuntu):
importance: Undecided → High
Revision history for this message
Thomas Ward (teward) wrote :

Clarification: Comment 8:

EvilResistance on irc.freenode.net

Corresponding Launchpad User: trekcaptainusa-tw

Revision history for this message
In , Robin H. Johnson (robbat2) wrote :

3.3.1 added to the tree now with backports of the patches.
I had to remove the #pragma lines in r4698, as they don't work on GCC 4.5.

Revision history for this message
In , Graaff-i (graaff-i) wrote :

(In reply to comment #6)
> 3.3.1 added to the tree now with backports of the patches.
> I had to remove the #pragma lines in r4698, as they don't work on GCC 4.5.

This versions compiles and works fine for me. Thanks!

Revision history for this message
Andrew Piziali (bj7u6139zdy-andy) wrote :

I experienced the same failure after upgrading from Ubuntu 11.10 to 12.04:

$ sudo -u backup amcheck elijah
[sudo] password for andy: *********
Amanda Tape Server Host Check
-----------------------------
Holding disk /var/backups/amanda/holding: 35045376 kB disk space available, using 24559616 kB
**
ERROR:glib-util.c:45:glib_init: assertion failed: (!g_thread_supported())
amcheck-device terminated with signal 6Server check took 3.226 seconds

Amanda Backup Client Hosts Check
--------------------------------
Client check: 1 host checked in 1.493 seconds. 0 problems found.

(brought to you by Amanda 3.3.0)

Revision history for this message
Nathan Klock (nathan-etf3) wrote :

I can confirm this error on Ubuntu Server 11.04 x64. Trying to set up a new Amanda backup set and I am getting the following:

root@UtilServer:/mnt/Backup/amanda/DailySet1# su backup
$ for i in 1 2 3 4 5 6; do /usr/sbin/amlabel DailySet1 DailySet1-${i} slot ${i}; done
**
ERROR:glib-util.c:45:glib_init: assertion failed: (!g_thread_supported())
Aborted (core dumped)
**
ERROR:glib-util.c:45:glib_init: assertion failed: (!g_thread_supported())
Aborted (core dumped)
**
ERROR:glib-util.c:45:glib_init: assertion failed: (!g_thread_supported())
Aborted (core dumped)
**
ERROR:glib-util.c:45:glib_init: assertion failed: (!g_thread_supported())
Aborted (core dumped)
**
ERROR:glib-util.c:45:glib_init: assertion failed: (!g_thread_supported())
Aborted (core dumped)
**
ERROR:glib-util.c:45:glib_init: assertion failed: (!g_thread_supported())
Aborted (core dumped)

Revision history for this message
Nigel Titley (nigel) wrote :

Confirmed this bug affects me too. Since 12.04 amanda has not worked and getting the

ERROR:glib-util.c:45:glib_init: assertion failed: (!g_thread_supported())

error.

Amanda not usable at present.

Revision history for this message
Reid Vandewiele (reidmv) wrote :
Reid Vandewiele (reidmv)
description: updated
Revision history for this message
Thomas Leavitt (u-tho4as-f) wrote :

This was reported in February. This has been fixed in 12.10 in April. When is the fix going to be backported to 12.04?!? My backup solution is totally hosed as a result of this. I am going to have to simply install Amanda from source at this point. Very annoying.

Revision history for this message
Rick Leir (rleir) wrote :

I am building from source. Reid, Thomas, please correct me.
 apt-get source amanda-common

Do not get glib like this (it gives glib2.32) because amanda needs an older version:
 NOT apt-get install libglib2.0-dev

Here is what I used:
 wget http://ftp.gnu.org/gnu/gettext/gettext-0.18.1.1.tar.gz
 wget http://ftp.gnome.org/pub/gnome/sources/glib/2.18/glib-2.18.4.tar.gz

Build the packages in order: gettext then glib then amanda. Between builds say
 ldconfig

For the Amanda build I said:
 ./configure --with-user=backup

The default make install puts everything under /usr/local, and I like that because it does not overwrite the standard Amanda build products. However you need the file
 /etc/ld.so.conf.d/amanda.conf
Containing
 /usr/local/lib/amanda

And say
 ldconfig

The builds succeed but I have not yet tested.
======

Changed in amanda:
status: Unknown → Fix Released
no longer affects: amanda
Changed in amanda (Debian):
status: Unknown → Fix Released
summary: - amtape crash
+ "assertion failed: (!g_thread_supported()" errors make Precise amanda-
+ server package unusable
description: updated
description: updated
Revision history for this message
Nathan Stratton Treadway (nathanst) wrote :

The underlying issue here is that various changes were made to glib in versions 2.31 and 2.32 which were incompatible with the existing Amanda codeline.

When glib 2.32 was included into Precise, that caused the amanda package builds to fail due to duplicate definitions of the g_queue_free_full() function. To work around this, a Ubuntu-specific patch was applied to amanda v1:3.3.0-1ubuntu1 (on Feb 05):
  http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/precise/amanda/precise/revision/24

However, it turns out that the glib upgrade also involved a separate change to the g_thread_supported() function -- a change which doesn't cause build failures but does cause all affected executables to abort due to the failed assertion as they are first starting up....

In March, there was a (rather verbose) thread on the amanda-user mailing list that eventually identified fixes for both those issues:
  http://thread.gmane.org/gmane.comp.sysutils.backup.amanda.general/39022
(subject line was "amdump failed last night")

In May, Gentoo upgraded glib versions and ran into these problems, and they were advised that the glib-2.32-related SVN commits (for the amanda 3.3 branch) were:
  http://amanda.svn.sourceforge.net/viewvc/amanda?view=revision&revision=4593
  http://amanda.svn.sourceforge.net/viewvc/amanda?view=revision&revision=4595
and
  http://amanda.svn.sourceforge.net/viewvc/amanda?view=revision&revision=4698

These fix the g_queue_free_full() issue, the g_thread_supported() issue, and some glib-related compiler warnings, respectively.

See gentoo-bugs #415587 and
  http://thread.gmane.org/gmane.comp.sysutils.backup.amanda.devel/3489/focus=3490
(subject line "Fwd: [Bug 415587] New: app-backup/amanda 3.3.0 fails with glib-2.32")
for more info.

Revision history for this message
Nathan Stratton Treadway (nathanst) wrote :

Meanwhile, in April Debian also hit these glib-related amanda build problems, as discussed in Debian BTS #667836 (g_queue_free_full) and #667836 (g_thread_supported). These were resolved in the amanda 1:3.3.1 packages via the following patches:
  http://git.gag.com/?p=debian/amanda;a=commitdiff;h=0b384eed
  http://git.gag.com/?p=debian/amanda;a=commitdiff;h=3c4bb201

Both these patches migrated into Quantal as part of amanda 1:3.3.1-3 (which explains why amanda-server is working again there).

Revision history for this message
Nathan Stratton Treadway (nathanst) wrote :

Thus, there are currently three different sources for fixes to these glib-related build problems (Ubuntu, Debian, and upstream), each with a slightly different implementation of the same basic changes.

I'm not sure which combination of those various patches results in the easiest path to getting a working package in Precise, but in any case there are certainly a few already-field-tested options available to choose from....

Changed in amanda (Ubuntu):
status: Confirmed → Fix Released
Changed in amanda (Ubuntu Precise):
importance: Undecided → High
Revision history for this message
Ilya Barygin (randomaction) wrote :

Reid, thank you for the patch. There are some changes that must be made for it to be uploaded:
1. In the changelog (see https://wiki.ubuntu.com/StableReleaseUpdates#Procedure ):
- version number should be 1:3.3.0-1ubuntu1.1
- target release should be precise-proposed
- low urgency is used for all uploads in Ubuntu
- "Non-maintainer upload" shouldn't be mentioned, it's a Debian-specific thing
- syntax for closing a bug is LP: #NNNNNN (not closes:, it's Debian-specific)
2. Please format the patch header according to DEP-3 (see https://wiki.ubuntu.com/UbuntuDevelopment/PatchTaggingGuidelines ).

Other than that, the debdiff looks good to me.

Changed in amanda (Ubuntu Precise):
assignee: nobody → Reid Vandewiele (reidmv)
status: New → Incomplete
Revision history for this message
Martin Pitt (pitti) wrote :

I uploaded the debdiff with the small fixes that Ilya mentioned, thanks Reid! Subscribing SRU team, unsubscribing sponsors.

Changed in amanda (Ubuntu Precise):
status: Incomplete → In Progress
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Marc, or anyone else affected,

Accepted amanda into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/amanda/1:3.3.0-1ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in amanda (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Chris Higgins (chris-higgins) wrote :

The patched version is working successfully for me in my testing so far.

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Chris, would you say that this bug is fixed per the test case above?

Revision history for this message
aboaboit (andrea-borgia-deactivatedaccount) wrote :

Upgraded to version from "proposed" and just completed a level 0 dump of my laptop, I'd say it works now

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Thanks for testing andrea!

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package amanda - 1:3.3.0-1ubuntu1.1

---------------
amanda (1:3.3.0-1ubuntu1.1) precise-proposed; urgency=high

  * Add g_thread_supported_bug_932064.patch: Fix segfault/coredump in amtape
    (LP: #932064)
 -- Reid Vandewiele <email address hidden> Sat, 16 Jun 2012 12:50:20 -0700

Changed in amanda (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
Poldi (poldi) wrote : Re: [Bug 932064] Re: "assertion failed: (!g_thread_supported()" errors make Precise amanda-server package unusable

Have uninstalled the previous version 3.3.2 and installed this version,
but am now getting an error when starting xinetd as is doesn't find amandad.

Thanks

On 26/07/12 15:52, Launchpad Bug Tracker wrote:
> This bug was fixed in the package amanda - 1:3.3.0-1ubuntu1.1
>
> ---------------
> amanda (1:3.3.0-1ubuntu1.1) precise-proposed; urgency=high
>
> * Add g_thread_supported_bug_932064.patch: Fix segfault/coredump in amtape
> (LP: #932064)
> -- Reid Vandewiele <email address hidden> Sat, 16 Jun 2012 12:50:20 -0700
>
> ** Changed in: amanda (Ubuntu Precise)
> Status: Fix Committed => Fix Released
>

Revision history for this message
In , Pacho-gentoo (pacho-gentoo) wrote :

(In reply to comment #7)
> (In reply to comment #6)
> > 3.3.1 added to the tree now with backports of the patches.
> > I had to remove the #pragma lines in r4698, as they don't work on GCC 4.5.
>
> This versions compiles and works fine for me. Thanks!

Changed in gentoo:
importance: Unknown → Medium
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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