segfault when starting rrdcached

Bug #985341 reported by Alex Dean
66
This bug affects 11 people
Affects Status Importance Assigned to Milestone
rrdtool (Debian)
Fix Released
Unknown
rrdtool (Ubuntu)
Fix Released
Medium
Unassigned
Precise
Fix Released
Medium
Bryan Quigley

Bug Description

[Impact]

 * rrdcached doesn't start by default due to directories not being there

[Test Case]

 * Just install rrdcached and see that it doesn't start.

# apt-get install rrdcached
...snip...
Setting up rrdcached (1.4.7-1) ...
Starting RRDtool data caching daemon: rrdcached/etc/init.d/rrdcached: line 57: 19826 Segmentation fault (core dumped) start-stop-daemon --start --quiet --oknodo --pidfile "$PIDFILE" --exec $DAEMON -- $OPTS -p "$PIDFILE"
invoke-rc.d: initscript rrdcached, action "start" failed.
dpkg: error processing rrdcached (--configure):
 subprocess installed post-installation script returned error exit status 139
Errors were encountered while processing:
 rrdcached
E: Sub-process /usr/bin/dpkg returned an error code (1)

[Regression Potential]

The change is just adding mkdir -p to two directories in the init script before trying to start the daemon.

I can't think of an obvious regression here. Takes (incredibly slightly) longer to start?

[Workaround]

Create /var/lib/rrdcached/journal, then restart the daemon

---
ApportVersion: 2.0.1-0ubuntu5
Architecture: amd64
DistroRelease: Ubuntu 12.04
EcryptfsInUse: Yes
InstallationMedia: Ubuntu-Server 12.04 LTS "Precise Pangolin" - Beta amd64 (20120327)
Package: rrdtool 1.4.7-1
PackageArchitecture: amd64
ProcEnviron:
 TERM=xterm-256color
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 3.2.0-23.36-generic 3.2.14
Tags: precise
Uname: Linux 3.2.0-23-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

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

Hi Alex, can you run 'apport-collect 985341' on the affected system so we can get full information on dependencies and versions? Thanks!

Changed in rrdtool (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Alex Dean (alex-dean) wrote : Dependencies.txt

apport information

tags: added: apport-collected precise
description: updated
Revision history for this message
Alex Dean (alex-dean) wrote :

Could an admin please delete comment #2? My email account was compromised, and this was the result.

thanks,
alex

Revision history for this message
Allan Bailey (zirpu) wrote :

Alex,

Make sure your rrdcached journal directory exists. The default is /var/lib/rrdcached/journal

That might be considered a bug in the package not creating that on install.

Revision history for this message
jraby (raby-jean) wrote :

Just installed rrdcached and had the same problem.
/var/lib/rrdcached doesn't exist after package installation, I guess the pkg should create it.

Revision history for this message
jraby (raby-jean) wrote :

Sorry, forgot to say that this was on 12.04.

Changed in rrdtool (Debian):
status: Unknown → New
Changed in rrdtool (Debian):
status: New → Fix Released
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

rrdtool (1.4.7-2) unstable; urgency=low

  * Ack NMUs; thanks to Jonathan Wiltshire and gregor herrmann!
  * Added debian/patches/bts664724-rrdcached-j-segfault:
    Fixed segfault in rrdcached when starting without having the journal
    directory available: canonicalize the journal path after creating the
    directory; else, realpath(3) will return NULL causing strdup() to
    segfault. Also, check the return value of realpath(3) before further using
    it. Thanks to Helmut Grohne for reporting this (Closes: #664724).

 -- Sebastian Harl <email address hidden> Wed, 01 Aug 2012 10:23:39 +0200

Changed in rrdtool (Ubuntu):
status: New → Fix Released
Revision history for this message
MxxCon (mxxcon) wrote :

Will rrdtool (1.4.7-2) be released for 12.04?

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

mxxcon, you are welcome to submit a backported fix upload to precise-proposed for review. I don't think anybody is actively working on it though. Please see https://wiki.ubuntu.com/StableReleaseUpdates

Revision history for this message
Robie Basak (racb) wrote :

Setting Precise task Importance to Medium as a workaround exists.

description: updated
Changed in rrdtool (Ubuntu Precise):
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in rrdtool (Ubuntu Precise):
status: New → Confirmed
Revision history for this message
Victor Engmark (victor-engmark) wrote :

This install command worked for me on precise:

sudo sh -c "mkdir -p /var/lib/rrdcached/db /var/lib/rrdcached/journal && chown $(printf %q "$USER"):$(printf %q "$(groups | awk '{print $1}')") /var/lib/rrdcached/db /var/lib/rrdcached/journal && apt-get install rrdcached"

Revision history for this message
Ralph Schmidt (rschmidt-s) wrote :

Hi @ all,

just a push because this bug still exists in 12.04. Please add the missing directory to the deb package and release the fixed package.

Revision history for this message
Bryan Quigley (bryanquigley) wrote :

Debdiff for fixing this on 12.04.

description: updated
Changed in rrdtool (Ubuntu Precise):
assignee: nobody → Bryan Quigley (bryanquigley)
tags: added: cts
Revision history for this message
Brian Murray (brian-murray) wrote :

I've uploaded this to the precise SRU queue.

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

Hello Alex, or anyone else affected,

Accepted rrdtool into precise-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/rrdtool/1.4.7-1ubuntu1 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 add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and 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 rrdtool (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Bryan Quigley (bryanquigley) wrote :

Confirmed that it get's installed correctly now. rrdcached_1.4.7-1ubuntu1

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

This bug was fixed in the package rrdtool - 1.4.7-1ubuntu1

---------------
rrdtool (1.4.7-1ubuntu1) precise; urgency=low

  * Fix "fails to install, postinst, invoke-rc.d rrdcached start, start-
    stop-daemon, segfault":
    (re-)create /var/lib/rrdcached/{journal,db} in init script.
    (LP: #985341)
 -- Bryan Quigley <email address hidden> Wed, 25 Feb 2015 15:51:46 -0800

Changed in rrdtool (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
Scott Kitterman (kitterman) wrote : Update Released

The verification of the Stable Release Update for rrdtool has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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