home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / pcclone / 32bit / 1020 < prev    next >
Encoding:
Internet Message Format  |  1993-01-11  |  2.7 KB

  1. Xref: sparky comp.unix.pc-clone.32bit:1020 biz.sco.general:5066
  2. Newsgroups: comp.unix.pc-clone.32bit,comp.unix.i386,biz.sco.general
  3. Path: sparky!uunet!mcsun!news.funet.fi!funic!nntp.hut.fi!nntp!Petri.Wessman
  4. From: Petri.Wessman@hut.fi (Petri Wessman)
  5. Subject: [SCO] execvp(2) seems to fail on shell scripts!
  6. Message-ID: <PETRI.WESSMAN.93Jan11182858@lk-hp-21.hut.fi>
  7. Sender: usenet@nntp.hut.fi (Usenet pseudouser id)
  8. Nntp-Posting-Host: lk-hp-21.hut.fi
  9. Reply-To: Petri.Wessman@inter.fi
  10. Organization: Inter Marketing Oy, Finland
  11. Distribution: comp
  12. Date: 11 Jan 93 18:28:58
  13. Lines: 51
  14.  
  15. We've encountered a strange phenomenon with SCO Unix 3.2.4. We have an
  16. init-like program that keeps our other customer software running, and
  17. now it is failing mysteriously. The problem occurs only on SCO, not
  18. on AIX 3.1 or NCR Unix, our other current supported platforms.
  19.  
  20. The program basicly does a fork + exec for each program it is
  21. monitoring, and blocks in wait(). If a child dies, it is restarted.
  22. The programs that it starts are /bin/sh scripts, and this seems to be
  23. the root of the problem. Things work fine for a while, but after an
  24. unknown interval of time (usually the next day), *something* goes
  25. wrong. After this point, it can't seem to start a single one of the
  26. programs. Exec() works fine (doesn't return error), but the script is
  27. never executed (we've tested N+1 variations) and wait() gets an
  28. "exited with status 0" for the child that was "started".
  29.  
  30. Here's the strange(r) part: when this has happened, if we replace one
  31. of the scripts with a binary executable, it starts up fine! We tried a
  32. binary that just printed its arguments and env and then slept, and
  33. everything looked fine... the argument's weren't mangled or anything,
  34. which was our initial suspicion. When we put the shell script back,
  35. glich time again.
  36.  
  37. It looks like a kernel bug, but I truly don't know for certain. What I *do*
  38. know is:
  39.  
  40. a)    The system works fine for a while, and then goes into this
  41.     crazy state. If the init-clone is killed and restarted,
  42.     everything is ok again (for a while).
  43.  
  44. b)    The exec arguments seem to be fine (and if they weren't exec()
  45.     would/should return an error code). This never happens, exec()
  46.     always seems to work ok. We use execvp(), by the way.
  47.  
  48. c)    The script that was "executed" by exec() returns at once with
  49.     exit status 0. No commands whatsoever are run from the script
  50.     itself.
  51.  
  52. d)    This occurs only on SCO (both 3.2.2 and 3.2.4). Nothing like
  53.     this has been encountered on other platforms.
  54.  
  55. e)    The problem occurs only for shell scripts. Binary executables
  56.     work fine.
  57.  
  58. f)    This is annoying *as hell*! :-(  We're forced to restart
  59.     programs by hand via a modem link for customers.
  60.  
  61.  
  62. Any and all help would be appreciated!  Hasn't anyone encountered this
  63. before?
  64.  
  65. //Petri
  66.