Bug 122631 - /var/lock/subsys/htt problem, 100% CPU usage, htt failure
/var/lock/subsys/htt problem, 100% CPU usage, htt failure
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: im-sdk (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Yu Shao
:
Depends On:
Blocks: FC2Blocker
  Show dependency treegraph
 
Reported: 2004-05-06 10:41 EDT by Joe Orton
Modified: 2007-11-30 17:10 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-05-10 14:44:16 EDT
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 Joe Orton 2004-05-06 10:41:31 EDT
# rpm -qf /usr/sbin/htt
iiimf-server-11.4-41

From a default boot into runlevel 5, do:

# telinit 3

after a few seconds you're left with two htt daemons; the latter is
eating CPU, continually spawning a new child which dies because it
can't bind to port 9010

10967 ?        S      0:00 /usr/sbin/htt
10968 ?        S      0:00  \_ htt_server -nodaemon
11175 ?        R      0:00 /usr/sbin/htt
15648 ?        R      0:00  \_ htt_server -nodaemon

# strace -f -e clone,bind -p 11175
--- SIGCHLD (Child exited) @ 0 (0) ---
clone(Process 18988 attached
child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0xf70d68c8) = 18988
Process 11175 suspended
[pid 18988] bind(3, {sa_family=AF_INET, sin_port=htons(9010),
sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EADDRINUSE (Address already
in use)
Process 11175 resumed
Process 18988 detached
--- SIGCHLD (Child exited) @ 0 (0) ---
clone(Process 18989 attached
child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0xf70d68c8) = 18989
Process 11175 suspended
[pid 18989] bind(3, {sa_family=AF_INET, sin_port=htons(9010),
sin_addr=inet_addr("127.0.0.1")}, 16) = -1 EADDRINUSE (Address already
in use)
Process 11175 resumed
Process 18989 detached
--- SIGCHLD (Child exited) @ 0 (0) ---
Comment 1 Warren Togami 2004-05-10 05:33:57 EDT
The service design itself needs work, but for now the problem can be
avoided by fixing the /etc/init.d/IIim script.  Unfortunately in the
course of investigating this bug, I realized that it causes 100% CPU
usage and total failure of htt's functionality in non-obvious way. =(

Setting FC2BLOCKER and rebuilding now, but it is up to Elliot if he
would allow this update into FC2 final.  If not then this should go
out in the first batch of FC2 updates immediately upon release.

--- IIim.orig	2004-05-09 23:04:19.297215883 -1000
+++ IIim	2004-05-09 23:14:42.989597637 -1000
@@ -16,11 +16,16 @@
 test -x $HTT || exit 0
 
 start() {
-        echo -n $"Starting IIIMF input server: "
-        daemon --user htt $HTT $OPTIONS 2>&1 </dev/null
-        echo
-	RETVAL=$?
-	[ $RETVAL -eq 0 ] && touch $LOCKER
+        if [ ! -f $LOCKER ]; then
+                echo -n $"Starting IIIMF input server: "
+                daemon --user htt $HTT $OPTIONS 2>&1 </dev/null
+                echo
+	        RETVAL=$?
+	        [ $RETVAL -eq 0 ] && touch $LOCKER
+        else
+                return 0
+        fi
+        return $RETVAL
 }
 
 stop() {
@@ -46,7 +51,7 @@
         start
         ;;
   condrestart)
-        if [ -f /var/lock/subsys/htt ]; then
+        if [ -f $LOCKER ]; then
             stop
             start
         fi

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