[imp] run away ispell processes

Mark G. Thomas Mark@misty.com
Mon, 22 Apr 2002 15:18:53 -0400


Hi,

On Wed, Apr 17, 2002 at 06:45:14PM -0400, Chuck Hagenbuch wrote:
> Quoting Jeff Tucker <jefft@wciatl.com>:
> 
> > I'm definitely experiencing it and had to disable spell checking on my 
> > system because of it. I routinely got these runaway ispells using as
> > much processor time as possible.
> 
> Well, we need feedback from people who can actually reproduce the 
> problem...
> 
> -chuck
> 
> --
> Charles Hagenbuch, <chuck@horde.org>

I haven't been able to reproduce the problem, however I have some
observations, and may be able to repeat the problem once I talk to a user.

1) When it happens, it happens repeatedly for the same message.  It should
   be repeatable if I can find out what my user clicked on when doing their
   spell check.  In this case ps reported the same text in the "echo" 
   statement to ispell for all 9 ispell processes.

2) When it happens, often the corresponding httpd processes grow to tens or
   hundreds of MB in size.  I typically discover this after I manually kill
   the ispell processes.

3) The text of this particular message included single quotes and question
    marks.  Is it possible something is not being escaped when fed to shell
    and the echo statement?  My user had this problem when sending me a 
    message, but when I copy the same text into a message and try using 
    the spell check, it doesn't reproduce the problem.  I will further
    question my user on what exactly they clicked on once they did the 
    spell check.

4) I'm actually alarmed this is being passed on a command line to shell and
   echo at all.  This seems like it could lead to a few kinds of security 
   problems if not done properly.

   httpd 16377   294  0 13:38:13 ?        2:02 /opt/apache_1.3.22+ssl_1.45/bin/h
   httpd 16990 16377  0 13:59:48 ?        0:00 sh -c echo Mark,\I called to see if I could get an eariler appt. and that was
   httpd 16991 16990 11 13:59:48 ?       36:59 /opt/bin/ispell -a -d english

--------------------------------------------------------------------------------
last pid: 18751;  load averages:  9.23,  9.20,  8.98                   14:57:56
87 processes:  68 sleeping, 4 running, 9 zombie, 6 on cpu
CPU states:     % idle,     % user,     % kernel,     % iowait,     % swap
Memory: 1024M real, 70M free, 1028M swap in use, 1820M swap free

  PID USERNAME THR PRI NICE  SIZE   RES STATE   TIME    CPU COMMAND
17101 httpd      1  10    0 2076K 1572K cpu4   35:01 11.15% ispell
17056 httpd      1  10    0 2076K 1572K cpu5   36:14 10.82% ispell
17159 httpd      1   0    0 2076K 1572K cpu3   34:36 10.81% ispell
17152 httpd      1   0    0 2076K 1572K run    34:45 10.75% ispell
17148 httpd      1   0    0 2076K 1572K run    34:28 10.68% ispell
16991 httpd      1   0    0 2076K 1572K run    37:17 10.44% ispell
17048 httpd      1   0    0 2076K 1572K run    36:39 10.19% ispell
17097 httpd      1   0    0 2076K 1572K cpu0   36:01 10.13% ispell
17143 httpd      1  10    0 2076K 1572K cpu1   34:59  9.92% ispell
18749 root       1   0    0 1536K 1064K cpu2    0:00  0.73% top
18690 root       1  44    0 2556K 2064K sleep   0:00  0.15% proftpd
  178 root      20  58    0 4540K 2156K sleep  24:41  0.05% syslogd
18477 root       1  58    0 3144K 2244K sleep   0:02  0.05% sshd
  193 named      1  58    0 8804K 7540K sleep  12:09  0.04% named
  166 root       1  54    0 2068K 1028K sleep   3:14  0.03% inetd
--------------------------------------------------------------------------------

last pid: 18834;  load averages:  8.07,  8.95,  8.92                   14:59:30
57 processes:  54 sleeping, 3 on cpu
CPU states: 63.6% idle, 34.1% user,  2.3% kernel,  0.0% iowait,  0.0% swap
Memory: 1024M real, 223M free, 856M swap in use, 1992M swap free

  PID USERNAME THR PRI NICE  SIZE   RES STATE   TIME    CPU COMMAND
16866 httpd      1   0    0  204M  199M cpu4    1:13  8.60% httpsd
16377 httpd      1   0    0  405M  400M cpu3    2:16  8.58% httpsd
16549 httpd      1   0    0   56M   51M sleep   0:18  1.53% httpsd
18813 root       1  52    0 2164K 1448K cpu1    0:01  0.92% top
16318 httpd      1   0    0   24M   19M sleep   0:06  0.44% httpsd
16763 httpd      1   0    0   21M   15M sleep   0:06  0.29% httpsd
.....
--------------------------------------------------------------------------------

-- 
Mark G. Thomas (Mark@Misty.com)
voice: 215-591-3695    fax:   215-591-0615
http://www.misty.com/  http://mail-cleaner.com/