Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 614880 - net-im/jabberd2-2.3.3-r2 shown crashed by openrc but working fine
Summary: net-im/jabberd2-2.3.3-r2 shown crashed by openrc but working fine
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-06 20:41 UTC by Christophe PEREZ
Modified: 2017-11-27 22:05 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christophe PEREZ 2017-04-06 20:41:45 UTC
I have net-im/jabberd2-2.3.3-r2 working fine :

# ps ax | grep jabber | grep -v -F grep
13416 ?        Ss     0:00 /usr/bin/jabberd2-router -c /etc/jabber/router.xml
13432 ?        Ss     0:00 /usr/bin/jabberd2-sm -c /etc/jabber/sm.xml
13446 ?        Ss     0:00 /usr/bin/jabberd2-s2s -c /etc/jabber/s2s.xml
13460 ?        Ss     0:00 /usr/bin/jabberd2-c2s -c /etc/jabber/c2s.xml
13567 ?        Ssl    0:00 /usr/bin/mu-conference -c /etc/jabber/mu-conference.xml

# ls -l /var/run/jabber/
total 20
-rw-r--r-- 1 jabber jabber 5  6 avril 16:22 c2s.pid
-rw-r--r-- 1 jabber jabber 5  6 avril 16:22 jabber.novazur.fr.pid
-rw-r--r-- 1 jabber jabber 5  6 avril 16:23 mu-conference.pid
-rw-r--r-- 1 jabber jabber 5  6 avril 16:22 router.pid
-rw-r--r-- 1 jabber jabber 5  6 avril 16:22 s2s.pid

but openrc shows it crashed :

# rc-service jabberd status
 * status: crashed

# emerge --info net-im/jabberd2
Portage 2.3.3 (python 3.4.5-final-0, default/linux/amd64/13.0, gcc-4.9.4, glibc-2.23-r3, 4.9.16-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.9.16-gentoo-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E8400_@_3.00GHz-with-gentoo-2.3
KiB Mem:     8158664 total,   5430200 free
Timestamp of repository gentoo: Thu, 06 Apr 2017 12:00:01 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1
distcc 3.2rc1 x86_64-pc-linux-gnu [enabled]
ccache version 3.2.4 [enabled]
app-shells/bash:          4.3_p48-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.22.3_rc4::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/ccache:          3.2.4::gentoo
dev-util/cmake:           3.7.2::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.23.2::gentoo
sys-apps/sandbox:         2.10-r3::gentoo
sys-devel/autoconf:       2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.26.1::gentoo
sys-devel/gcc:            4.9.4::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0

megacoffee
    location: /usr/local/portage/layman/megacoffee
    masters: gentoo
    priority: 50

quarks
    location: /usr/local/portage/layman/quarks
    masters: gentoo
    priority: 50

sunrise
    location: /usr/local/portage/layman/sunrise
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/apache2-php7.0/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/other/download/Linux/gentoo/portage"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --keep-going"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildsyspkg ccache config-protect-if-modified distcc distcc-pump distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirrors.rit.edu/gentoo/ http://gentoo.netnitco.net http://gentoo.mirrors.pair.com/ http://gentoo.mirrors.tds.net/gentoo"
LANG="fr_FR.iso885915@euro"
LC_ALL="fr_FR@euro"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="a52 aac acl acpi alsa amd64 apache2 audiofile bash-completion berkdb bmp bzip2 caps cdb cdparanoia cdr cli cracklib crypt ctype cups cxx dedicated dvd dvdr dvdread encode exif fam ffmpeg flac foomaticdb ftp gd geoip gif iconv icq idn imagemagick imap imlib innodb iodbc jabber jbig jpeg lcms ldap lm_sensors mad maildir matroska mbox mcal mime mmx mng modules mp3 mpeg msn multilib mysql mysqli ncurses nls nptl nptlonly odbc ogg openmp oscar pam pcre php png posix ppds readline samba sasl scanner sdl seccomp session sharedext simplexml slang slp snmp speex spell spl sse sse2 ssl svg tcpd theora tiff unicode usb v4l vhosts vorbis wmf x264 x265 xattr xml xsl xvid yahoo zlib" ABI_X86="64" ALSA_CARDS="snd-intel8x0" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 sse4_1 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard" KERNEL="linux" L10N="fr fr_FR" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="fr fr_FR" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21" USERLAND="GNU" 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:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

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

net-im/jabberd2-2.3.3-r2::gentoo was built with the following:
USE="mysql pam ssl zlib -berkdb -debug -experimental -ldap (-libressl) -memdebug -postgres -sqlite -test" ABI_X86="64"
Comment 1 Alex 2017-06-03 22:34:51 UTC
Hi,

I found out what causes this and have a workaround but not a fix.

This happens because by default in the jabberd config xml contain "<pidfile>/var/run/jabber/${id}.pid</pidfile>".
In the init file, the line "services=$(grep -v ^# /etc/jabber/jabberd.cfg | grep '..*' | awk '{print $1 ":" $2}')" pulls out the string ${id} and not the actual path of the pid file which means an incorrect path ends up in /var/run/openrc/daemons/jabberd/*
If in the config files you set "<pidfile>/var/run/jabber/an_actual_name.pid</pidfile>" with a unique name for each file, the rc-status mechanism works fine.
I considered making another loop which pulled out the contents of the <id> tag and substituting them into <pidfile> where necessary, but <id> can just contain another variable expansion so it's not a true fix.

Not sure how to correctly fix this.

Hope this helps.

Alex
Comment 2 Pacho Ramos gentoo-dev 2017-11-27 17:42:37 UTC
can you retry with 2.6.1? It seems to use a different init.d file
Comment 3 Christophe PEREZ 2017-11-27 22:05:38 UTC
Sorry, I don't use it anymore.