collectd SIGABRTs when using apache plugin

Bug #944599 reported by Brad Marshall
This bug affects 1 person
Affects Status Importance Assigned to Milestone
collectd (Ubuntu)
Canonical Server

Bug Description

After enabling the apache plugin to get data from apache server-status, collectd consistantly gets a SIGABRT. A gdb run looks like:

(gdb) run -C /etc/collectd/collectd.conf -f
Starting program: /usr/sbin/collectd -C /etc/collectd/collectd.conf -f
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/".
[New Thread 0x7fffed43b700 (LWP 19475)]
[New Thread 0x7fffecc3a700 (LWP 19476)]
[New Thread 0x7fffec439700 (LWP 19477)]
[New Thread 0x7fffebc38700 (LWP 19478)]
[New Thread 0x7fffeb437700 (LWP 19479)]
[New Thread 0x7fffeac36700 (LWP 19480)]
collectd: ath.c:193: _gcry_ath_mutex_lock: Assertion `*lock == ((ath_mutex_t) 0)' failed.

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffec439700 (LWP 19477)]
0x00007ffff762e445 in __GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 0x00007ffff762e445 in __GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1 0x00007ffff7631bab in __GI_abort () at abort.c:91
#2 0x00007ffff762710e in __assert_fail_base (fmt=<optimized out>, assertion=0x7ffff5da8a66 "*lock == ((ath_mutex_t) 0)", file=0x7ffff5da8a60 "ath.c", line=<optimized out>,
    function=<optimized out>) at assert.c:94
#3 0x00007ffff76271b2 in __GI___assert_fail (assertion=0x7ffff5da8a66 "*lock == ((ath_mutex_t) 0)", file=0x7ffff5da8a60 "ath.c", line=193,
    function=0x7ffff5da8ac0 "_gcry_ath_mutex_lock") at assert.c:103
#4 0x00007ffff5d62312 in _gcry_ath_mutex_lock (lock=0x7ffff5fceb68) at ath.c:193
#5 0x00007ffff5d9c560 in lock_pool () at random-csprng.c:298
#6 0x00007ffff5d9cace in initialize () at random-csprng.c:327
#7 0x00007ffff5d9db15 in _gcry_rngcsprng_create_nonce (buffer=0x7fffec438c8f, length=1) at random-csprng.c:1341
#8 0x00007ffff0336233 in wrap_gcry_rnd_init (ctx=<optimized out>) at rnd.c:39
#9 0x00007ffff02e1d1b in _gnutls_rnd_init () at random.c:39
#10 0x00007ffff02d0ff5 in gnutls_global_init () at gnutls_global.c:236
#11 0x00007ffff0e62167 in Curl_gtls_init () from /usr/lib/x86_64-linux-gnu/
#12 0x00007ffff0e552ce in curl_global_init () from /usr/lib/x86_64-linux-gnu/
#13 0x00007ffff0e5541a in curl_easy_init () from /usr/lib/x86_64-linux-gnu/
#14 0x00007ffff108515f in init_host (st=0x6514f0) at apache.c:403
#15 apache_read_host (user_data=<optimized out>) at apache.c:637
#16 0x000000000040b568 in plugin_read_thread (args=<optimized out>) at plugin.c:433
#17 0x00007ffff7bc4e9a in start_thread (arg=0x7fffec439700) at pthread_create.c:308
#18 0x00007ffff76e874d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#19 0x0000000000000000 in ?? ()

Syslog entries look like:

Mar 2 06:48:58 hostname collectd[21661]: Libgcrypt warning: missing initialization - please fix the application
Mar 2 06:48:58 hostname collectd[21661]: Initialization complete, entering read-loop.
Mar 2 06:48:58 hostname collectd[21661]: rrdtool plugin: rrd_update_r ( failed: illegal attempt to update using time 1330670938 when last update time is 1330670938 (minimum one second step)
Mar 2 06:48:58 hostname collectdmon[21515]: Warning: collectd was terminated by signal 6 (core dumped)

The extract of the config used is:

LoadPlugin apache
<Plugin apache>
        <Instance "apache-hostname">
                URL "http://xx.yy.zz/server-status?auto"

I have also tried it with a Server "apache" stanza as well.

If I disable any apache checks the rrd_update_r error message disappears, and it no longer gets a SIGABRT. The libgcrypt warning still persists, however.

Please let me know if there's any further information that could help in debugging this.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: collectd 4.10.1-2.1ubuntu7
ProcVersionSignature: Ubuntu 3.2.0-17.27-generic 3.2.6
Uname: Linux 3.2.0-17-generic x86_64
ApportVersion: 1.93-0ubuntu2
Architecture: amd64
Date: Fri Mar 2 06:10:28 2012
SourcePackage: collectd
UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.collectd.collectd.conf: [modified]
mtime.conffile..etc.collectd.collectd.conf: 2012-03-02T06:08:09.219169

Revision history for this message
Brad Marshall (brad-marshall) wrote :
Changed in collectd (Ubuntu):
assignee: nobody → Canonical Server Team (canonical-server)
Revision history for this message
Aleh Filipovich (aleh) wrote :

I had the same problem, it was caused by URL"http://xx.yy.zz/server-status?auto" returning HTTP redirect instead of apache status page. After I had fixed mod_status settings and ensured URL returns status info collectd started working.

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.