Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 331111 - app-backup/amanda-2.6.1_p2 / dev-libs/glib-2.24.1-r1 - ERROR:glib-util.c:48:glib_init: assertion failed: (!g_thread_supported())
Summary: app-backup/amanda-2.6.1_p2 / dev-libs/glib-2.24.1-r1 - ERROR:glib-util.c:48:g...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
: 334683 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-08-03 19:51 UTC by Jeroen Roovers (RETIRED)
Modified: 2010-11-17 15:41 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
amanda-2.6.1-glib-init.patch (amanda-2.6.1-glib-init.patch,1.28 KB, patch)
2010-08-14 21:22 UTC, Dustin J. Mitchell
Details | Diff
ebuild applying Dustin's patch (amanda-2.6.1_p2.ebuild,14.20 KB, text/plain)
2010-08-26 14:15 UTC, Stefan G. Weichinger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeroen Roovers (RETIRED) gentoo-dev 2010-08-03 19:51:29 UTC
After upgrading to dev-libs/glib-2.24.1-r1, amanda (amcheck for instance) fails:

amanda@carnivoor ~ $ myamcheck
Amanda Tape Server Host Check
-----------------------------
Holding disk /var/spool/amanda/dump: 264773632 kB disk space available, using 52428800 kB as requested
**
ERROR:glib-util.c:48:glib_init: assertion failed: (!g_thread_supported())

Amanda Backup Client Hosts Check
--------------------------------
Client check: 5 hosts checked in 0.064 seconds.  0 problems found.

(brought to you by Amanda 2.6.1p2)

After downgrading to dev-libs/glib-2.22.5:

amanda@carnivoor ~ $ myamcheck
Amanda Tape Server Host Check
-----------------------------
Holding disk /var/spool/amanda/dump: 264773632 kB disk space available, using 52428800 kB as requested
amcheck-server: GLib version too old (micro mismatch): Amanda was compiled with glib-2.24.1

Amanda Backup Client Hosts Check
--------------------------------
Client check: 5 hosts checked in 0.081 seconds.  0 problems found.

(brought to you by Amanda 2.6.1p2)

After rebuilding amanda:

amanda@carnivoor ~ $ myamcheck
Amanda Tape Server Host Check
-----------------------------
Holding disk /var/spool/amanda/dump: 264773632 kB disk space available, using 52428800 kB as requested
read label `ORXNET11', date `20100706030001'.
NOTE: skipping tape-writable test
Tape ORXNET11 label ok
Server check took 16.843 seconds

Amanda Backup Client Hosts Check
--------------------------------
Client check: 5 hosts checked in 0.076 seconds.  0 problems found.

(brought to you by Amanda 2.6.1p2)
Comment 1 Dustin J. Mitchell 2010-08-03 21:49:28 UTC
This is fixed in 3.1.1.  The patch is here:
  http://github.com/djmitche/amanda/commit/09db20b935493ba391423be6ce4bb6413f1bbe21
Comment 2 Chris 2010-08-08 07:47:11 UTC
I am getting the same sort of thing not 100% the same.

I am not sure what I updated.

amtape daily current
**
ERROR:util.c:721:amanda_thread_init: assertion failed: (!g_thread_supported())
Aborted


Portage 2.1.8.3 (hardened/linux/x86/10.0, gcc-4.3.4, glibc-2.11.2-r0, 2.6.32-gentoo-r7 i686)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.32-gentoo-r7-i686-VIA_Esther_processor_1000MHz-with-gentoo-1.12.13
Timestamp of tree: Sun, 08 Aug 2010 00:35:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r2, 3.1.2-r3
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.65
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.3.4
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=i686 -mmmx -msse -msse2 -msse3 -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=i686 -mmmx -msse -msse2 -msse3 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests ccache distlocks fixpackages news parallel-fetch protect-owned sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.bytemark.co.uk/gentoo/ ftp://mirror.bytemark.co.uk/gentoo/ http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/ ftp://ftp.mirrorservice.org/sites/www.ibiblio.org/gentoo/ http://mirror.qubenet.net/mirror/gentoo/ ftp://mirror.qubenet.net/mirror/gentoo/ http://gentoo.virginmedia.com/ ftp://gentoo.virginmedia.com/sites/gentoo "
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl berkdb bzip2 cli cracklib crypt cups cxx dri gdbm gpm hardened iconv modules mudflap ncurses nls nptl nptlonly openmp pam pcre perl pic pppd python readline reflection session spl ssl sysfs tcpd urandom x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1        emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m       maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 intel         mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage      siliconmotion sis sisusb tdfx tga trident tseng v4l vesa via vmware     voodoo" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

