Bug 433650 - lsb_start_daemon will spin forever if --user is passed
lsb_start_daemon will spin forever if --user is passed
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: redhat-lsb (Show other bugs)
5.5
i386 Linux
low Severity low
: rc
: ---
Assigned To: Ondrej Vasik
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-20 12:38 EST by Julian C. Dunn
Modified: 2013-03-08 07:16 EST (History)
1 user (show)

See Also:
Fixed In Version: redhat-lsb-4.0-2.1.4.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-03-08 07:16:27 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Julian C. Dunn 2008-02-20 12:38:47 EST
Description of problem:

lsb_start_daemon will invoke "daemon" in such a way that it never terminates.

Version-Release number of selected component (if applicable):

redhat-lsb-3.1-12.3.EL

How reproducible:

Always

Steps to Reproduce:
1. Write an init script that calls the LSB start_daemon (by including
/lib/lsb/init-functions) and that passes "--user", e.g:

start_daemon --user foo sleep 1

2. This will actually invoke "/etc/redhat-lsb/lsb_start_daemon --user foo sleep 1"
3. The script never finishes. If you invoke "sh -x
/etc/redhat-lsb/lsb_start_daemon --user foo sleep 1" the following output is
observed:

+ . /etc/init.d/functions
++ TEXTDOMAIN=initscripts
++ umask 022
++ PATH=/sbin:/usr/sbin:/bin:/usr/bin
++ export PATH
++ '[' -z '' ']'
++ COLUMNS=80
++ '[' -z '' ']'
+++ /sbin/consoletype
++ CONSOLETYPE=pty
++ '[' -f /etc/sysconfig/i18n -a -z '' ']'
++ . /etc/profile.d/lang.sh
+++ sourced=0
+++ for langfile in /etc/sysconfig/i18n '$HOME/.i18n'
+++ '[' -f /etc/sysconfig/i18n ']'
+++ . /etc/sysconfig/i18n
++++ LANG=en_US.UTF-8
++++ SYSFONT=latarcyrheb-sun16
+++ sourced=1
+++ for langfile in /etc/sysconfig/i18n '$HOME/.i18n'
+++ '[' -f /root/.i18n ']'
+++ '[' -n '' ']'
+++ '[' 1 = 1 ']'
+++ '[' -n en_US.UTF-8 ']'
+++ export LANG
+++ '[' -n '' ']'
+++ unset LC_ADDRESS
+++ '[' -n '' ']'
+++ unset LC_CTYPE
+++ '[' -n '' ']'
+++ unset LC_COLLATE
+++ '[' -n '' ']'
+++ unset LC_IDENTIFICATION
+++ '[' -n '' ']'
+++ unset LC_MEASUREMENT
+++ '[' -n '' ']'
+++ unset LC_MESSAGES
+++ '[' -n '' ']'
+++ unset LC_MONETARY
+++ '[' -n '' ']'
+++ unset LC_NAME
+++ '[' -n '' ']'
+++ unset LC_NUMERIC
+++ '[' -n '' ']'
+++ unset LC_PAPER
+++ '[' -n '' ']'
+++ unset LC_TELEPHONE
+++ '[' -n '' ']'
+++ unset LC_TIME
+++ '[' -n '' ']'
+++ unset LC_ALL
+++ '[' -n '' ']'
+++ unset LANGUAGE
+++ '[' -n '' ']'
+++ unset LINGUAS
+++ '[' -n '' ']'
+++ unset _XKB_CHARSET
++++ /sbin/consoletype
+++ consoletype=pty
+++ '[' -n '' ']'
+++ '[' -n '' ']'
+++ '[' -n en_US.UTF-8 ']'
+++ case $LANG in
+++ '[' xterm = linux ']'
+++ unset SYSFONTACM SYSFONT
+++ unset sourced
+++ unset langfile
++ '[' -z '' ']'
++ '[' -f /etc/sysconfig/init ']'
++ . /etc/sysconfig/init
+++ BOOTUP=color
+++ GRAPHICAL=yes
+++ RES_COL=60
+++ MOVE_TO_COL='echo -en \033[60G'
+++ SETCOLOR_SUCCESS='echo -en \033[0;32m'
+++ SETCOLOR_FAILURE='echo -en \033[0;31m'
+++ SETCOLOR_WARNING='echo -en \033[0;33m'
+++ SETCOLOR_NORMAL='echo -en \033[0;39m'
+++ LOGLEVEL=3
+++ PROMPT=yes
+++ AUTOSWAP=no
++ '[' pty = serial ']'
++ '[' color '!=' verbose ']'
++ INITLOG_ARGS=-q
++
__sed_discard_ignored_files='/\(~\|\.bak\|\.orig\|\.rpmnew\|\.rpmorig\|\.rpmsave\)$/d'
+ nice=
+ force=
+ RETVAL=
+ '[' --user '!=' -user ']'
+ case $1 in
+ '[' --user '!=' -user ']'
+ case $1 in
+ '[' --user '!=' -user ']'
+ case $1 in
+ '[' --user '!=' -user ']'
+ case $1 in
+ '[' --user '!=' -user ']'
+ case $1 in
+ '[' --user '!=' -user ']'
+ case $1 in
+ '[' --user '!=' -user ']'
+ case $1 in
+ '[' --user '!=' -user ']'
+ case $1 in
+ '[' --user '!=' -user ']'


(forever and ever)

  
Actual results:

Script completes and starts the daemon.

Expected results:

See above.

Additional info:
Comment 1 Mike Traum 2008-11-16 19:56:19 EST
This also occurs on Fedora Core 9 with package redhat-lsb-3.1-19.fc8.i386. Additionally, it occurs with the popular -p option used to set an alternative pid file.
Comment 2 RHEL Product and Program Management 2009-03-26 13:06:28 EDT
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release. If you would like
this request to be reviewed for the next minor release, ask your
support representative to set the next rhel-x.y flag to "?".
Comment 3 Julian C. Dunn 2012-10-02 20:06:30 EDT
This seems to be fixed in Fedora 17. I have redhat-lsb-4.1-5.fc17.x86_64 and it works fine. Presumably the fix will make it into RHEL eventually.
Comment 5 Ondrej Vasik 2013-03-08 07:16:27 EST
Actually, IMO it was even fixed in RHEL-5 - redhat-lsb-4.0-2.1.4.el5 (RHBA-2011:0084-10) should behave correctly in that case. 
Therefore closing CURRENTRELEASE.

Note You need to log in before you can comment on or make changes to this bug.