app-backup/amanda-2.6.0_p2-r4 was built with the following:
USE="berkdb gdbm samba -debug -devpay -ipv6 -kerberos -minimal -s3 -xfs" 

I have tried a full world rebuild as one update suggested it was changing the way things are linked or somthing to that effect. This is still going after more than 24 hours, but past amanda.
Comment 3 Dustin J. Mitchell 2010-08-08 15:13:29 UTC
(In reply to comment #2)
> I am getting the same sort of thing not 100% the same.
> 
> I am not sure what I updated.

You get this error when you upgrade to glib >= 2.24 without upgrading to Amanda-3.1.1 or an (as-yet unwritten) patched 2.6.1 ebuild.

If you want to get around this bug until the gentoo devs fix it, add
  >=dev-libs/glib-2.24
to your /etc/portage/package.mask and re-merge world (you don't need to do a full rebuild).
Comment 4 Dustin J. Mitchell 2010-08-14 21:22:04 UTC
Created attachment 242987 [details, diff]
amanda-2.6.1-glib-init.patch

(In reply to comment #1)
> This is fixed in 3.1.1.  The patch is here:
>  
> http://github.com/djmitche/amanda/commit/09db20b935493ba391423be6ce4bb6413f1bbe21

Here's a version of the same patch, rebased onto the 2.6.1 branch, and uploaded to bugzilla in case the github URL goes away.
Comment 5 Chris 2010-08-25 22:14:47 UTC
Thanks for the help, sorry for the delay in this response I have been away.

I think I am going to have to log a seperate bug as I am on 2.6.0 not 2.6.1 and the issue is in another c file so your patch is not applicable to my issue, although I am trying to use it to workout my own patch.
Comment 6 Dustin J. Mitchell 2010-08-25 22:35:16 UTC
Please copy me on the new bug.
Comment 7 Stefan G. Weichinger 2010-08-26 14:15:45 UTC
Created attachment 244665 [details]
ebuild applying Dustin's patch
Comment 8 Chris 2010-08-27 05:40:56 UTC
*** Bug 334683 has been marked as a duplicate of this bug. ***
Comment 9 Dustin C. Hatch 2010-08-28 02:17:33 UTC
(In reply to comment #7)
> Created an attachment (id=244665) [details]
> ebuild applying Dustin's patch
> 

I can confirm that this ebuild works as expected.
Comment 10 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-09-10 21:36:03 UTC
dustin:
This is not fixed in the 3.1.2, it pops up when running the testsuite.
# make check
....
make[4]: Entering directory `/dev/shm/portage/app-backup/amanda-3.1.2-r1/work/amanda-3.1.2/device-src'
 PASS test_vfs_free_space
PASS: vfs-test
=============
1 test passed
=============
**
ERROR:glib-util.c:48:glib_init: assertion failed: (!g_thread_supported())
/bin/sh: line 4: 31682 Aborted                 /usr/bin/perl -I../perl -I../perl/.libs -I../perl -c -w $perlobj.nouselib
make[4]: *** [check-perl] Error 1
make[4]: Leaving directory `/dev/shm/portage/app-backup/amanda-3.1.2-r1/work/amanda-3.1.2/device-src'
Comment 11 Dustin J. Mitchell 2010-09-11 04:30:29 UTC
Are you sure that's 3.1.2?  Line 48 in 3.1.2 is not an assert:

 43 #ifdef HAVE_LIBCURL
 44 # ifdef G_THREADS_ENABLED
 45     g_assert(!g_thread_supported()); /* assert threads aren't initialized ye    t */
 46 # endif
 47     g_assert(curl_global_init(CURL_GLOBAL_ALL) == 0);
 48 #endif

(verified in the 3.1.2 tarball and in svn/git)

I'm pretty sure we've fixed this particular bug in 3.1.2 - it affected several other distros, too.  I'm willing to be proven wrong, though.
Comment 12 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-09-11 17:39:04 UTC
(In reply to comment #11)
> Are you sure that's 3.1.2?  Line 48 in 3.1.2 is not an assert:
I'm very certain that I was in the correct directory for 3.1.2, confirming now, and also checking to see if it's being contaminated by the system copy, which is still 2.6.1_p2 on that box.
Comment 13 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-09-11 17:51:43 UTC
Confirmed.

Instructions to reproduce:
1. Install 2.6.1_p2 to system.
2. Build 3.1.2 in $DIR
3. Run 'make check' in $DIR

If 2.6.1_p2 is NOT installed, then the tests pass perfectly.
Comment 14 Dustin J. Mitchell 2010-09-11 22:49:23 UTC
The 'make check' machinery attempts to dynamically link against libraries in their installed locations, which will cause this problem.  It's a known bug, but Jean-Louis long considered it a "feature".  In 3.1.x, we have --disable-syntax-checks to remove these buggy checks.  In 3.2, I managed to negotiate changing that to --enable-syntax-checks (making "disabled" - the non-buggy configuration - the default).

For 3.1.2 ebuilds to safely pass 'make check' with another version installed, you'll need to add --disable-syntax-checks.  This won't be necessary, but won't hurt, in 3.2. 

The appearance of 'make check' in comment #10 should have clued me in to that more quickly.. sorry :)

It's great to see Amanda getting such close attention, by the way - thanks!
Comment 15 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-09-12 00:17:38 UTC
(In reply to comment #14)
> For 3.1.2 ebuilds to safely pass 'make check' with another version installed,
> you'll need to add --disable-syntax-checks.  This won't be necessary, but won't
> hurt, in 3.2. 
--disable-syntax-checks IS in my testcase per comment #13. It still breaks.

# ./config.status  --config
'--prefix=/usr' '--build=x86_64-pc-linux-gnu' '--host=x86_64-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--libdir=/usr/lib64' '--with-tape-server=grubbs-int' '--with-index-server=grubbs-int' '--with-user=amanda' '--with-group=amanda' '--with-gnutar=/bin/tar' '--with-gnutar-listdir=/var/spool/amanda/tar-lists' '--with-config=DailySet1' '--with-tmpdir=/var/tmp/amanda' '--with-buffered-dump' '--with-debugging' '--localstatedir=/var/spool/amanda' '--with-smbclient=/usr/bin/smbclient' '--with-bsd-security' '--with-ssh-security' '--with-bsdudp-security' '--with-bsdtcp-security' '--without-krb4-security' '--without-krb5-security' '--disable-s3-device' '--without-gnuplot' '--with-ipv6' '--disable-nls' '--with-amperldir=/usr/lib64/perl5/vendor_perl/5.8.8' '--disable-syntax-checks' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86_64-pc-linux-gnu' 'CFLAGS=-march=nocona -O2 -pipe -g' 'LDFLAGS=-Wl,-O1 -Wl,--as-needed' 'PKG_CONFIG_PATH=/usr/lib64/pkgconfig'

1. install 2.6.1_p2
2. unpack 3.1.2
3. configure 3.1.2 w/ .... --disable-syntax-checks
4. make
5. make check (as implied by the default src_test block of Portage)

> The appearance of 'make check' in comment #10 should have clued me in to that
> more quickly.. sorry :)
> 
> It's great to see Amanda getting such close attention, by the way - thanks!
There's too many packages, and too little time. I've found myself batching up the work for a while.
Comment 16 Dustin J. Mitchell 2010-09-12 03:34:07 UTC
You're right: in 3.1.2, the --disable-syntax-checks option just avoids running the syntax checks on 'make all', and still runs them on 'make check'.

Since the ebuild is re-running autoconf anyway, the easiest fix for this is to remove line 125:

123             fi \
124         fi
125 check-local: check-perl
126 
127 # syntax-check perl scripts on 'make installcheck'                                                  
128 installcheck-perl: $(SCRIPTS_PERL)

from config/automake/scripts.am.

Hope that helps!
Comment 17 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-09-12 08:34:02 UTC
Ok, all fixed up now, had to remove the syntax-check in one more place:
+	# gentoo bug #331111
+	sed -i '/^check-local: check-perl$/d' "${S}"/config/automake/scripts.am
+	sed -i '/^check-local:/s,syntax-check,,g' "${S}"/perl/Makefile.am
Comment 18 Laurento Frittella (mrfree) 2010-11-17 12:13:01 UTC
Please stabilize a new version or release a patch for the actually stable on amd64 2.6.0_p2-r4, the issue is still here...
Comment 19 Dustin J. Mitchell 2010-11-17 13:32:43 UTC
mrfree: if you're talking about the issue in the (!g_thread_supported()), then that should be a new bug to backport the same patch to 2.6.0.  Please open one. 
Comment 20 Dustin C. Hatch 2010-11-17 15:41:27 UTC
Actually, this issue isn't even fixed in the 2.6.1 ebuild